packaging: Make documentation package optional
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Mon, 20 Mar 2017 16:35:25 +0000 (17:35 +0100)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Mon, 12 Feb 2024 15:37:43 +0000 (16:37 +0100)
By default documentation is disabled.

Change-Id: I33648ee019945d47d367e5db3abe84afa3400cc0

packaging/systemd.spec

index c10c7b2..67b3e89 100644 (file)
@@ -11,6 +11,7 @@
 %define WITH_RFKILL 0
 %define with_multiuser 1
 %define WITH_MACHINED 0
+%define WITH_DOC 0
 
 Name:           systemd
 Version:        231
@@ -33,8 +34,10 @@ BuildRequires:  libblkid-devel >= 2.20
 BuildRequires:  libcap-devel
 BuildRequires:  libgcrypt-devel
 BuildRequires:  libkmod-devel >= 14
+%if %{?WITH_DOC}
 BuildRequires:  xsltproc
 BuildRequires:  docbook-xsl-stylesheets
+%endif
 BuildRequires:  pam-devel
 BuildRequires:  pkgconfig
 # BuildRequires:  pkgconfig(dbus-1)     # for remove circular dependency on OBS
@@ -154,6 +157,9 @@ cp %{SOURCE4} .
         --disable-gcrypt \
         --libexecdir=%{_prefix}/lib \
         --docdir=%{_docdir}/systemd \
+%if ! %{?WITH_DOC}
+        --disable-manpages \
+%endif
         --disable-static \
         --with-sysvinit-path= \
         --with-sysvrcnd-path= \
@@ -575,4 +581,6 @@ fi
 %{_prefix}/lib/dbus-tests/test-suites/systemd-tests/
 %{_prefix}/lib/dbus-tests/runner/systemd-tests
 
+%if %{?WITH_DOC}
 %docs_package
+%endif