diff --git a/README.md b/README.md index 4245cbf..7a300f2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # liblp_solve +Mixed Integer Linear Programming (MILP) solver lp_solve solves pure linear, +(mixed) integer/binary, semi-continuous and special ordered sets (SOS) models. +lp_solve is written in ANSI C and can be compiled on many different platforms +like Linux and WINDOW + diff --git a/liblp_solve-5.5.0.11.cflags.patch b/liblp_solve-5.5.0.11.cflags.patch new file mode 100644 index 0000000..d62c9d0 --- /dev/null +++ b/liblp_solve-5.5.0.11.cflags.patch @@ -0,0 +1,24 @@ +diff -ru lp_solve_5.5.orig/lp_solve/ccc lp_solve_5.5/lp_solve/ccc +--- lp_solve_5.5.orig/lp_solve/ccc 2008-02-19 09:25:29.000000000 +0000 ++++ lp_solve_5.5/lp_solve/ccc 2008-02-19 09:26:01.000000000 +0000 +@@ -3,7 +3,7 @@ + + math=-lm + +-opts='-O3' ++opts=$RPM_OPT_FLAGS + + def= + if [ "$PLATFORM" = "SCO_UNIX" ] +diff -ru lp_solve_5.5.orig/lpsolve55/ccc lp_solve_5.5/lpsolve55/ccc +--- lp_solve_5.5.orig/lpsolve55/ccc 2008-02-19 09:25:29.000000000 +0000 ++++ lp_solve_5.5/lpsolve55/ccc 2008-02-19 09:25:51.000000000 +0000 +@@ -10,7 +10,7 @@ + so=y + fi + +-opts='-O3' ++opts=$RPM_OPT_FLAGS + + $c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src + ar rv liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` diff --git a/liblp_solve.spec b/liblp_solve.spec new file mode 100644 index 0000000..11c93f6 --- /dev/null +++ b/liblp_solve.spec @@ -0,0 +1,127 @@ +Name: liblp_solve +Version: 5.5.0.13 +Release: 2mamba +Summary: a Mixed Integer Linear Programming (MILP) solver +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Automatic Build System +URL: http://lpsolve.sourceforge.net/ +Source: http://downloads.sourceforge.net/lpsolve/lp_solve_%{version}_source.tar.gz +Patch0: liblp_solve-5.5.0.11.cflags.patch +License: LGPL +BuildRequires: bison +BuildRequires: flex +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Mixed Integer Linear Programming (MILP) solver lp_solve solves pure linear, +(mixed) integer/binary, semi-continuous and special ordered sets (SOS) models. +lp_solve is written in ANSI C and can be compiled on many different platforms +like Linux and WINDOW + +%package devel +Group: Development/Libraries +Summary: Headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +Mixed Integer Linear Programming (MILP) solver lp_solve solves pure linear, +(mixed) integer/binary, semi-continuous and special ordered sets (SOS) models. +lp_solve is written in ANSI C and can be compiled on many different platforms +like Linux and WINDOW + +This package contains header files need for development. + +%package static +Group: Development/Libraries +Summary: Static libraries for %{name} +Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release} + +%description static +Mixed Integer Linear Programming (MILP) solver lp_solve solves pure linear, +(mixed) integer/binary, semi-continuous and special ordered sets (SOS) models. +lp_solve is written in ANSI C and can be compiled on many different platforms +like Linux and WINDOW + +This package contains static libraries need for development. + +%package demo +Group: Development/Tools +Summary: A demo program for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description demo +Mixed Integer Linear Programming (MILP) solver lp_solve solves pure linear, +(mixed) integer/binary, semi-continuous and special ordered sets (SOS) models. +lp_solve is written in ANSI C and can be compiled on many different platforms +like Linux and WINDOW + +This package contains a demo program for %{name}. + +%prep + +%setup -q -n lp_solve_5.5 +%patch -p1 +%build +cd lp_solve +sh -x ccc +cd ../demo +sh -x ccc +cd ../lpsolve55 +sh -x ccc +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +install -d %{buildroot}%{_bindir} +install -d %{buildroot}%{_libdir} +install -d %{buildroot}%{_includedir}/lpsolve + +install -m 755 \ + demo/demo %{buildroot}%{_bindir} +install -m 755 \ + lp_solve/lp_solve %{buildroot}%{_bindir} +install -m 755 \ + lpsolve55/liblpsolve55.so %{buildroot}%{_libdir} +install -m 644 \ + lpsolve55/liblpsolve55.a %{buildroot}%{_libdir} +install -m 644 \ + lp*.h %{buildroot}%{_includedir}/lpsolve + + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/lp_solve +%{_libdir}/*.so +%doc README.txt +%doc ./bfp/bfp_LUSOL/LUSOL/LUSOL_LGPL.txt +%doc ./bfp/bfp_LUSOL/LUSOL/LUSOL_README.txt +%doc ./bfp/bfp_LUSOL/LUSOL/LUSOL-overview.txt + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/lpsolve +%{_includedir}/lpsolve/*.h + +%files static +%defattr(-,root,root) +%{_libdir}/*.a + +%files demo +%defattr(-,root,root) +%{_bindir}/demo + +%changelog +* Fri Aug 30 2013 Automatic Build System 5.5.0.13-2mamba +- automatic rebuild by autodist + +* Wed Nov 12 2008 gil 5.5.0.13-1mamba +- package created by autospec