Name: lpsolve-xli-CPLEX Version: 5.5.2.11 Release: 1%{?dist} Summary: CPLEX XLI plugin for lpsolve # lp_CPLEX.c: "LGPL" # lp_rlpt.c: GPL-2.0-or-later WITH Bison-exception-2.2 License: LGPL-2.1-or-later AND GPL-2.0-or-later WITH Bison-exception-2.2 # There is a mailing list at URL: https://sourceforge.net/projects/lpsolve/ Source: %{url}/files/lpsolve/%{version}/lp_solve_%{version}_xli_CPLEX_source.tar.gz BuildRequires: coreutils BuildRequires: gcc # Since that release yacc_read.h is packaged BuildRequires: lpsolve-devel >= 5.5.2.11-7 # Tests: BuildRequires: lpsolve BuildRequires: grep %description This library allows lpsolve to read and write model files in the CPLEX linear programming format. %prep %autosetup -p1 -n lp_solve_5.5 # Generated files, lp_rlpt.inc and lp_rlpt.c, won't compile after # regeneration (lp_rlpt.bat). %build %set_build_flags pushd xli/xli_CPLEX # ccc build script expects building in lpsolve sources. Do not use it. # yacc_read1.c lp_Hash1.c are omitted as their functions are already provided # by lpsolve55 library. ${CC} ${CFLAGS} -fPIC -DPIC -DYY_NEVER_INTERACTIVE -I/usr/include/lpsolve -I.. \ -c lp_CPLEX.c lp_rlpt1.c lp_wlpt1.c args.c ${CC} ${LDFLAGS} -shared lp_CPLEX.o lp_rlpt1.o lp_wlpt1.o args.o \ -o libxli_CPLEX.so -lc -lm -llpsolve55 %install install -d %{buildroot}%{_libdir} install -p -m 755 xli/xli_CPLEX/libxli_CPLEX.so %{buildroot}%{_libdir} %check pushd xli/xli_CPLEX # Check that all symbols links ldd -r -d libxli_CPLEX.so # Check that a problem in CPLEX format can be solved cat <<'EOF' > test.cplex Maximize x1 Bounds 0 <= x1 <= 42 End EOF lp_solve -rxli ./libxli_CPLEX.so test.cplex -S1 | grep -e ': 42\.0*$' %files %doc xli/xli_CPLEX/readme.txt %{_libdir}/libxli_CPLEX.so %changelog * Thu Oct 24 2024 Petr Pisar - 5.5.2.11-1 - 5.5.2.11 version packaged