3 %bcond_without apidocs # API documentation
4 %bcond_without static_libs # static library
6 Summary: SoPlex - the Sequential object-oriented simPlex
7 Summary(pl.UTF-8): SoPlex - sekwencyjna, zorientowana obiektowo metoda simplex
11 License: ZIB Academic License (free for academic use) or commercial
13 #Source0Download: http://soplex.zib.de/#download
14 Source0: http://soplex.zib.de/download/release/%{name}-%{version}.tgz
15 # NoSource0-md5: 70ad27bc478dc61689ea34a46203abc8
16 # Cannot freely distribute sources or binaries according to license, 3c:
17 # "You must keep track of access to the Program (e.g., similar to the
18 # registration procedure at ZIB)."
20 URL: http://soplex.zib.de/
21 %{?with_apidocs:BuildRequires: doxygen}
22 BuildRequires: gmp-c++-devel
23 BuildRequires: libstdc++-devel
24 BuildRequires: zlib-devel
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 SoPlex is a Linear Programming (LP) solver based on the revised
29 simplex algorithm. It features preprocessing techniques, exploits
30 sparsity, and offers primal and dual solving routines. It can be used
31 as a standalone solver reading MPS or LP format files as well as
32 embedded into other programs via a C++ class library.
34 %description -l pl.UTF-8
35 SoPlex to narzędzie do rozwiązywania problemów programowania liniowego
36 (LP) w oparciu o zmodyfikowany algorytm simplex. Obsługiwane są
37 techniki preprocesingu, wykorzystywana rzadkość, dostępne są procedury
38 rozwiązywania metodą prostą i dualną. Pakietu można używać jako
39 samodzielnego programu odczytującego pliki w formacie MPS lub LP, a
40 także w postaci osadzonej w innych programach poprzez bibliotekę klas
44 Summary: Header files for SoPlex library
45 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki SoPlex
46 Group: Development/Libraries
47 Requires: %{name} = %{version}-%{release}
48 Requires: libstdc++-devel
51 Header files for SoPlex library.
53 %description devel -l pl.UTF-8
54 Pliki nagłówkowe biblioteki SoPlex.
57 Summary: Static SoPlex library
58 Summary(pl.UTF-8): Statyczna biblioteka SoPlex
59 Group: Development/Libraries
60 Requires: %{name}-devel = %{version}-%{release}
63 Static SoPlex library.
65 %description static -l pl.UTF-8
66 Statyczna biblioteka SoPlex.
69 Summary: SoPlex API documentation
70 Summary(pl.UTF-8): Dokumentacja API biblioteki SoPlex
74 API documentation for SoPlex library.
76 %description apidocs -l pl.UTF-8
77 Dokumentacja API biblioteki SoPlex.
83 %if %{with static_libs}
87 USRCXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
88 USRLDFLAGS="%{rpmldflags}" \
92 # abuse REPOSIT variable to append required libs to the end of link command
96 LIBBUILDFLAGS="-shared -Wl,-soname,libsoplex.so.1" \
97 REPOSIT="-lgmpxx -lgmp -lz" \
99 USRCXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
100 USRLDFLAGS="%{rpmldflags}" \
108 rm -rf $RPM_BUILD_ROOT
110 # make install just headers, libraries and binary manually
111 %{__make} installheader \
112 INSTALLDIR=$RPM_BUILD_ROOT%{_prefix} \
113 INCLUDEDIR=include/soplex
115 # omitted in installheader target, but required by soplex.h
116 cp -p src/{array,dataarray,datahashtable,datakey,dataset,exceptions,idlist,islist,lpcol,random,slinsolver,spxalloc,spxpricer,spxratiotester,spxsimplifier}.h $RPM_BUILD_ROOT%{_includedir}/soplex
118 install -Dp bin/soplex $RPM_BUILD_ROOT%{_bindir}/soplex
119 install -Dp lib/libsoplex-%{version}.linux.*.so $RPM_BUILD_ROOT%{_libdir}/libsoplex.so.%{version}
120 ln -sf libsoplex.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libsoplex.so.1
121 ln -sf libsoplex.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libsoplex.so
122 %if %{with static_libs}
123 install -Dp lib/libsoplex-%{version}.linux.*.a $RPM_BUILD_ROOT%{_libdir}/libsoplex.a
127 rm -rf $RPM_BUILD_ROOT
129 %post -p /sbin/ldconfig
130 %postun -p /sbin/ldconfig
133 %defattr(644,root,root,755)
134 %doc CHANGELOG COPYING
135 %attr(755,root,root) %{_bindir}/soplex
136 %attr(755,root,root) %{_libdir}/libsoplex.so.*.*.*
137 %attr(755,root,root) %ghost %{_libdir}/libsoplex.so.1
140 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_libdir}/libsoplex.so
142 %{_includedir}/soplex
144 %if %{with static_libs}
146 %defattr(644,root,root,755)
147 %{_libdir}/libsoplex.a
152 %defattr(644,root,root,755)