blob: a4f1d176dc4a569ac6dd1a6b988d13b44b8fcf0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
Name: lpsolve
Summary: A Mixed Integer Linear Programming (MILP) solver
Version: 5.5.2.0
Release: 1
Source: http://downloads.sourceforge.net/lpsolve/lp_solve_%{version}_source.tar.gz
URL: http://sourceforge.net/projects/lpsolve
License: LGPLv2+
BuildRequires: gcc-c++
Patch0: lpsolve-5.5.0.11.cflags.patch
Patch1: lpsolve-5.5.2.0.defines.patch
Patch2: lpsolve-ccc-c99.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
%patch0 -p1 -b .cflags.patch
%patch1 -p1 -b .defines.patch
%patch2 -p1 -b .ccc-c99.patch
%build
%set_build_flags
cd lpsolve55
# fix for obs
mkdir -p tmp
sed -i "s#/tmp#tmp#g" ccc
# end fix for obs
sh -x ccc
rm bin/ux*/liblpsolve55.a
cd ../lp_solve
# fix for obs
mkdir -p tmp
sed -i "s#/tmp#tmp#g" ccc
# end fix for obs
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 ./bfp/bfp_LUSOL/LUSOL/LUSOL_LGPL.txt ./bfp/bfp_LUSOL/LUSOL/LUSOL_README.txt ./bfp/bfp_LUSOL/LUSOL/LUSOL-overview.txt
%{_bindir}/lp_solve
%{_libdir}/*.so
%files devel
%{_includedir}/lpsolve
%changelog
* Wed Sep 06 2023 Darssin <2020303249@mail.nwpu.edu.cn> - 5.5.2.0-1
- Package init
|