spec file cleanups

This commit is contained in:
Radek Vokál 2006-11-28 12:51:46 +00:00
parent 1354a251f3
commit 7cae732405
1 changed files with 40 additions and 40 deletions

View File

@ -4,7 +4,7 @@
%define multilib_arches %{ix86} ia64 ppc ppc64 s390 s390x x86_64
%define major_ver 5.4
Summary: A collection of SNMP protocol tools and libraries.
Summary: A collection of SNMP protocol tools and libraries
Name: net-snmp
Version: %{major_ver}
Release: 1%{?dist}
@ -32,21 +32,21 @@ Patch7: net-snmp-5.2.1-file_offset.patch
Patch8: net-snmp-5.3.1-multilib.patch
Patch9: net-snmp-5.4-config_libdir.patch
Prereq: /sbin/chkconfig
Requires(pre): /sbin/chkconfig
Obsoletes: ucd-snmp
BuildRoot: %{_tmppath}/%{name}-root
BuildPrereq: openssl-devel, bzip2-devel, beecrypt-devel, elfutils-devel
BuildPrereq: libselinux-devel, elfutils-libelf-devel
BuildRequires: openssl-devel, bzip2-devel, beecrypt-devel, elfutils-devel
BuildRequires: libselinux-devel, elfutils-libelf-devel
%ifarch %{ix86} x86_64
BuildPrereq: lm_sensors-devel
BuildRequires: lm_sensors-devel
%endif
%if %{tcp_wrappers}
BuildPrereq: tcp_wrappers
BuildRequires: tcp_wrappers
%endif
BuildPrereq: perl, coreutils, grep, sed, findutils
BuildRequires: perl, coreutils, grep, sed, findutils
#%define __libtoolize /bin/true
%{expand: %%define _includedir %{_includedir}/%{name}}
%{expand: %%define _includedir %{_includedir}/%{name}}
%description
SNMP (Simple Network Management Protocol) is a protocol used for
@ -61,7 +61,7 @@ You will probably also want to install the net-snmp-utils package,
which contains NET-SNMP utilities.
Building option:
--without tcp_wrappers : disable tcp_wrappers support
--without tcp_wrappers : disable tcp_wrappers support
%package utils
Group: Applications/System
@ -141,30 +141,30 @@ export LDFLAGS="-L%{_libdir}"
%endif
export LIBDIR="%{_libdir}"
%configure \
--enable-static --enable-shared \
--with-cflags="$RPM_OPT_FLAGS -lcrypto" \
--with-ldflags="$LDFLAGS" \
--with-sys-location="Unknown" \
--with-logfile="/var/log/snmpd.log" \
--with-persistent-directory="/var/net-snmp" \
--enable-static --enable-shared \
--with-cflags="$RPM_OPT_FLAGS -lcrypto" \
--with-ldflags="$LDFLAGS" \
--with-sys-location="Unknown" \
--with-logfile="/var/log/snmpd.log" \
--with-persistent-directory="/var/net-snmp" \
%ifarch %{ix86} x86_64
--with-mib-modules="host agentx smux ucd-snmp/lmSensors \
ucd-snmp/diskio disman/event-mib tcp-mib udp-mib mibII/mta_sendmail" \
--with-mib-modules="host agentx smux ucd-snmp/lmSensors \
ucd-snmp/diskio disman/event-mib tcp-mib udp-mib mibII/mta_sendmail" \
%else
--with-mib-modules="host agentx smux" \
--with-mib-modules="host agentx smux" \
%endif
%if %{tcp_wrappers}
--with-libwrap=%{_libdir} \
--with-libwrap=%{_libdir} \
%endif
--sysconfdir=%{_sysconfdir} \
--enable-ipv6 \
--enable-ucd-snmp-compatibility \
--with-openssl \
--with-pic \
--enable-embedded-perl \
--enable-mfd-rewrites \
--enable-local-smux \
--with-sys-contact="root@localhost" <<EOF
--sysconfdir=%{_sysconfdir} \
--enable-ipv6 \
--enable-ucd-snmp-compatibility \
--with-openssl \
--with-pic \
--enable-embedded-perl \
--enable-mfd-rewrites \
--enable-local-smux \
--with-sys-contact="root@localhost" <<EOF
EOF
@ -270,12 +270,12 @@ dd bs=1024 count=250 if=ChangeLog of=ChangeLog.trimmed
%preun
if [ $1 = 0 ]; then
service snmpd stop >/dev/null 2>&1
/sbin/chkconfig --del snmpd
service snmptrapd stop >/dev/null 2>&1
/sbin/chkconfig --del snmptrapd
# remove stale autogenerated file
rm -f %{_datadir}/snmp/mibs/.index
service snmpd stop >/dev/null 2>&1
/sbin/chkconfig --del snmpd
service snmptrapd stop >/dev/null 2>&1
/sbin/chkconfig --del snmptrapd
# remove stale autogenerated file
rm -f %{_datadir}/snmp/mibs/.index
fi
%postun
@ -342,7 +342,7 @@ rm -rf ${RPM_BUILD_ROOT}
%{_libdir}/lib*.so.*
%changelog
* Mon Nov 27 2006 Radek Vokál <rvokal@redhat.com> - 5.4-1
* Mon Nov 27 2006 Radek Vokal <rvokal@redhat.com> - 5.4-1
- upgrade to 5.4
- patch cleanup
- snmpd uses /var/run/snmpd.pid (#211264)
@ -806,7 +806,7 @@ rm -rf ${RPM_BUILD_ROOT}
- update to 4.2.4 final
* Sat Apr 13 2002 Phil Knirsch <pknirsch@redhat.com> 4.2.4.pre3-5
- Added some missing files to the %files section.
- Added some missing files to the %%files section.
* Tue Apr 09 2002 Phil Knirsch <pknirsch@redhat.com> 4.2.4.pre3-4
- Hardcoded the ETC_MNTTAB to point to "/etc/mtab".
@ -878,7 +878,7 @@ rm -rf ${RPM_BUILD_ROOT}
* Mon Jun 25 2001 Philipp Knirsch <pknirsch@redhat.de>
- Updated to 4.2.1. Removed 2 obsolete patches (fromcvs and #18153)
- Include /usr/share/snmp/snmpconf in %files
- Include /usr/share/snmp/snmpconf in %%files
* Wed Jun 13 2001 Than Ngo <than@redhat.com>
- fix to use libwrap in distro
@ -913,7 +913,7 @@ rm -rf ${RPM_BUILD_ROOT}
- fixed initscript, for reload and restart it was start then stop,
fixed. (#28477)
* Fri Feb 2 2001 Trond Eivind Glomsrød <teg@redhat.com>
* Fri Feb 2 2001 Trond Eivind Glomsrod <teg@redhat.com>
- i18nize initscript
* Sat Jan 6 2001 Jeff Johnson <jbj@redhat.com>
@ -961,7 +961,7 @@ rm -rf ${RPM_BUILD_ROOT}
- FHS packaging.
- patch for rpm 4.0.
* Thu May 18 2000 Trond Eivind Glomsrød <teg@redhat.com>
* Thu May 18 2000 Trond Eivind Glomsrod <teg@redhat.com>
- add version to buildroot
- rebuilt with new libraries
@ -975,7 +975,7 @@ rm -rf ${RPM_BUILD_ROOT}
- update to 4.1.1
* Sat Feb 5 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- change %postun to %preun
- change %%postun to %%preun
* Thu Feb 3 2000 Elliot Lee <sopwith@redhat.com>
- Don't ship tkmib, since we don't ship the perl modules needed to run it.