Disable sysvinit subpackage on F23+

This commit is contained in:
Adam Jackson 2015-03-05 15:42:28 -05:00
parent 10b26a97ae
commit 421f08d225
1 changed files with 12 additions and 1 deletions

View File

@ -11,7 +11,7 @@
Summary: A collection of SNMP protocol tools and libraries
Name: net-snmp
Version: 5.7.3
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 1
License: BSD
@ -180,6 +180,7 @@ The 'netsnmp' module provides a full featured, tri-lingual SNMP (SNMPv3,
SNMPv2c, SNMPv1) client API. The 'netsnmp' module internals rely on the
Net-SNMP toolkit library.
%if 0%{?fedora} < 23
%package sysvinit
Group: System Environment/Daemons
Summary: Legacy SysV init scripts for Net-SNMP daemons
@ -187,6 +188,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description sysvinit
The net-snmp-sysvinit package provides SysV init scripts for Net-SNMP daemons.
%endif
%prep
%setup -q
@ -301,9 +303,11 @@ install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp
install -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmpd.conf
install -m 644 %SOURCE6 ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptrapd.conf
%if 0%{?fedora} < 23
install -d ${RPM_BUILD_ROOT}%{_initrddir}
install -m 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_initrddir}/snmpd
install -m 755 %SOURCE3 ${RPM_BUILD_ROOT}%{_initrddir}/snmptrapd
%endif
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 644 %SOURCE7 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/snmpd
@ -403,9 +407,11 @@ LD_LIBRARY_PATH=${RPM_BUILD_ROOT}/%{_libdir} make test
/bin/systemctl try-restart snmpd.service >/dev/null 2>&1 || :
/bin/systemctl try-restart snmptrapd.service >/dev/null 2>&1 || :
%if 0%{?fedora} < 23
%triggerpostun -n net-snmp-sysvinit -- net-snmp < 1:5.7-5
/sbin/chkconfig --add snmpd >/dev/null 2>&1 || :
/sbin/chkconfig --add snmptrapd >/dev/null 2>&1 || :
%endif
%post libs -p /sbin/ldconfig
@ -502,11 +508,16 @@ rm -rf ${RPM_BUILD_ROOT}
%{_libdir}/libnetsnmpmibs*.so.*
%{_libdir}/libnetsnmptrapd*.so.*
%if 0%{?fedora} < 23
%files sysvinit
%{_initrddir}/snmpd
%{_initrddir}/snmptrapd
%endif
%changelog
* Thu Mar 05 2015 Adam Jackson <ajax@redhat.com> 1:5.7.3-2
- Disable sysvinit subpackage on F23+
* Tue Feb 17 2015 Jan Safranek <jsafrane@redhat.com> - 1:5.7.3-1
- Update to 5.7.3