diff --git a/iputils.spec b/iputils.spec index a01665d..3a2668d 100644 --- a/iputils.spec +++ b/iputils.spec @@ -42,6 +42,12 @@ Requires(preun): /sbin/chkconfig Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units +BuildRequires: systemd-units +Conflicts: filesystem < 3 +Provides: /bin/ping +Provides: /bin/ping6 +Provides: /sbin/arping +Provides: /sbin/rdisc %description The iputils package contains basic utilities for monitoring a network, @@ -97,24 +103,23 @@ make -C doc man rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} -mkdir -p ${RPM_BUILD_ROOT}/{bin,sbin} -mkdir -p $RPM_BUILD_ROOT/lib/systemd/system +mkdir -p ${RPM_BUILD_ROOT}%{_bindir} +mkdir -p $RPM_BUILD_ROOT/%{_unitdir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -c clockdiff ${RPM_BUILD_ROOT}%{_sbindir}/ -install -cp arping ${RPM_BUILD_ROOT}/sbin/ -ln -s /sbin/arping ${RPM_BUILD_ROOT}%{_sbindir}/arping -install -cp ping ${RPM_BUILD_ROOT}/bin/ -install -cp ifenslave ${RPM_BUILD_ROOT}/sbin/ -install -cp rdisc ${RPM_BUILD_ROOT}/sbin/ -install -cp ping6 ${RPM_BUILD_ROOT}/bin/ -install -cp tracepath ${RPM_BUILD_ROOT}/bin/ -install -cp tracepath6 ${RPM_BUILD_ROOT}/bin/ +install -cp arping ${RPM_BUILD_ROOT}%{_sbindir}/ +install -cp ping ${RPM_BUILD_ROOT}%{_bindir}/ +install -cp ifenslave ${RPM_BUILD_ROOT}%{_sbindir}/ +install -cp rdisc ${RPM_BUILD_ROOT}%{_sbindir}/ +install -cp ping6 ${RPM_BUILD_ROOT}%{_bindir}/ +install -cp tracepath ${RPM_BUILD_ROOT}%{_bindir}/ +install -cp tracepath6 ${RPM_BUILD_ROOT}%{_bindir}/ mkdir -p ${RPM_BUILD_ROOT}%{_bindir} -ln -sf /bin/ping6 ${RPM_BUILD_ROOT}%{_sbindir} -ln -sf /bin/tracepath ${RPM_BUILD_ROOT}%{_sbindir} -ln -sf /bin/tracepath6 ${RPM_BUILD_ROOT}%{_sbindir} +ln -sf ../bin/ping6 ${RPM_BUILD_ROOT}%{_sbindir} +ln -sf ../bin/tracepath ${RPM_BUILD_ROOT}%{_sbindir} +ln -sf ../bin/tracepath6 ${RPM_BUILD_ROOT}%{_sbindir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 install -cp doc/clockdiff.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/ @@ -129,14 +134,14 @@ ln -s tracepath.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8/tracepath6.8.gz install -dp ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d install -m 755 -p %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/rdisc install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rdisc -install -m 644 %SOURCE4 ${RPM_BUILD_ROOT}/lib/systemd/system +install -m 644 %SOURCE4 ${RPM_BUILD_ROOT}/%{_unitdir} iconv -f ISO88591 -t UTF8 RELNOTES -o RELNOTES.tmp touch -r RELNOTES RELNOTES.tmp mv -f RELNOTES.tmp RELNOTES %post -/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || : %preun if [ $1 = 0 ]; then @@ -145,7 +150,7 @@ if [ $1 = 0 ]; then fi %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || : if [ "$1" -ge "1" ]; then /bin/systemctl try-restart rdisc.service >/dev/null 2>&1 || : @@ -164,16 +169,16 @@ rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %doc RELNOTES README.bonding -/lib/systemd/system/rdisc.service +%{_unitdir}/rdisc.service %{_sbindir}/clockdiff -/sbin/arping %{_sbindir}/arping -%attr(0755,root,root) %caps(cap_net_raw=ep) /bin/ping -/sbin/ifenslave -/sbin/rdisc -%attr(0755,root,root) %caps(cap_net_raw=ep) /bin/ping6 -/bin/tracepath -/bin/tracepath6 +%{_sbindir}/arping +%attr(0755,root,root) %caps(cap_net_raw=ep) %{_bindir}/ping +%{_sbindir}/ifenslave +%{_sbindir}/rdisc +%attr(0755,root,root) %caps(cap_net_raw=ep) %{_bindir}/ping6 +%{_bindir}/tracepath +%{_bindir}/tracepath6 %{_sbindir}/ping6 %{_sbindir}/tracepath %{_sbindir}/tracepath6