boost/boost.spec

changeset 496
c4f4c533995f
child 497
3695593c147a
equal deleted inserted replaced
-1:000000000000 0:ec82b6557279
1 ##
2 ## boost.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
23
24 # package version
25 %define V_openpkg 1.49.0
26 %define V_dist 1_49_0
27
28 # package information
29 Name: boost
30 Summary: Peer-Reviewed Portable C++ Libraries
31 URL: http://www.boost.org/
32 Vendor: Boost Community
33 Packager: OpenPKG Foundation e.V.
34 Distribution: OpenPKG Community
35 Class: EVAL
36 Group: Language
37 License: Boost Software License
38 Version: %{V_openpkg}
39 Release: 20120722
40
41 # package options
42 %option with_debug yes
43 %option with_optimize yes
44 %option with_threads yes
45 %option with_zlib yes
46 %option with_bzip2 yes
47
48 # list of sources
49 Source0: http://switch.dl.sourceforge.net/boost/boost_%{V_dist}.tar.bz2
50 Patch0: boost.patch
51
52 # build information
53 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes
54 PreReq: OpenPKG, openpkg >= 20100101
55 %if "%{with_zlib}" == "yes"
56 BuildPreReq: zlib
57 PreReq: zlib
58 %endif
59 %if "%{with_bzip2}" == "yes"
60 BuildPreReq: bzip2
61 PreReq: bzip2
62 %endif
63
64 %description
65 Boost provides peer-reviewed portable C++ class libraries, placing
66 emphasis on libraries which work well with the C++ Standard
67 Library. The libraries are intended to be widely useful, and are in
68 regular use by thousands of programmers across a broad spectrum of
69 applications.
70
71 Aiming to provide missing functionality in current standards,
72 Boost was begun by members of the C++ Standards Committee Library
73 Working Group. Today, logic from a subset of the boost collection is
74 under review by the ISO C++ Standards Committee and considered for
75 inclusion in its future standards documents.
76
77 %track
78 prog boost = {
79 version = %{V_dist}
80 url = http://sourceforge.net/projects/boost/files/
81 regex = boost_(\d+_\d+\_\d+)\.tar\.bz2
82 }
83
84 %prep
85 %setup -q -n boost_%{V_dist}
86 %patch -p0
87
88 %build
89 # bootstrap bjam(1), the boost build system
90 ./bootstrap.sh \
91 --prefix=%{l_prefix} \
92 --exec-prefix=%{l_prefix} \
93 --includedir=%{l_prefix}/include \
94 --libdir=%{l_prefix}/lib \
95 --without-libraries=python
96
97 %{l_shtool} mkdir -p obj
98
99 # configure build options for bjam(1) -sBUILD parameter
100 debugopts="release"
101 optimizeopts="<optimization>off"
102 threadopts="<threading>single"
103 %if "%{with_debug}" == "yes"
104 debugopts="$debugopts debug"
105 %endif
106 %if "%{with_optimize}" == "yes"
107 optimizeopts="<optimization>speed <inlining>full"
108 %endif
109 %if "%{with_threads}" == "yes"
110 threadopts="<threading>single/multi"
111 %endif
112
113 # build all libraries
114 ./b2 --toolset=gcc --layout=system --builddir=obj "-sBUILD=$debugopts $optimizeopts $threadopts" \
115 %if "%{with_zlib}" == "yes"
116 "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \
117 %else
118 "-sNOZLIB=1" \
119 %endif
120 %if "%{with_bzip2}" == "yes"
121 "-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \
122 %else
123 "-sNOBZIP2=1" \
124 %endif
125 link=static stage
126
127 %install
128 ./bjam --toolset=gcc --layout=system --prefix=$RPM_BUILD_ROOT%{l_prefix} \
129 %if "%{with_zlib}" == "yes"
130 "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \
131 %else
132 "-sNOZLIB=1" \
133 %endif
134 %if "%{with_bzip2}" == "yes"
135 "-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \
136 %else
137 "-sNOBZIP2=1" \
138 %endif
139 install
140 rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/boost-*
141 find $RPM_BUILD_ROOT%{l_prefix}/lib/ \
142 -name "*.so" -print -o \
143 -name "libboost_*.so.%{V_openpkg}" \
144 -print | xargs rm -f
145 %{l_shtool} mkdir -f -p -m 755 \
146 $RPM_BUILD_ROOT%{l_prefix}/bin
147 %{l_shtool} install -c -m 755 \
148 bjam $RPM_BUILD_ROOT%{l_prefix}/bin/
149 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
150
151 %files -f files
152
153 %clean
154

mercurial