]> git.pld-linux.org Git - packages/boost.git/blob - boost.spec
- new, based on spec from Fedora. Not finished
[packages/boost.git] / boost.spec
1 #
2 # Conditional build:
3 %bcond_with     python          #with boost-python support (not working now)
4 #
5
6 Name:           boost
7 Summary:        The Boost C++ Libraries
8 Summary(pl):    Biblioteki C++ "Boost"
9 Version:        1.30.2
10 Release:        0.1
11 License:        Freely distributable
12 URL:            http://www.boost.org/
13 Group:          Libraries
14 Source0:        http://dl.sourceforge.net/boost/%{name}-%{version}.tar.bz2
15 # Source0-md5:  4aed692a863bb4beaa0b70d6dc53bda5
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 BuildRequires:  boost-jam >= 3.1.3 libstdc++-devel %{?_with_python:python-devel:}
18 BuildConflicts: gcc = 5:3.3.1
19
20 %description
21 The Boost web site provides free peer-reviewed portable C++ source
22 libraries. The emphasis is on libraries which work well with the C++
23 Standard Library. One goal is to establish "existing practice" and
24 provide reference implementations so that the Boost libraries are
25 suitable for eventual standardization. Some of the libraries have
26 already been proposed for inclusion in the C++ Standards Committee's
27 upcoming C++ Standard Library Technical Report.
28
29 %description -l pl
30 Strona www.boost.org dostarcza wolne biblioteki C++ wraz z kodem
31 ¼ród³owym. Nacisk jest po³o¿ony na biblioteki które dobrze
32 wspó³pracuj± z Bibliotek± Standardow± C++. Celem jest ustanowiæ
33 "isniej±c± praktykê" i dostarczaæ implementacje tak ¿e biblioteki
34 "Boost" nadaj± siê do ewentualnej standaryzacji. Niektóre z bibliotek
35 ju¿ zosta³y zg³oszone do komitetu standaryzacyjnego C++ w nadchodz±cym
36 Raporcie Technicznym Biblioteki Standardowej C++
37
38
39 %if %{?_with_python:1}%{!?_with_python:0}
40 # according to ldd (and automatically generated RPM dependencies) it
41 # doesn't strictly require python, but IMHO it's cleaner to split it
42 # this way
43 %package python
44 Summary:        Boost.Python library
45 Group:          Libraries
46 Requires:       boost python
47
48 %description python
49 Use the Boost Python Library to quickly and easily export a C++
50 library to Python such that the Python interface is very similar to
51 the C++ interface. It is designed to be minimally intrusive on your
52 C++ design. In most cases, you should not have to alter your C++
53 classes in any way in order to use them with Boost.Python. The system
54 should simply ``reflect'' your C++ classes and functions into Python.
55
56 %description python -l pl
57 U¿yj Biblioteki Boost Python ¿eby szybko i prosto eksportowaæ
58 biblioteki C++ do Pythona tak ¿e interfejs Pythona jest bardzo podobny
59 do interfejsu C++. Biblioteka jest zaprojektowana tak ¿eby narzucaæ
60 jak najmniej wymagañ dot. twoich konstrukcjii C++. W wiêkszo¶ci
61 przypadków nie musisz wogóle zmieniaæ twoich klas C++ ¿eby u¿ywaæ ich
62 z Boost.Python. System powinien po prostu ``odbiæ'' twoje klasy C++ i
63 funkcje do Pythona.
64
65
66 %package python-devel
67 Summary:        Boost.Python development headers
68 Group:          Libraries
69 Requires:       %{name}-devel
70
71 %description python-devel
72 Headers for the Boost.Python library
73
74 %description python-devel -l pl
75 Nag³ówki dla biblioteki Boost.Python
76 %endif
77
78 %package devel
79 Summary:        Boost C++ development libraries and headers
80 Group:          Libraries
81 Requires:       boost
82
83 %description devel
84 Headers and static libraries for the Boost C++ libraries
85
86 %description devel -l pl
87 Nag³ówki i biblioteki statyczne bibliotek Boost C++
88
89 %package regex
90 Summary:        Boost C++ regular expressions library
91 Summary(pl):    Biblioteka wyra¿eñ regularnych Boost C++
92 Group:          Libraries
93 Requires:       %{name} = %{version}
94
95 %description regex
96 Shared libraries for Boost C++ regular expressions.
97 %description regex -l pl
98 Biblioteka wyra¿eñ regularnych dla C++, biblioteki dzielone.
99
100 %package regex-devel
101 Group:          Libraries
102 Summary:        Boost C++ Regex library headers and static libraries
103 Summary(pl):    Nag³ówki i statyczne biblioteki Boost C++ Regex
104 Requires:       %{name}-regex = %{version}
105
106 %description regex-devel
107 %description regex-devel -l pl
108 Nag³ówi i statyczne biblioteki dla Boost C++ Regex
109
110 %package doc
111 Summary:        Boost C++ Library documentation
112 Group:          Libraries
113 Requires:       %{name}-devel = %{version}
114
115 %description doc
116 Documentation for the Boost C++ Library
117
118 %description doc
119 Dokumentacja dla biblioteki Boost C++
120
121 %prep
122 rm -rf $RPM_BUILD_ROOT
123
124 %setup -n boost-%{version} -q
125
126 %build
127 %if %{?_with_python:1}%{!?_with_python:0}
128 PYTHON_VERSION=`python -V 2>&1 | sed 's,.* \([0-9]\.[0-9]\)\(\.[0-9]\)\?.*,\1,'`
129 PYTHON_ROOT=%{_prefix}
130 %else
131 PYTHON_ROOT=
132 PYTHON_VERSION=
133 %endif
134 bjam -sBUILD=release -sPYTHON_ROOT=$PYTHON_ROOT -sPYTHON_VERSION=$PYTHON_VERSION
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 rm -f master.list regex.list regex-devel.list python.list devel.list python-devel.list doc.list
139 # include files
140 install -d $RPM_BUILD_ROOT%{_includedir}
141 for i in `find boost -type d`; do
142         install -d $RPM_BUILD_ROOT%{_includedir}/$i
143 done
144 for i in `find boost -type f`; do
145         install -m 644 $i $RPM_BUILD_ROOT%{_includedir}/$i
146         if test "`echo $i | sed 's,python,,g'`" = "$i"; then
147                 echo %{_includedir}/$i >> devel.list
148         else
149                 echo %{_includedir}/$i >> python-devel.list
150         fi
151 done
152 # static libraries
153 install -d $RPM_BUILD_ROOT%{_libdir}
154 for i in `find libs -type f -name '*.a' | grep gcc`; do
155         install -m 644 $i $RPM_BUILD_ROOT%{_libdir}/`basename $i`
156         if test "`echo $i | sed 's,python,,g'`" = "$i"; then
157                 echo %{_libdir}/`basename $i` >> devel.list
158         else
159                 echo %{_libdir}/`basename $i` >> python-devel.list
160         fi
161 done
162
163
164 # dynamic libraries
165 for i in `find libs -type f -name '*.so.%{version}' | grep gcc`; do
166         install -m 755 $i $RPM_BUILD_ROOT%{_libdir}/`basename $i`
167         #ldconfig fails to generate the symlinks for boost libs :-(
168         LINK=`basename $i | sed 's,\.so\..*,.so,'`
169         (cd $RPM_BUILD_ROOT%{_libdir} && ln -s `basename $i` $LINK)
170         if test "`echo $i | sed 's,python,,g'`" = "$i"; then
171                 echo %{_libdir}/`basename $i` >> master.list
172                 echo %{_libdir}/$LINK >> master.list
173         else
174                 echo %{_libdir}/`basename $i` >> python.list
175                 echo %{_libdir}/$LINK >> python.list
176         fi
177 done
178
179 #regex library
180 grep libboost_regex.so master.list > regex.list
181 grep -v libboost_regex.so master.list >_master.list
182 mv _master.list master.list
183
184 RFILES="%{_includedir}/boost/cregex.hpp|"
185 RFILES="$RFILES%{_includedir}/boost/regex/|"
186 RFILES="$RFILES%{_includedir}/boost/regex.h(pp){0,1}|"
187 RFILES="$RFILES%{_includedir}/boost/regex_fwd.hpp|"
188 RFILES="$RFILES%{_libdir}/libboost_regex.a"
189
190 egrep "$RFILES"   devel.list > regex-devel.list
191 egrep -v "$RFILES"  devel.list > _devel.list
192 mv _devel.list devel.list
193
194
195
196 # documentation
197 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
198 install README $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
199
200 # as the documentation doesn't completely reside in a directory of its
201 # own, we need to find out ourselves... this looks for HTML files and
202 # then collects everything linked from those.  this is certainly quite
203 # unoptimized wrt mkdir calls, but does it really matter?
204 for i in `find -type f -name '*.htm*'`; do
205         # bjam docu is included in the boost-jam RPM
206         if test "`echo $i | sed 's,jam_src,,'`" = "$i"; then
207                 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/`dirname $i`
208                 for LINKED in `perl - $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i <<'EOT'
209                         sub rewrite_link
210                         {
211                                 my $link = shift;
212                                 # rewrite links from boost/* to %{_includedir}/boost/* and
213                                 # ignore external links as well as document-internal ones.
214                                 # HTML files are also ignored as they get installed anyway.
215                                 if (!($link =~ s,^(?:../)*boost/,%{_includedir}/boost/,) && !($link =~ m,(?:^[^/]+:|^\#|\.html?(?:$|\#)),))
216                                 {
217                                         (my $file = $link) =~ s/\#.*//;
218                                         print "$file\n";
219                                 }
220                                 $link;
221                         }
222                         open IN, @ARGV[0];
223                         open OUT, ">@ARGV[1]";
224             my $in_link;
225                         while (<IN>)
226                         {
227                 $in_link and s/^\s*"([^"> ]*)"/'"' . rewrite_link($1) . '"'/e;
228                                 s/(href|src)="([^"> ]*)"/"$1=\"" . rewrite_link($2) . '"'/eig;
229                                 print OUT;
230                 $in_link = /href|src=\s*$/;
231                         }
232 EOT`; do
233                         TARGET=`dirname $i`/$LINKED
234                         # ignore non-existant linked files
235                         if test -f $TARGET; then
236                                 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/`dirname $TARGET`
237                                 install -m 644 $TARGET $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$TARGET
238                         fi
239                 done
240         fi
241 done
242
243 %clean
244 rm -rf $RPM_BUILD_ROOT
245
246 %post -p /sbin/ldconfig
247
248 %postun -p /sbin/ldconfig
249
250 %if %{?_with_python:1}%{!?_with_python:0}
251 %post python -p /sbin/ldconfig
252
253 %postun python -p /sbin/ldconfig
254 %endif
255
256 %files -f master.list
257 %defattr(644,root,root,755)
258
259 %if %{?_with_python:1}%{!?_with_python:0}
260 %files python -f python.list
261 %defattr(644,root,root,755)
262 %endif
263
264
265
266 %files devel -f devel.list
267 %defattr(644,root,root,755)
268 %dir %{_includedir}/boost
269 %dir %{_includedir}/boost/bind
270 %dir %{_includedir}/boost/compatibility
271 %dir %{_includedir}/boost/compatibility/cpp_c_headers
272 %dir %{_includedir}/boost/config
273 %dir %{_includedir}/boost/config/compiler
274 %dir %{_includedir}/boost/config/platform
275 %dir %{_includedir}/boost/config/stdlib
276 %dir %{_includedir}/boost/date_time
277 %dir %{_includedir}/boost/date_time/gregorian
278 %dir %{_includedir}/boost/date_time/posix_time
279 %dir %{_includedir}/boost/detail
280 %dir %{_includedir}/boost/filesystem
281 %dir %{_includedir}/boost/format
282 %dir %{_includedir}/boost/function
283 %dir %{_includedir}/boost/function/detail
284 %dir %{_includedir}/boost/graph
285 %dir %{_includedir}/boost/graph/detail
286 %dir %{_includedir}/boost/integer
287 %dir %{_includedir}/boost/io
288 %dir %{_includedir}/boost/lambda
289 %dir %{_includedir}/boost/lambda/detail
290 %dir %{_includedir}/boost/math
291 %dir %{_includedir}/boost/math/special_functions
292 %dir %{_includedir}/boost/mpl
293 %dir %{_includedir}/boost/mpl/aux_
294 %dir %{_includedir}/boost/mpl/aux_/config
295 %dir %{_includedir}/boost/mpl/aux_/preprocessed
296 %dir %{_includedir}/boost/mpl/aux_/preprocessed/bcc
297 %dir %{_includedir}/boost/mpl/aux_/preprocessed/bcc551
298 %dir %{_includedir}/boost/mpl/aux_/preprocessed/gcc
299 %dir %{_includedir}/boost/mpl/aux_/preprocessed/msvc60
300 %dir %{_includedir}/boost/mpl/aux_/preprocessed/msvc70
301 %dir %{_includedir}/boost/mpl/aux_/preprocessed/mwcw
302 %dir %{_includedir}/boost/mpl/aux_/preprocessed/no_ctps
303 %dir %{_includedir}/boost/mpl/aux_/preprocessed/no_ttp
304 %dir %{_includedir}/boost/mpl/aux_/preprocessed/plain
305 %dir %{_includedir}/boost/mpl/aux_/preprocessor
306 %dir %{_includedir}/boost/mpl/aux_/range_c
307 %dir %{_includedir}/boost/mpl/limits
308 %dir %{_includedir}/boost/mpl/list
309 %dir %{_includedir}/boost/mpl/list/aux_
310 %dir %{_includedir}/boost/mpl/list/aux_/preprocessed
311 %dir %{_includedir}/boost/mpl/list/aux_/preprocessed/plain
312 %dir %{_includedir}/boost/mpl/math
313 %dir %{_includedir}/boost/mpl/vector
314 %dir %{_includedir}/boost/mpl/vector/aux_
315 %dir %{_includedir}/boost/mpl/vector/aux_/preprocessed
316 %dir %{_includedir}/boost/mpl/vector/aux_/preprocessed/no_ctps
317 %dir %{_includedir}/boost/mpl/vector/aux_/preprocessed/plain
318 %dir %{_includedir}/boost/mpl/vector/aux_/preprocessed/typeof_based
319 %dir %{_includedir}/boost/multi_array
320 %dir %{_includedir}/boost/numeric
321 %dir %{_includedir}/boost/numeric/interval
322 %dir %{_includedir}/boost/numeric/interval/compare
323 %dir %{_includedir}/boost/numeric/interval/detail
324 %dir %{_includedir}/boost/numeric/interval/ext
325 %dir %{_includedir}/boost/numeric/ublas
326 %dir %{_includedir}/boost/pending
327 %dir %{_includedir}/boost/pending/detail
328 %dir %{_includedir}/boost/pool
329 %dir %{_includedir}/boost/pool/detail
330 %dir %{_includedir}/boost/preprocessor
331 %dir %{_includedir}/boost/preprocessor/arithmetic
332 %dir %{_includedir}/boost/preprocessor/arithmetic/detail
333 %dir %{_includedir}/boost/preprocessor/array
334 %dir %{_includedir}/boost/preprocessor/comparison
335 %dir %{_includedir}/boost/preprocessor/config
336 %dir %{_includedir}/boost/preprocessor/control
337 %dir %{_includedir}/boost/preprocessor/control/detail
338 %dir %{_includedir}/boost/preprocessor/control/detail/edg
339 %dir %{_includedir}/boost/preprocessor/control/detail/msvc
340 %dir %{_includedir}/boost/preprocessor/debug
341 %dir %{_includedir}/boost/preprocessor/detail
342 %dir %{_includedir}/boost/preprocessor/facilities
343 %dir %{_includedir}/boost/preprocessor/iteration
344 %dir %{_includedir}/boost/preprocessor/iteration/detail
345 %dir %{_includedir}/boost/preprocessor/iteration/detail/bounds
346 %dir %{_includedir}/boost/preprocessor/iteration/detail/iter
347 %dir %{_includedir}/boost/preprocessor/list
348 %dir %{_includedir}/boost/preprocessor/list/detail
349 %dir %{_includedir}/boost/preprocessor/list/detail/edg
350 %dir %{_includedir}/boost/preprocessor/logical
351 %dir %{_includedir}/boost/preprocessor/punctuation
352 %dir %{_includedir}/boost/preprocessor/repetition
353 %dir %{_includedir}/boost/preprocessor/repetition/detail
354 %dir %{_includedir}/boost/preprocessor/repetition/detail/edg
355 %dir %{_includedir}/boost/preprocessor/repetition/detail/msvc
356 %dir %{_includedir}/boost/preprocessor/selection
357 %dir %{_includedir}/boost/preprocessor/seq
358 %dir %{_includedir}/boost/preprocessor/seq/detail
359 %dir %{_includedir}/boost/preprocessor/slot
360 %dir %{_includedir}/boost/preprocessor/slot/detail
361 %dir %{_includedir}/boost/preprocessor/tuple
362 %dir %{_includedir}/boost/random
363 %dir %{_includedir}/boost/random/detail
364 %dir %{_includedir}/boost/regex
365 %dir %{_includedir}/boost/regex/v3
366 %dir %{_includedir}/boost/signals
367 %dir %{_includedir}/boost/signals/detail
368 %dir %{_includedir}/boost/spirit
369 %dir %{_includedir}/boost/spirit/attribute
370 %dir %{_includedir}/boost/spirit/core
371 %dir %{_includedir}/boost/spirit/core/composite
372 %dir %{_includedir}/boost/spirit/core/composite/impl
373 %dir %{_includedir}/boost/spirit/core/impl
374 %dir %{_includedir}/boost/spirit/core/meta
375 %dir %{_includedir}/boost/spirit/core/meta/impl
376 %dir %{_includedir}/boost/spirit/core/non_terminal
377 %dir %{_includedir}/boost/spirit/core/non_terminal/impl
378 %dir %{_includedir}/boost/spirit/core/primitives
379 %dir %{_includedir}/boost/spirit/core/primitives/impl
380 %dir %{_includedir}/boost/spirit/core/scanner
381 %dir %{_includedir}/boost/spirit/core/scanner/impl
382 %dir %{_includedir}/boost/spirit/debug
383 %dir %{_includedir}/boost/spirit/debug/impl
384 %dir %{_includedir}/boost/spirit/dynamic
385 %dir %{_includedir}/boost/spirit/dynamic/impl
386 %dir %{_includedir}/boost/spirit/error_handling
387 %dir %{_includedir}/boost/spirit/error_handling/impl
388 %dir %{_includedir}/boost/spirit/iterator
389 %dir %{_includedir}/boost/spirit/iterator/impl
390 %dir %{_includedir}/boost/spirit/phoenix
391 %dir %{_includedir}/boost/spirit/symbols
392 %dir %{_includedir}/boost/spirit/symbols/impl
393 %dir %{_includedir}/boost/spirit/tree
394 %dir %{_includedir}/boost/spirit/tree/impl
395 %dir %{_includedir}/boost/spirit/utility
396 %dir %{_includedir}/boost/spirit/utility/impl
397 %dir %{_includedir}/boost/spirit/utility/impl/chset
398 %dir %{_includedir}/boost/test
399 %dir %{_includedir}/boost/test/detail
400 %dir %{_includedir}/boost/test/included
401 %dir %{_includedir}/boost/thread
402 %dir %{_includedir}/boost/thread/detail
403 %dir %{_includedir}/boost/tuple
404 %dir %{_includedir}/boost/tuple/detail
405 %dir %{_includedir}/boost/type_traits
406 %dir %{_includedir}/boost/type_traits/detail
407 %dir %{_includedir}/boost/utility
408
409 %if %{?_with_python:1}%{!?_with_python:0}
410 %files python-devel -f python-devel.list
411 %defattr(644,root,root,755)
412 %endif
413
414 %files doc
415 %defattr(644,root,root,755)
416 %doc %{_docdir}/boost-%{version}
417
418 %files regex -f regex.list
419 %defattr(644,root,root,755)
420
421 %files regex-devel -f regex-devel.list
422 %defattr(644,root,root,755)
This page took 0.071121 seconds and 4 git commands to generate.