Name: lpsolve Summary: A Mixed Integer Linear Programming (MILP) solver Version: 5.5.2.11 Release: 2%{?dist} Source: http://downloads.sourceforge.net/lpsolve/lp_solve_%{version}_source.tar.gz URL: http://sourceforge.net/projects/lpsolve License: LGPLv2+ BuildRequires: gcc gcc-c++ Patch0: lpsolve-5.5.0.11.cflags.patch Patch1: lpsolve-5.5.2.0.defines.patch Patch2: read-cc-from-env.patch %description Mixed Integer Linear Programming (MILP) solver lpsolve solves pure linear, (mixed) integer/binary, semi-continuous and special ordered sets (SOS) models. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} Summary: Files for developing with lpsolve %description devel Includes and definitions for developing with lpsolve %prep %setup -q -n lp_solve_5.5 %build for d in {lp_solve,lpsolve55} do sed -i 's|c=cc|c=gcc|' $d/ccc sed -i "s|opts='-O3'|opts='%{optflags}'|" $d/ccc sed -i 's|$c -I|\$c \$CFLAGS \$LDFLAGS -I|' $d/ccc done %set_build_flags cd lpsolve55 sh -x ccc rm bin/ux*/liblpsolve55.a cd ../lp_solve sh -x ccc %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_includedir}/lpsolve install -p -m 755 \ lp_solve/bin/ux*/lp_solve $RPM_BUILD_ROOT%{_bindir} install -p -m 755 \ lpsolve55/bin/ux*/liblpsolve55.so $RPM_BUILD_ROOT%{_libdir} install -p -m 644 \ lp*.h $RPM_BUILD_ROOT%{_includedir}/lpsolve %ldconfig_scriptlets %files %doc README.txt %{_bindir}/lp_solve %{_libdir}/*.so %files devel %{_includedir}/lpsolve %changelog * Tue Jan 18 2022 Balint Cristian - 5.5.2.11 - new release * Thu Jul 22 2021 Fedora Release Engineering - 5.5.2.0-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild