]> git.pld-linux.org Git - packages/gecode.git/blame - gecode.spec
- unconditional noarch subpackages
[packages/gecode.git] / gecode.spec
CommitLineData
87d06430
ER
1# TODO
2# - html docs seems not to be built
3
4# Conditional build:
5%bcond_with doc # build doc
a881aed0
ER
6%bcond_without qt # Qt support (qt4>4.3, qt5)
7%bcond_without gist # Gecode Interactive Search Tool
8
9%if %{without qt}
10%undefine with_gist
11%endif
87d06430
ER
12
13Summary: Generic constraint development environment
14Name: gecode
5f141020 15Version: 4.4.0
c44d4218 16Release: 2
87d06430
ER
17License: MIT
18Group: Libraries
19Source0: http://www.gecode.org/download/%{name}-%{version}.7z
5f141020 20# Source0-md5: c27e20608076a9d18d9a97d47aae92e5
87d06430
ER
21Patch0: no_examples.patch
22URL: http://www.gecode.org/
c6f181a8 23BuildRequires: autoconf
87d06430
ER
24BuildRequires: automake
25BuildRequires: bison
26BuildRequires: boost-devel
27BuildRequires: flex >= 2.5.33
28BuildRequires: graphviz
29BuildRequires: p7zip-standalone
30BuildRequires: qt4-build
a881aed0
ER
31%if %{with qt}
32BuildRequires: Qt5Core-devel
33BuildRequires: Qt5Gui-devel
34BuildRequires: Qt5PrintSupport-devel
35BuildRequires: Qt5Widgets-devel
36%endif
87d06430
ER
37%if %{with doc}
38BuildRequires: doxygen
39BuildRequires: tex(dvips)
40BuildRequires: tex(latex)
41%endif
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
5f141020
ER
44%define sover 41
45
87d06430
ER
46%description
47Gecode is a toolkit for developing constraint-based systems and
48applications. Gecode provides a constraint solver with
49state-of-the-art performance while being modular and extensible.
50
a881aed0
ER
51%package gist
52Summary: Gecode Interactive Search Tool
53Group: Libraries
54Requires: %{name} = %{version}-%{release}
55
56%description gist
57Gecode Interactive Search Tool.
58
87d06430
ER
59%package devel
60Summary: Development files for %{name}
61Group: Development/Libraries
62Requires: %{name} = %{version}-%{release}
63
64%description devel
65The %{name}-devel package contains libraries and header files for
66developing applications that use %{name}.
67
68%package doc
69Summary: Documentation for %{name}
70Group: Documentation
71Requires: %{name} = %{version}-%{release}
87d06430 72BuildArch: noarch
87d06430
ER
73
74%description doc
75The %{name}-doc package contains documentation files for %{name}.
76
77%package examples
78Summary: Example code for %{name}
79Group: Documentation
80Requires: %{name} = %{version}-%{release}
87d06430 81BuildArch: noarch
87d06430
ER
82
83%description examples
84The %{name}-examples package contains example code for %{name}.
85
86%prep
87%setup -q
88%patch0 -p1
89
90# Fix permissions
91find . -name '*.hh' -exec chmod 0644 '{}' \;
92find . -name '*.hpp' -exec chmod 0644 '{}' \;
93find . -name '*.cpp' -exec chmod 0644 '{}' \;
94chmod 0644 LICENSE misc/doxygen/*.png
95
96# Fix encoding
97cd examples
98for file in bin-packing.cpp black-hole.cpp dominating-queens.cpp scowl.hpp word-square.cpp; do
99 iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
100 touch -r $file $file.new && \
101 mv $file.new $file
102done
103
104%build
105%{__aclocal}
106%{__autoconf}
5f141020 107chmod +x configure
87d06430
ER
108%configure \
109 --disable-examples \
a881aed0
ER
110 --enable-mpfr \
111 %{__enable_disable qt} \
112 %{__enable_disable gist} \
87d06430
ER
113 --enable-float-vars \
114 --enable-leak-debug \
115 --with-boost-include=%{_includedir}/boost
116
117%{__make}
87d06430
ER
118%{__make} ChangeLog
119
120iconv --from=ISO-8859-1 --to=UTF-8 -o ChangeLog.new ChangeLog
121mv ChangeLog.new ChangeLog
122
a6e494a6
ER
123%{?with_doc:%{__make} doc}
124
87d06430
ER
125%install
126rm -rf $RPM_BUILD_ROOT
127%{__make} install \
128 DESTDIR=$RPM_BUILD_ROOT
129
130install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
131cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
132
133%clean
134rm -rf $RPM_BUILD_ROOT
135
136%post -p /sbin/ldconfig
137%postun -p /sbin/ldconfig
138
139%files
140%defattr(644,root,root,755)
141%doc ChangeLog LICENSE
142%attr(755,root,root) %{_libdir}/libgecodedriver.so.*.*
5f141020 143%ghost %{_libdir}/libgecodedriver.so.%{sover}
87d06430 144%attr(755,root,root) %{_libdir}/libgecodeflatzinc.so.*.*
5f141020 145%ghost %{_libdir}/libgecodeflatzinc.so.%{sover}
87d06430 146%attr(755,root,root) %{_libdir}/libgecodefloat.so.*.*
5f141020 147%ghost %{_libdir}/libgecodefloat.so.%{sover}
87d06430 148%attr(755,root,root) %{_libdir}/libgecodeint.so.*.*
5f141020 149%ghost %{_libdir}/libgecodeint.so.%{sover}
87d06430 150%attr(755,root,root) %{_libdir}/libgecodekernel.so.*.*
5f141020 151%ghost %{_libdir}/libgecodekernel.so.%{sover}
87d06430 152%attr(755,root,root) %{_libdir}/libgecodeminimodel.so.*.*
5f141020 153%ghost %{_libdir}/libgecodeminimodel.so.%{sover}
87d06430 154%attr(755,root,root) %{_libdir}/libgecodesearch.so.*.*
5f141020 155%ghost %{_libdir}/libgecodesearch.so.%{sover}
87d06430 156%attr(755,root,root) %{_libdir}/libgecodeset.so.*.*
5f141020 157%ghost %{_libdir}/libgecodeset.so.%{sover}
87d06430 158%attr(755,root,root) %{_libdir}/libgecodesupport.so.*.*
5f141020 159%ghost %{_libdir}/libgecodesupport.so.%{sover}
87d06430 160
a881aed0
ER
161%if %{with gist}
162%files gist
163%defattr(644,root,root,755)
164%attr(755,root,root) %{_libdir}/libgecodegist.so.*.*
165%ghost %{_libdir}/libgecodegist.so.%{sover}
166%endif
167
87d06430
ER
168%files devel
169%defattr(644,root,root,755)
170%attr(755,root,root) %{_bindir}/fzn-gecode
171%attr(755,root,root) %{_bindir}/mzn-gecode
172%{_datadir}/%{name}
173%{_includedir}/%{name}
174%{_libdir}/libgecodedriver.so
175%{_libdir}/libgecodeflatzinc.so
176%{_libdir}/libgecodefloat.so
87d06430
ER
177%{_libdir}/libgecodeint.so
178%{_libdir}/libgecodekernel.so
179%{_libdir}/libgecodeminimodel.so
180%{_libdir}/libgecodesearch.so
181%{_libdir}/libgecodeset.so
182%{_libdir}/libgecodesupport.so
183
a881aed0
ER
184%if %{with gist}
185%{_libdir}/libgecodegist.so
186%endif
187
87d06430
ER
188%if %{with doc}
189%files doc
190%defattr(644,root,root,755)
191%doc doc/*
192%endif
193
194%files examples
195%defattr(644,root,root,755)
196%{_examplesdir}/%{name}-%{version}
This page took 0.122127 seconds and 4 git commands to generate.