]> git.pld-linux.org Git - SPECS.git/blob - soplex.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / soplex.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 %bcond_without  static_libs     # static library
5
6 Summary:        SoPlex - the Sequential object-oriented simPlex
7 Summary(pl.UTF-8):      SoPlex - sekwencyjna, zorientowana obiektowo metoda simplex
8 Name:           soplex
9 Version:        2.2.1
10 Release:        1
11 License:        ZIB Academic License (free for academic use) or commercial
12 Group:          Libraries
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)."
19 NoSource:       0
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)
26
27 %description
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.
33
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
41 C++.
42
43 %package devel
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
49
50 %description devel
51 Header files for SoPlex library.
52
53 %description devel -l pl.UTF-8
54 Pliki nagłówkowe biblioteki SoPlex.
55
56 %package static
57 Summary:        Static SoPlex library
58 Summary(pl.UTF-8):      Statyczna biblioteka SoPlex
59 Group:          Development/Libraries
60 Requires:       %{name}-devel = %{version}-%{release}
61
62 %description static
63 Static SoPlex library.
64
65 %description static -l pl.UTF-8
66 Statyczna biblioteka SoPlex.
67
68 %package apidocs
69 Summary:        SoPlex API documentation
70 Summary(pl.UTF-8):      Dokumentacja API biblioteki SoPlex
71 Group:          Documentation
72
73 %description apidocs
74 API documentation for SoPlex library.
75
76 %description apidocs -l pl.UTF-8
77 Dokumentacja API biblioteki SoPlex.
78
79 %prep
80 %setup -q
81
82 %build
83 %if %{with static_libs}
84 %{__make} \
85         CXX="%{__cxx}" \
86         GMP=true \
87         USRCXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
88         USRLDFLAGS="%{rpmldflags}" \
89         VERBOSE=true
90 %endif
91
92 # abuse REPOSIT variable to append required libs to the end of link command
93 %{__make} \
94         CXX="%{__cxx}" \
95         GMP=true \
96         LIBBUILDFLAGS="-shared -Wl,-soname,libsoplex.so.1" \
97         REPOSIT="-lgmpxx -lgmp -lz" \
98         SHARED=true \
99         USRCXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
100         USRLDFLAGS="%{rpmldflags}" \
101         VERBOSE=true
102
103 %if %{with apidocs}
104 %{__make} doc
105 %endif
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 # make install just headers, libraries and binary manually
111 %{__make} installheader \
112         INSTALLDIR=$RPM_BUILD_ROOT%{_prefix} \
113         INCLUDEDIR=include/soplex
114
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
117
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
124 %endif
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %post   -p /sbin/ldconfig
130 %postun -p /sbin/ldconfig
131
132 %files
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
138
139 %files devel
140 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_libdir}/libsoplex.so
142 %{_includedir}/soplex
143
144 %if %{with static_libs}
145 %files static
146 %defattr(644,root,root,755)
147 %{_libdir}/libsoplex.a
148 %endif
149
150 %if %{with apidocs}
151 %files apidocs
152 %defattr(644,root,root,755)
153 %doc doc/html/*
154 %endif
This page took 0.110156 seconds and 3 git commands to generate.