stlport/stlport.spec

Thu, 08 Jan 2009 01:12:39 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 08 Jan 2009 01:12:39 +0100
changeset 32
d5a681e1cbad
child 33
fa4856f209c2
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

michael@32 1 ##
michael@32 2 ## stlport.spec -- OpenPKG RPM Package Specification
michael@32 3 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@32 4 ##
michael@32 5 ## Permission to use, copy, modify, and distribute this software for
michael@32 6 ## any purpose with or without fee is hereby granted, provided that
michael@32 7 ## the above copyright notice and this permission notice appear in all
michael@32 8 ## copies.
michael@32 9 ##
michael@32 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@32 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@32 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@32 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@32 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@32 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@32 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@32 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@32 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@32 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@32 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@32 21 ## SUCH DAMAGE.
michael@32 22 ##
michael@32 23
michael@32 24 # package information
michael@32 25 Name: stlport
michael@32 26 Summary: C++ Standard Template Library
michael@32 27 URL: http://www.stlport.org/
michael@32 28 Vendor: Boris Fomitchev et al.
michael@32 29 Packager: OpenPKG Foundation e.V.
michael@32 30 Distribution: OpenPKG Community
michael@32 31 Class: EVAL
michael@32 32 Group: Language
michael@32 33 License: STLport
michael@32 34 Version: 5.0.2
michael@32 35 Release: 20080101
michael@32 36
michael@32 37 # package options
michael@32 38 %option with_debug yes
michael@32 39
michael@32 40 # list of sources
michael@32 41 Source0: http://switch.dl.sourceforge.net/stlport/STLport-%{version}.tar.gz
michael@32 42
michael@32 43 # build information
michael@32 44 Prefix: %{l_prefix}
michael@32 45 BuildRoot: %{l_buildroot}
michael@32 46 BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
michael@32 47 PreReq: OpenPKG, openpkg >= 20040130, gcc
michael@32 48 AutoReq: no
michael@32 49 AutoReqProv: no
michael@32 50
michael@32 51 %description
michael@32 52 STLport is a reimplementation of the classic SGI C++ Standard
michael@32 53 Template Library (STL), introducing unique features like Debug mode
michael@32 54 and Safe STL. It offers higher portability while complying with
michael@32 55 standards and retaining full functionality.
michael@32 56
michael@32 57 The Standard Template Library (STL) is a C++ library of container
michael@32 58 classes, algorithms, and iterators providing many of the basic
michael@32 59 algorithms and data structures of computer science.
michael@32 60
michael@32 61 %track
michael@32 62 prog stlport = {
michael@32 63 version = %{version}
michael@32 64 url = http://prdownloads.sourceforge.net/stlport/
michael@32 65 regex = STLport-(\d+\.\d+\.\d+)\.tar\.gz
michael@32 66 }
michael@32 67
michael@32 68 %prep
michael@32 69 %setup -q -n STLport
michael@32 70 %{l_shtool} subst \
michael@32 71 -e 's;\(define _STLP_NATIVE_INCLUDE_PATH\).*;\1 %{l_prefix}/include/g++;' \
michael@32 72 stlport/config/stl_gcc.h
michael@32 73 %{l_shtool} subst \
michael@32 74 -e 's;^\(# if defined (__QNXNTO__) || ( defined(__GNUC__)\) && defined(__APPLE__);\1;' \
michael@32 75 src/num_put_float.cpp
michael@32 76
michael@32 77 %build
michael@32 78 buildtargets="release-static"
michael@32 79 %if "%{with_debug}" == "yes"
michael@32 80 buildtargets="$buildtargets dbg-static stldbg-static"
michael@32 81 %endif
michael@32 82 cd build/lib && %{l_make} %{l_mflags} -f gcc.mak $buildtargets
michael@32 83
michael@32 84 %install
michael@32 85 rm -rf $RPM_BUILD_ROOT
michael@32 86 %{l_shtool} mkdir -f -p -m 755 \
michael@32 87 $RPM_BUILD_ROOT%{l_prefix}/include
michael@32 88 ( cd build/lib
michael@32 89 installtargets="install-release-static"
michael@32 90 %if "%{with_debug}" == "yes"
michael@32 91 installtargets="$installtargets install-dbg-static install-stldbg-static"
michael@32 92 %endif
michael@32 93 %{l_make} %{l_mflags} -f gcc.mak $installtargets \
michael@32 94 INSTALL="%{l_shtool}"" install -c" \
michael@32 95 INSTALL_LIB_DIR="$RPM_BUILD_ROOT%{l_prefix}/lib" \
michael@32 96 INSTALL_LIB_DIR_DBG="$RPM_BUILD_ROOT%{l_prefix}/lib" \
michael@32 97 INSTALL_LIB_DIR_STLDBG="$RPM_BUILD_ROOT%{l_prefix}/lib"
michael@32 98 ) || exit $?
michael@32 99 rm -rf stlport/BC50 stlport/config/new_compiler
michael@32 100 %{l_tar} cf - stlport | (cd $RPM_BUILD_ROOT%{l_prefix}/include && %{l_tar} xf -) || exit $?
michael@32 101 chmod -R a+r $RPM_BUILD_ROOT%{l_prefix}/include/stlport
michael@32 102 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@32 103
michael@32 104 %files -f files
michael@32 105
michael@32 106 %clean
michael@32 107 rm -rf $RPM_BUILD_ROOT
michael@32 108

mercurial