boost/boost.spec

changeset 496
c4f4c533995f
child 497
3695593c147a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/boost/boost.spec	Thu Aug 09 18:52:06 2012 +0200
     1.3 @@ -0,0 +1,154 @@
     1.4 +##
     1.5 +##  boost.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   package version
    1.28 +%define       V_openpkg    1.49.0
    1.29 +%define       V_dist       1_49_0
    1.30 +
    1.31 +#   package information
    1.32 +Name:         boost
    1.33 +Summary:      Peer-Reviewed Portable C++ Libraries
    1.34 +URL:          http://www.boost.org/
    1.35 +Vendor:       Boost Community
    1.36 +Packager:     OpenPKG Foundation e.V.
    1.37 +Distribution: OpenPKG Community
    1.38 +Class:        EVAL
    1.39 +Group:        Language
    1.40 +License:      Boost Software License
    1.41 +Version:      %{V_openpkg}
    1.42 +Release:      20120722
    1.43 +
    1.44 +#   package options
    1.45 +%option       with_debug     yes
    1.46 +%option       with_optimize  yes
    1.47 +%option       with_threads   yes
    1.48 +%option       with_zlib      yes
    1.49 +%option       with_bzip2     yes
    1.50 +
    1.51 +#   list of sources
    1.52 +Source0:      http://switch.dl.sourceforge.net/boost/boost_%{V_dist}.tar.bz2
    1.53 +Patch0:       boost.patch
    1.54 +
    1.55 +#   build information
    1.56 +BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes
    1.57 +PreReq:       OpenPKG, openpkg >= 20100101
    1.58 +%if "%{with_zlib}" == "yes"
    1.59 +BuildPreReq:  zlib
    1.60 +PreReq:       zlib
    1.61 +%endif
    1.62 +%if "%{with_bzip2}" == "yes"
    1.63 +BuildPreReq:  bzip2
    1.64 +PreReq:       bzip2
    1.65 +%endif
    1.66 +
    1.67 +%description
    1.68 +    Boost provides peer-reviewed portable C++ class libraries, placing
    1.69 +    emphasis on libraries which work well with the C++ Standard
    1.70 +    Library. The libraries are intended to be widely useful, and are in
    1.71 +    regular use by thousands of programmers across a broad spectrum of
    1.72 +    applications.
    1.73 +
    1.74 +    Aiming to provide missing functionality in current standards,
    1.75 +    Boost was begun by members of the C++ Standards Committee Library
    1.76 +    Working Group. Today, logic from a subset of the boost collection is
    1.77 +    under review by the ISO C++ Standards Committee and considered for
    1.78 +    inclusion in its future standards documents.
    1.79 +
    1.80 +%track
    1.81 +    prog boost = {
    1.82 +        version   = %{V_dist}
    1.83 +        url       = http://sourceforge.net/projects/boost/files/
    1.84 +        regex     = boost_(\d+_\d+\_\d+)\.tar\.bz2
    1.85 +    }
    1.86 +
    1.87 +%prep
    1.88 +    %setup -q -n boost_%{V_dist}
    1.89 +    %patch -p0
    1.90 +
    1.91 +%build
    1.92 +    #   bootstrap bjam(1), the boost build system
    1.93 +    ./bootstrap.sh \
    1.94 +        --prefix=%{l_prefix} \
    1.95 +        --exec-prefix=%{l_prefix} \
    1.96 +        --includedir=%{l_prefix}/include \
    1.97 +        --libdir=%{l_prefix}/lib \
    1.98 +        --without-libraries=python
    1.99 +
   1.100 +    %{l_shtool} mkdir -p obj
   1.101 +
   1.102 +    #   configure build options for bjam(1) -sBUILD parameter
   1.103 +    debugopts="release"
   1.104 +    optimizeopts="<optimization>off"
   1.105 +    threadopts="<threading>single"
   1.106 +%if "%{with_debug}" == "yes"
   1.107 +    debugopts="$debugopts debug"
   1.108 +%endif
   1.109 +%if "%{with_optimize}" == "yes"
   1.110 +    optimizeopts="<optimization>speed <inlining>full"
   1.111 +%endif
   1.112 +%if "%{with_threads}" == "yes"
   1.113 +    threadopts="<threading>single/multi"
   1.114 +%endif
   1.115 +
   1.116 +    #   build all libraries
   1.117 +    ./b2 --toolset=gcc --layout=system --builddir=obj "-sBUILD=$debugopts $optimizeopts $threadopts" \
   1.118 +%if "%{with_zlib}" == "yes"
   1.119 +        "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \
   1.120 +%else
   1.121 +        "-sNOZLIB=1" \
   1.122 +%endif
   1.123 +%if "%{with_bzip2}" == "yes"
   1.124 +        "-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \
   1.125 +%else
   1.126 +        "-sNOBZIP2=1" \
   1.127 +%endif
   1.128 +        link=static stage
   1.129 +
   1.130 +%install
   1.131 +    ./bjam --toolset=gcc --layout=system --prefix=$RPM_BUILD_ROOT%{l_prefix} \
   1.132 +%if "%{with_zlib}" == "yes"
   1.133 +        "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \
   1.134 +%else
   1.135 +        "-sNOZLIB=1" \
   1.136 +%endif
   1.137 +%if "%{with_bzip2}" == "yes"
   1.138 +        "-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \
   1.139 +%else
   1.140 +        "-sNOBZIP2=1" \
   1.141 +%endif
   1.142 +        install
   1.143 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/boost-*
   1.144 +    find $RPM_BUILD_ROOT%{l_prefix}/lib/ \
   1.145 +        -name "*.so" -print -o \
   1.146 +        -name "libboost_*.so.%{V_openpkg}" \
   1.147 +        -print | xargs rm -f
   1.148 +    %{l_shtool} mkdir -f -p -m 755 \
   1.149 +        $RPM_BUILD_ROOT%{l_prefix}/bin
   1.150 +    %{l_shtool} install -c -m 755 \
   1.151 +        bjam $RPM_BUILD_ROOT%{l_prefix}/bin/
   1.152 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   1.153 +
   1.154 +%files -f files
   1.155 +
   1.156 +%clean
   1.157 +

mercurial