From 4886bd212fe9ebfc2b334c95dd33d7960b76fb4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Wed, 6 Oct 2021 22:25:30 +0200 Subject: [PATCH] Move documentation to %{_pkgdocdir} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Esser --- pam.spec | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pam.spec b/pam.spec index dbdf88e..0f7ff4c 100644 --- a/pam.spec +++ b/pam.spec @@ -200,6 +200,17 @@ install -m644 -D %{SOURCE15} %{buildroot}%{_prefix}/lib/tmpfiles.d/pam.conf install -m644 -D modules/pam_namespace/pam_namespace.service \ %{buildroot}%{_unitdir}/pam_namespace.service +# Install doc files to unified location. +install -d -m 755 %{buildroot}%{_pkgdocdir}/{adg/html,mwg/html,sag/html,txts} +install -p -m 644 doc/specs/rfc86.0.txt %{buildroot}%{_pkgdocdir} +install -p -m 644 doc/txts/* %{buildroot}%{_pkgdocdir}/txts +for i in adg mwg sag; do + install -p -m 644 doc/$i/*.txt %{buildroot}%{_pkgdocdir}/$i + cp -pr doc/$i/html/* %{buildroot}%{_pkgdocdir}/$i/html +done +find %{buildroot}%{_pkgdocdir} -type d | xargs chmod 755 +find %{buildroot}%{_pkgdocdir} -type f | xargs chmod 644 + %find_lang Linux-PAM %check @@ -334,6 +345,8 @@ done %{_mandir}/man8/* %files devel +%dir %{_pkgdocdir} +%doc %{_pkgdocdir}/rfc86.0.txt %{_includedir}/security %{_mandir}/man3/* %{_libdir}/libpam.so @@ -342,13 +355,9 @@ done %{_libdir}/pkgconfig/pam.pc %{_libdir}/pkgconfig/pam_misc.pc %{_libdir}/pkgconfig/pamc.pc -%doc doc/mwg/*.txt doc/mwg/html -%doc doc/adg/*.txt doc/adg/html -%doc doc/specs/rfc86.0.txt %files doc -%doc doc/txts -%doc doc/sag/*.txt doc/sag/html +%doc %{_pkgdocdir} %posttrans @@ -370,6 +379,7 @@ exit 0 - Remove old cruft from spec file - Rename docs sub-package to doc - Replace $RPM_BUILD_ROOT with %%{buildroot} +- Move documentation to %%{_pkgdocdir} * Thu Sep 23 2021 Björn Esser - 1.5.2-5 - Rebase to pam-redhat-1.1.5