Install docs to %{_pkgdocdir} where available.

This commit is contained in:
Ville Skyttä 2013-07-29 22:12:50 +03:00
parent f359002b9f
commit 1b7eda09c1

View File

@ -1,8 +1,9 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
Name: python-iniparse
Version: 0.4
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Python Module for Accessing and Modifying Configuration Data in INI files
Group: Development/Libraries
License: MIT
@ -30,6 +31,7 @@ use.
%prep
%setup -q -n iniparse-%{version}
%patch0 -p1
chmod -c -x html/index.html
%build
%{__python} setup.py build
@ -37,9 +39,7 @@ use.
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
# fixes
chmod 644 $RPM_BUILD_ROOT//usr/share/doc/iniparse-%{version}/index.html
mv $RPM_BUILD_ROOT/usr/share/doc/iniparse-%{version} $RPM_BUILD_ROOT/usr/share/doc/python-iniparse-%{version}
mv $RPM_BUILD_ROOT/usr/share/doc/iniparse-%{version} $RPM_BUILD_ROOT%{_pkgdocdir}
%clean
rm -rf $RPM_BUILD_ROOT
@ -47,13 +47,15 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%dir %{_docdir}/python-iniparse-%{version}
%doc %{_docdir}/python-iniparse-%{version}/*
%doc %{_pkgdocdir}
%{python_sitelib}/*
%changelog
* Mon Jul 29 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.4-8
- Install docs to %%{_pkgdocdir} where available.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild