[packages/libhsts] - rename man bcond to pandoc and install pre-built man pages on x32 - rel 3

baggins baggins at pld-linux.org
Sun Jan 19 13:37:18 CET 2020


commit 0723f2a9c3738470cdbf33e8bb8185508f6dd58a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Jan 19 13:34:59 2020 +0100

    - rename man bcond to pandoc and install pre-built man pages on x32
    - rel 3

 libhsts.spec | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/libhsts.spec b/libhsts.spec
index 663b0f0..95f2bf1 100644
--- a/libhsts.spec
+++ b/libhsts.spec
@@ -1,22 +1,22 @@
 #
 # Conditional build:
-%bcond_with	man		# build man pages (requires pandoc)
+%bcond_with	pandoc		# build man pages with pandoc
 %bcond_without	tests		# build without tests
 #
 %ifarch x32
-%undefine	with_man
+%undefine	with_pandoc
 %endif
 Summary:	C library to access the HSTS preload list
 Name:		libhsts
 Version:	0.1.0
-Release:	2
+Release:	3
 License:	BSD
 Group:		Libraries
 Source0:	https://gitlab.com/rockdaboot/libhsts/uploads/4753f61b5a3c6253acf4934217816e3f/%{name}-%{version}.tar.gz
 # Source0-md5:	5599c8b2530df6b26ed5e766a8d9ed3c
 URL:		https://gitlab.com/rockdaboot/libhsts
 BuildRequires:	doxygen
-%{?with_man:BuildRequires:	pandoc}
+%{?with_pandoc:BuildRequires:	pandoc}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -87,6 +87,12 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%if %{without pandoc}
+install -d $RPM_BUILD_ROOT%{_mandir}/man{1,3}
+cp -p docs/man/man1/hsts*.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p docs/man/man3/libhsts.3 $RPM_BUILD_ROOT%{_mandir}/man3
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -99,10 +105,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/hsts
 %attr(755,root,root) %{_libdir}/libhsts.so.*.*
 %attr(755,root,root) %ghost %{_libdir}/libhsts.so.0
-%if %{with man}
 %{_mandir}/man1/hsts.1*
 %{_mandir}/man1/hsts-make-dafsa.1*
-%endif
 
 %files devel
 %defattr(644,root,root,755)
@@ -110,9 +114,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/libhsts.h
 %{_libdir}/libhsts.la
 %{_pkgconfigdir}/libhsts.pc
-%if %{with man}
 %{_mandir}/man3/libhsts.3*
-%endif
 
 %files static
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libhsts.git/commitdiff/0723f2a9c3738470cdbf33e8bb8185508f6dd58a



More information about the pld-cvs-commit mailing list