Blob Blame History Raw
Name:      lpsolve
Summary:   A Mixed Integer Linear Programming (MILP) solver
Release:   1%{?dist}
Group:     System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
License:   LGPLv2+

Patch0:    lpsolve-

Mixed Integer Linear Programming (MILP) solver lpsolve solves pure linear,
(mixed) integer/binary, semi-continuous and special ordered sets (SOS) models.

%package devel
Requires: lpsolve = %{version}-%{release}
Summary: Files for developing with lpsolve
Group: Development/Libraries

%description devel
Includes and definitions for developing with lpsolve 

%setup -q -n lp_solve_5.5
%patch0 -p1 -b .cflags.patch
#sparc and s390 need -fPIC  lets sed it                                              
%ifarch sparcv9 sparc64 s390 s390x                                                   
sed -i -e 's|-fpic|-fPIC|g' Makefile*                                                
sed -i -e 's|-fpic|-fPIC|g' lpsolve55/ccc                                            

cd lpsolve55
sh -x ccc
rm bin/ux*/liblpsolve55.a
cd ../lp_solve
sh -x ccc

install -d $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_includedir}/lpsolve
install -m 755 \
        lp_solve/bin/ux*/lp_solve $RPM_BUILD_ROOT%{_bindir}
install -m 755 \
        lpsolve55/bin/ux*/ $RPM_BUILD_ROOT%{_libdir}
install -m 644 \
        lp*.h $RPM_BUILD_ROOT%{_includedir}/lpsolve


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%doc README.txt ./bfp/bfp_LUSOL/LUSOL/LUSOL_LGPL.txt ./bfp/bfp_LUSOL/LUSOL/LUSOL_README.txt ./bfp/bfp_LUSOL/LUSOL/LUSOL-overview.txt

%files devel

* Mon Feb 02 2009 Caolán McNamara <> -
- latest version

* Fri Jan 02 2009 Dennis Gilmore <> -
- use -fPIC on sparc and s390 arches

* Mon Aug 04 2008 Caolan McNamara <> -
- latest version

* Sat Aug 02 2008 Caolan McNamara <> -
- Mar 20 upstream tarball now differs from Mar 14 tarball

* Fri Mar 14 2008 Caolan McNamara <> -
- latest version

* Wed Feb 20 2008 Caolan McNamara <> -
- initial version