Use _pkgdocdir.

This commit is contained in:
Thomas Moschny 2015-02-06 18:34:45 +01:00
parent 41ed55682f
commit 4083bc6743
1 changed files with 25 additions and 13 deletions

View File

@ -28,6 +28,8 @@ BuildRequires: openssl-devel
# do not check .so files in the python_sitelib directory # do not check .so files in the python_sitelib directory
%global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$ %global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
%description %description
Botan is a BSD-licensed crypto library written in C++. It provides a Botan is a BSD-licensed crypto library written in C++. It provides a
wide variety of basic cryptographic algorithms, X.509 certificates and wide variety of basic cryptographic algorithms, X.509 certificates and
@ -79,7 +81,6 @@ interfaces may change in the future.
%setup -q -n Botan-%{version} %setup -q -n Botan-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
cp -av %{SOURCE1} .
%build %build
@ -98,7 +99,8 @@ cp -av %{SOURCE1} .
--enable-modules=%{enable_modules} \ --enable-modules=%{enable_modules} \
--disable-modules=%{disable_modules} \ --disable-modules=%{disable_modules} \
--with-boost-python \ --with-boost-python \
--with-python-version=%{python_version} --with-python-version=%{python_version} \
--with-sphinx
# (ab)using CXX as an easy way to inject our CXXFLAGS # (ab)using CXX as an easy way to inject our CXXFLAGS
make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags}
@ -109,7 +111,7 @@ make -f Makefile.python \
%install %install
make install \ make install \
DESTDIR=%{buildroot}%{_prefix} \ DESTDIR=%{buildroot}%{_prefix} \
DOCDIR=_doc \ DOCDIR=%{buildroot}%{_pkgdocdir} \
INSTALL_CMD_EXEC="install -p -m 755" \ INSTALL_CMD_EXEC="install -p -m 755" \
INSTALL_CMD_DATA="install -p -m 644" INSTALL_CMD_DATA="install -p -m 644"
@ -119,8 +121,10 @@ make -f Makefile.python install \
# fixups # fixups
find doc/examples -type f -exec chmod -x {} \; find doc/examples -type f -exec chmod -x {} \;
mv doc/examples/python doc/python-examples mv doc/examples/python doc/python-examples
rm _doc/manual/.buildinfo cp -a doc/{examples,python-examples,license.txt} \
rm -r _doc/manual/.doctrees %{buildroot}%{_pkgdocdir}
cp -a %{SOURCE1} %{buildroot}%{_pkgdocdir}
rm -r %{buildroot}%{_pkgdocdir}/manual/{.doctrees,.buildinfo}
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
@ -130,14 +134,15 @@ rm -r _doc/manual/.doctrees
%files %files
%doc _doc/readme.txt %dir %{_pkgdocdir}
%doc doc/license.txt %{_pkgdocdir}/readme.txt
%doc README.fedora %{_pkgdocdir}/license.txt
%{_pkgdocdir}/README.fedora
%{_libdir}/libbotan-%{major_version}.so.* %{_libdir}/libbotan-%{major_version}.so.*
%files devel %files devel
%doc doc/examples %{_pkgdocdir}/examples
%{_bindir}/botan-config-%{major_version} %{_bindir}/botan-config-%{major_version}
%{_includedir}/* %{_includedir}/*
%exclude %{_libdir}/libbotan-%{major_version}.a %exclude %{_libdir}/libbotan-%{major_version}.a
@ -146,13 +151,19 @@ rm -r _doc/manual/.doctrees
%files doc %files doc
%doc _doc/manual %dir %{_pkgdocdir}
%doc _doc/readme.txt %{_pkgdocdir}/manual
%doc doc/license.txt # next files duplicated on purpose, because -doc doesn't depend on the
# main package
%{_pkgdocdir}/readme.txt
%{_pkgdocdir}/license.txt
%{_pkgdocdir}/README.fedora
%files python %files python
%doc doc/python-examples %{_pkgdocdir}/python-examples
%exclude %{_pkgdocdir}/python-examples/*.pyc
%exclude %{_pkgdocdir}/python-examples/*.pyo
%{python_sitearch}/%{name} %{python_sitearch}/%{name}
@ -169,6 +180,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate
%changelog %changelog
* Thu Feb 5 2015 Thomas Moschny <thomas.moschny@gmx.de> - 1.10.9-3 * Thu Feb 5 2015 Thomas Moschny <thomas.moschny@gmx.de> - 1.10.9-3
- Disable gmp engine (see bug 1116406). - Disable gmp engine (see bug 1116406).
- Use _pkgdocdir.
* Thu Feb 5 2015 Thomas Moschny <thomas.moschny@gmx.de> - 1.10.9-2 * Thu Feb 5 2015 Thomas Moschny <thomas.moschny@gmx.de> - 1.10.9-2
- Remove workaround for bug 1186014. - Remove workaround for bug 1186014.