Search
j0ke.net Open Build Service
>
Projects
>
devel
:
libs
>
boost
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 18
[-]
[+]
Added
boost.spec
@@ -0,0 +1,492 @@ +# +# spec file for package boost (Version 1.34.1) +# +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: boost +%define file_version 1_34_1 +%define man_version 1.33.1 +%define man_file_version 1_33_1 +BuildRequires: boost-jam >= 3.1.14 dos2unix gcc-c++ libbz2-devel libicu-devel python-devel xorg-x11-devel +%if 0%suse_version > 1020 +BuildRequires: fdupes +%endif +URL: http://www.boost.org +License: BSD 3-Clause +Group: Development/Libraries/C and C++ +Summary: Boost C++ Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Version: 1.34.1 +Release: 2 +Source0: %{name}_%{file_version}.tar.bz2 +Source1: boost-rpmlintrc +Source2: boost_%{man_file_version}_man.tar.bz2 +Source3: existing_extra_docs +Patch0: boost-threading.patch +Patch1: boost-thread.patch +Patch2: boost-no_type_punning.patch +Patch3: boost-ia64.patch +Patch4: boost-visit_each.diff +Patch5: boost-pass_BJAM_CONFIG.patch +Patch6: boost-use_rpm_optflags.patch +Patch7: boost-fix_doc_url.patch +Patch8: boost-no_segfault_in_Regex_filter.patch +Patch9: boost-no_segfault_on_dir_iteration.patch +Patch10: boost-fix_documentation.patch +Patch11: boost-Boost.Function.patch +Patch12: boost-missing_includes.patch +Patch13: boost-no_intrinsic_int64_t.patch +Patch14: boost-codecleanup.patch +%define _prefix /usr + +%description +Boost provides free peer-reviewed portable C++ source libraries. The +emphasis is on libraries that work well with the C++ Standard Library. +One goal is to establish "existing practice" and provide reference +implementations so that the Boost libraries are suitable for eventual +standardization. Some of the libraries have already been proposed for +inclusion in the C++ Standards Committee's upcoming C++ Standard +Library Technical Report. + +Although Boost was begun by members of the C++ Standards Committee +Library Working Group, membership has expanded to include nearly two +thousand members of the C++ community at large. + +This package contains the dynamic libraries. For development using +Boost, you also need the boost-devel package. For documentation, see +the boost-doc package. + + + +%package devel +Summary: Development package for Boost C++ +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} +Autoreqprov: on + +%description devel +This package contains all that is needed to develop/compile +applications that use the Boost C++ libraries. For documentation see +the package boost-doc. + + + +%package doc +Summary: Documentation for the Boost C++ Libraries +Group: Development/Libraries/C and C++ +Requires: %{name}-devel = %{version} +Autoreqprov: on + +%description doc +This package contains documentation about the boost dynamic libraries. + + + +%prep +%setup -q -n %{name}_%{file_version} -a 2 +find -name .cvsignore|xargs rm -f +#everything in the tarball has the executable flag set ...... +find -type f| xargs chmod -x +find -name \*.sh -o -name \*.py -o -name \*.pl|xargs chmod +x +%patch +%patch1 +%patch2 +%patch3 +%patch4 +%patch5 +%patch6 +%patch7 +%patch8 +%patch9 +%patch10 +%patch11 +%patch12 +%patch13 +%patch14 +%patch15 +chmod +x configure + +%build +%define bjam_config -d2 --layout=system %{?jobs:-j%jobs} +find . -type f|xargs chmod u+w +# Now build it +BUILD_FLAGS="--with-toolset=gcc --prefix=%{buildroot}/usr --libdir=%{buildroot}%{_libdir} --with-bjam=/usr/bin/bjam" +PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]') +PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION" +REGEX_FLAGS="--with-icu" +BJAM_TARGET=rpm +BJAM_CONFIG="%{bjam_config}" BJAM_TARGET="$BJAM_TARGET" ./configure $BUILD_FLAGS $PYTHON_FLAGS $REGEX_FLAGS +export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-deprecated" +make all + +%install +mkdir -p %{buildroot}%{_libdir} +mkdir -p %{buildroot}%{_includedir} +mkdir -p %{buildroot}%{_docdir}/boost-%{version} +# install lib +for i in `find stage -type f -name \*.a`; do + NAME=`basename $i`; + install -p -m 0644 $i %{buildroot}%{_libdir}/$NAME; +done; +for lib in `find stage -type f -name \*.so`; do + NAME=$lib; + SONAME=$lib.2; + VNAME=$lib.%{version}; + base=$(basename $lib); + NAMEbase=$base; + SONAMEbase=$base.2; + VNAMEbase=$base.%{version}; + mv $lib $VNAME; + ln -s $VNAMEbase $SONAME; + ln -s $VNAMEbase $NAME; + install -p -m 755 $VNAME %{buildroot}%{_libdir}/$VNAMEbase; + mv $SONAME %{buildroot}%{_libdir}/$SONAMEbase; + mv $NAME %{buildroot}%{_libdir}/$NAMEbase; +done; +# install include files +for i in $(find boost -type d); do + mkdir -p %{buildroot}%{_includedir}/$i +done +for i in $(find boost -type f); do + install -p -m 644 $i %{buildroot}%{_includedir}/$i +done +chmod +x %{buildroot}%{_includedir}/boost/signals/detail/gen_signal_N.pl \ + %{buildroot}%{_includedir}/boost/pool/detail/pool_construct_simple.sh \ + %{buildroot}%{_includedir}/boost/pool/detail/pool_construct.sh \ + %{buildroot}%{_includedir}/boost/function/gen_function_N.pl \ + %{buildroot}%{_includedir}/boost/function/detail/gen_maybe_include.pl +#install the man pages +install -d %buildroot/%{_mandir}/man3 +install -d %buildroot/%{_mandir}/man7 +pushd boost-%{man_version}/doc/man +for page in $(find . -type f); do + install -p -m 644 $page %buildroot/%{_mandir}/$page +done +popd +#install doc files +dos2unix libs/ptr_container/doc/tutorial_example.html \ + libs/ptr_container/doc/style.css \ + libs/parameter/doc/html/reference.html \ + libs/parameter/doc/html/index.html \ + libs/iostreams/doc/tree/tree.js \ + libs/graph/doc/lengauer_tarjan_dominator.htm +tar --files-from=%{S:3} -cf - $(find . -name \*.htm\* -o -name \*.gif -o -name \*.css -o -name \*.jpg -o -name \*.png -o -name \*.ico) | tar -C %{buildroot}%{_docdir}/boost-%{version} -xf - +rm -rf %{buildroot}%{_docdir}/boost-%{version}/boost +ln -s /usr/include/boost %{buildroot}%{_docdir}/boost-%{version}/ +ln -s ../LICENSE_1_0.txt %{buildroot}%{_docdir}/boost-%{version}/libs +#only for documentation, don't need to be executable +find %{buildroot}%{_docdir}/boost-%{version} -name \*.py| xargs chmod -x +#symlink dupes + +%if 0%suse_version > 1020 +%fdupes %buildroot +%endif + +%post +%run_ldconfig + +%postun +%run_ldconfig + +%files +%defattr(-, root, root, -)