Changes of Revision 18
[-] | Added | boost.spec |
x 1
2 +# 3 +# spec file for package boost (Version 1.34.1) 4 +# 5 +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. 6 +# This file and all modifications and additions to the pristine 7 +# package are under the same license as the package itself. 8 +# 9 +# Please submit bugfixes or comments via http://bugs.opensuse.org/ 10 +# 11 + 12 +# norootforbuild 13 + 14 +Name: boost 15 +%define file_version 1_34_1 16 +%define man_version 1.33.1 17 +%define man_file_version 1_33_1 18 +BuildRequires: boost-jam >= 3.1.14 dos2unix gcc-c++ libbz2-devel libicu-devel python-devel xorg-x11-devel 19 +%if 0%suse_version > 1020 20 +BuildRequires: fdupes 21 +%endif 22 +URL: http://www.boost.org 23 +License: BSD 3-Clause 24 +Group: Development/Libraries/C and C++ 25 +Summary: Boost C++ Libraries 26 +BuildRoot: %{_tmppath}/%{name}-%{version}-build 27 +Version: 1.34.1 28 +Release: 2 29 +Source0: %{name}_%{file_version}.tar.bz2 30 +Source1: boost-rpmlintrc 31 +Source2: boost_%{man_file_version}_man.tar.bz2 32 +Source3: existing_extra_docs 33 +Patch0: boost-threading.patch 34 +Patch1: boost-thread.patch 35 +Patch2: boost-no_type_punning.patch 36 +Patch3: boost-ia64.patch 37 +Patch4: boost-visit_each.diff 38 +Patch5: boost-pass_BJAM_CONFIG.patch 39 +Patch6: boost-use_rpm_optflags.patch 40 +Patch7: boost-fix_doc_url.patch 41 +Patch8: boost-no_segfault_in_Regex_filter.patch 42 +Patch9: boost-no_segfault_on_dir_iteration.patch 43 +Patch10: boost-fix_documentation.patch 44 +Patch11: boost-Boost.Function.patch 45 +Patch12: boost-missing_includes.patch 46 +Patch13: boost-no_intrinsic_int64_t.patch 47 +Patch14: boost-codecleanup.patch 48 +%define _prefix /usr 49 + 50 +%description 51 +Boost provides free peer-reviewed portable C++ source libraries. The 52 +emphasis is on libraries that work well with the C++ Standard Library. 53 +One goal is to establish "existing practice" and provide reference 54 +implementations so that the Boost libraries are suitable for eventual 55 +standardization. Some of the libraries have already been proposed for 56 +inclusion in the C++ Standards Committee's upcoming C++ Standard 57 +Library Technical Report. 58 + 59 +Although Boost was begun by members of the C++ Standards Committee 60 +Library Working Group, membership has expanded to include nearly two 61 +thousand members of the C++ community at large. 62 + 63 +This package contains the dynamic libraries. For development using 64 +Boost, you also need the boost-devel package. For documentation, see 65 +the boost-doc package. 66 + 67 + 68 + 69 +%package devel 70 +Summary: Development package for Boost C++ 71 +Group: Development/Libraries/C and C++ 72 +Requires: %{name} = %{version} 73 +Autoreqprov: on 74 + 75 +%description devel 76 +This package contains all that is needed to develop/compile 77 +applications that use the Boost C++ libraries. For documentation see 78 +the package boost-doc. 79 + 80 + 81 + 82 +%package doc 83 +Summary: Documentation for the Boost C++ Libraries 84 +Group: Development/Libraries/C and C++ 85 +Requires: %{name}-devel = %{version} 86 +Autoreqprov: on 87 + 88 +%description doc 89 +This package contains documentation about the boost dynamic libraries. 90 + 91 + 92 + 93 +%prep 94 +%setup -q -n %{name}_%{file_version} -a 2 95 +find -name .cvsignore|xargs rm -f 96 +#everything in the tarball has the executable flag set ...... 97 +find -type f| xargs chmod -x 98 +find -name \*.sh -o -name \*.py -o -name \*.pl|xargs chmod +x 99 +%patch 100 +%patch1 101 +%patch2 102 +%patch3 103 +%patch4 104 +%patch5 105 +%patch6 106 +%patch7 107 +%patch8 108 +%patch9 109 +%patch10 110 +%patch11 111 +%patch12 112 +%patch13 113 +%patch14 114 +%patch15 115 +chmod +x configure 116 + 117 +%build 118 +%define bjam_config -d2 --layout=system %{?jobs:-j%jobs} 119 +find . -type f|xargs chmod u+w 120 +# Now build it 121 +BUILD_FLAGS="--with-toolset=gcc --prefix=%{buildroot}/usr --libdir=%{buildroot}%{_libdir} --with-bjam=/usr/bin/bjam" 122 +PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]') 123 +PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION" 124 +REGEX_FLAGS="--with-icu" 125 +BJAM_TARGET=rpm 126 +BJAM_CONFIG="%{bjam_config}" BJAM_TARGET="$BJAM_TARGET" ./configure $BUILD_FLAGS $PYTHON_FLAGS $REGEX_FLAGS 127 +export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-deprecated" 128 +make all 129 + 130 +%install 131 +mkdir -p %{buildroot}%{_libdir} 132 +mkdir -p %{buildroot}%{_includedir} 133 +mkdir -p %{buildroot}%{_docdir}/boost-%{version} 134 +# install lib 135 +for i in `find stage -type f -name \*.a`; do 136 + NAME=`basename $i`; 137 + install -p -m 0644 $i %{buildroot}%{_libdir}/$NAME; 138 +done; 139 +for lib in `find stage -type f -name \*.so`; do 140 + NAME=$lib; 141 + SONAME=$lib.2; 142 + VNAME=$lib.%{version}; 143 + base=$(basename $lib); 144 + NAMEbase=$base; 145 + SONAMEbase=$base.2; 146 + VNAMEbase=$base.%{version}; 147 + mv $lib $VNAME; 148 + ln -s $VNAMEbase $SONAME; 149 + ln -s $VNAMEbase $NAME; 150 + install -p -m 755 $VNAME %{buildroot}%{_libdir}/$VNAMEbase; 151 + mv $SONAME %{buildroot}%{_libdir}/$SONAMEbase; 152 + mv $NAME %{buildroot}%{_libdir}/$NAMEbase; 153 +done; 154 +# install include files 155 +for i in $(find boost -type d); do 156 + mkdir -p %{buildroot}%{_includedir}/$i 157 +done 158 +for i in $(find boost -type f); do 159 + install -p -m 644 $i %{buildroot}%{_includedir}/$i 160 +done 161 +chmod +x %{buildroot}%{_includedir}/boost/signals/detail/gen_signal_N.pl \ 162 + %{buildroot}%{_includedir}/boost/pool/detail/pool_construct_simple.sh \ 163 + %{buildroot}%{_includedir}/boost/pool/detail/pool_construct.sh \ 164 + %{buildroot}%{_includedir}/boost/function/gen_function_N.pl \ 165 + %{buildroot}%{_includedir}/boost/function/detail/gen_maybe_include.pl 166 +#install the man pages 167 +install -d %buildroot/%{_mandir}/man3 168 +install -d %buildroot/%{_mandir}/man7 169 +pushd boost-%{man_version}/doc/man 170 +for page in $(find . -type f); do 171 + install -p -m 644 $page %buildroot/%{_mandir}/$page 172 +done 173 +popd 174 +#install doc files 175 +dos2unix libs/ptr_container/doc/tutorial_example.html \ 176 + libs/ptr_container/doc/style.css \ 177 + libs/parameter/doc/html/reference.html \ 178 + libs/parameter/doc/html/index.html \ 179 + libs/iostreams/doc/tree/tree.js \ 180 + libs/graph/doc/lengauer_tarjan_dominator.htm 181 +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 - 182 +rm -rf %{buildroot}%{_docdir}/boost-%{version}/boost 183 +ln -s /usr/include/boost %{buildroot}%{_docdir}/boost-%{version}/ 184 +ln -s ../LICENSE_1_0.txt %{buildroot}%{_docdir}/boost-%{version}/libs 185 +#only for documentation, don't need to be executable 186 +find %{buildroot}%{_docdir}/boost-%{version} -name \*.py| xargs chmod -x 187 +#symlink dupes 188 + 189 +%if 0%suse_version > 1020 190 +%fdupes %buildroot 191 +%endif 192 + 193 +%post 194 +%run_ldconfig 195 + 196 +%postun 197 +%run_ldconfig 198 + 199 +%files 200 +%defattr(-, root, root, -) 201 |