don't build docs for module builds to limit dependencies

This commit is contained in:
Karsten Hopp 2017-05-12 11:32:55 +02:00
parent 3be51cc885
commit dff9153388

View File

@ -3,7 +3,7 @@
Summary: Network monitoring tools including ping
Name: iputils
Version: 20161105
Release: 2%{?dist}
Release: 3%{?dist}
# some parts are under the original BSD (ping.c)
# some are under GPLv2+ (tracepath.c)
License: BSD and GPLv2+
@ -21,7 +21,9 @@ Source5: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
Patch0: iputils-rh.patch
Patch1: iputils-ifenslave.patch
%if ! 0%{?_module_build}
BuildRequires: docbook-utils perl-SGMLSpm
%endif
BuildRequires: glibc-kernheaders >= 2.4-8.19
BuildRequires: libidn-devel
BuildRequires: openssl-devel
@ -68,7 +70,9 @@ export LDFLAGS="-pie -Wl,-z,relro,-z,now"
make %{?_smp_mflags} arping clockdiff ping rdisc tracepath ninfod
gcc -Wall $RPM_OPT_FLAGS $CFLAGS $LDFLAGS ifenslave.c -o ifenslave
%if ! 0%{?_module_build}
make -C doc man
%endif
%install
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
@ -90,6 +94,7 @@ ln -sf ../bin/tracepath ${RPM_BUILD_ROOT}%{_sbindir}/tracepath
ln -sf ../bin/tracepath ${RPM_BUILD_ROOT}%{_sbindir}/tracepath6
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
%if ! 0%{?_module_build}
install -cp doc/clockdiff.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
install -cp doc/arping.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
install -cp doc/ping.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
@ -99,6 +104,7 @@ install -cp doc/ninfod.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
install -cp ifenslave.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
ln -s ping.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8/ping6.8.gz
ln -s tracepath.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8/tracepath6.8.gz
%endif
install -dp ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
install -m 644 %SOURCE2 ${RPM_BUILD_ROOT}/%{_unitdir}
@ -141,6 +147,7 @@ mv -f RELNOTES.tmp RELNOTES
%{_sbindir}/ping6
%{_sbindir}/tracepath
%{_sbindir}/tracepath6
%if ! 0%{?_module_build}
%attr(644,root,root) %{_mandir}/man8/clockdiff.8.gz
%attr(644,root,root) %{_mandir}/man8/arping.8.gz
%attr(644,root,root) %{_mandir}/man8/ping.8.gz
@ -149,13 +156,19 @@ mv -f RELNOTES.tmp RELNOTES
%attr(644,root,root) %{_mandir}/man8/tracepath.8.gz
%{_mandir}/man8/tracepath6.8.gz
%attr(644,root,root) %{_mandir}/man8/ifenslave.8.gz
%endif
%files ninfod
%attr(0755,root,root) %caps(cap_net_raw=ep) %{_sbindir}/ninfod
%{_unitdir}/ninfod.service
%if ! 0%{?_module_build}
%attr(644,root,root) %{_mandir}/man8/ninfod.8.gz
%endif
%changelog
* Fri May 12 2017 Karsten Hopp <karsten@redhat.com> - 20161105-3
- don't build docs for module builds to limit dependencies
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20161105-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild