- lm_sensors-devel (#229109)

- spec file cleanups
This commit is contained in:
Radek Vokál 2007-02-23 15:52:06 +00:00
parent a14c973e57
commit d877272e7c
1 changed files with 20 additions and 23 deletions

View File

@ -7,13 +7,13 @@
Summary: A collection of SNMP protocol tools and libraries
Name: net-snmp
Version: %{major_ver}
Release: 8%{?dist}
Release: 9%{?dist}
Epoch: 1
License: BSDish
Group: System Environment/Daemons
URL: http://net-snmp.sourceforge.net/
Source0: ftp://net-snmp.sourceforge.net/net-snmp-%{major_ver}.tar.gz
Source0: http://dl.sourceforge.net/net-snmp/net-snmp-%{major_ver}.tar.gz
Source1: net-snmp.redhat.conf
Source2: net-snmpd.init
Source3: net-snmptrapd.init
@ -38,8 +38,11 @@ Patch13: net-snmp-5.4-ethtool-config.patch
Patch14: net-snmp-5.4-free.patch
Requires(pre): /sbin/chkconfig
Obsoletes: ucd-snmp
BuildRoot: %{_tmppath}/%{name}-root
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(preun): /bin/rm
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openssl-devel, bzip2-devel, beecrypt-devel, elfutils-devel
BuildRequires: libselinux-devel, elfutils-libelf-devel
%ifarch %{ix86} x86_64
@ -66,13 +69,12 @@ 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
Summary: Network management utilities using SNMP, from the NET-SNMP project.
Requires: %{name} = %{epoch}:%{version}
Obsoletes: ucd-snmp-utils
%description utils
The net-snmp-utils package contains various utilities for use with the
@ -86,12 +88,12 @@ package.
Group: Development/Libraries
Summary: The development environment for the NET-SNMP project.
Requires: %{name} = %{epoch}:%{version}
Obsoletes: ucd-snmp-devel
Requires: beecrypt-devel, elfutils-devel, rpm-devel, elfutils-libelf-devel
Requires: lm_sensors-devel
%if %{tcp_wrappers}
Requires: tcp_wrappers-devel
%endif
Requires: lm_sensors-devel
%description devel
The net-snmp-devel package contains the development libraries and
@ -126,8 +128,6 @@ and applications.
%prep
%setup -q -n %{name}-%{major_ver}
%patch1 -p1 -b .mnttab
#default aclocal is ugly!!!!
#%patch2 -p1 -b .libtool
%patch2 -p1 -b .ipv6-sock-close
%patch3 -p1 -b .readonly
@ -169,6 +169,7 @@ export LIBDIR="%{_libdir}"
ucd-snmp/diskio disman/event disman/schedule tcp-mib udp-mib mibII/mta_sendmail" \
%else
--with-mib-modules="host agentx smux" \
ucd-snmp/diskio disman/event disman/schedule tcp-mib udp-mib mibII/mta_sendmail" \
%endif
%if %{tcp_wrappers}
--with-libwrap=%{_libdir} \
@ -184,15 +185,16 @@ export LIBDIR="%{_libdir}"
--with-sys-contact="root@localhost" <<EOF
EOF
#exit 0
make
make %{?smp_mflags}
pushd perl
# Use just built libs for perl module building, not the system libs.
export NETSNMP_DONT_CHECK_VERSION=1
perl Makefile.PL -NET-SNMP-IN-SOURCE=true PREFIX=${RPM_BUILD_ROOT}/%{_prefix} INSTALLDIRS=vendor -NET-SNMP-CONFIG="sh ../../net-snmp-config"
perl -pi -e 's/^LD_RUN_PATH.*//;s/LD_RUN_PATH=\".*\" //;' default_store/Makefile OID/Makefile agent/Makefile agent/default_store/Makefile ASN/Makefile SNMP/Makefile
make
make %{?smp_mflags}
popd
%install
@ -246,11 +248,6 @@ pushd perl
make install_vendor
eval $(perl '-V:installvendorarch')
# Urgs, what an evil hack. Brrr.
#%if "%{_libdir}" == "/usr/lib64"
#installvendorarch=`echo $installvendorarch | sed 's/lib/lib64/'`
#%endif
# remove special files
find $RPM_BUILD_ROOT -name perllocal.pod \
-o -name .packlist \
@ -258,10 +255,6 @@ find $RPM_BUILD_ROOT -name perllocal.pod \
-o -name Makefile.subs.pl \
| xargs -ri rm -f {}
# no empty directories
#find $RPM_BUILD_ROOT/$installvendorarch \
# -depth -type d -a -empty -exec rmdir {} \;
# build files list
find $RPM_BUILD_ROOT/$installvendorarch -type f -print \
-o -type d -a -printf '%%%%dir %%p\n' \
@ -313,10 +306,10 @@ rm -rf ${RPM_BUILD_ROOT}
%doc AGENT.txt COPYING ChangeLog.trimmed EXAMPLE.conf FAQ NEWS PORTING README* TODO
%doc local/passtest local/README.mib2c local/ipf-mod.pl
%dir %{_sysconfdir}/snmp
%config(noreplace,missingok) %{_sysconfdir}/snmp/snmpd.conf
%config(noreplace) %{_initrddir}/snmpd
%config(noreplace) %{_initrddir}/snmptrapd
%{_initrddir}/snmpd
%{_initrddir}/snmptrapd
%config(noreplace) %{_sysconfdir}/logrotate.d/snmpd
%config(noreplace,missingok) %{_sysconfdir}/snmp/snmpd.conf
%{_datadir}/snmp
%{_bindir}/ucd5820stat
%{_sbindir}/*
@ -359,6 +352,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_libdir}/lib*.so.*
%changelog
* Fri Feb 23 2007 Radek Vokál <rvokal@redhat.com> - 5.4-9
- fix dependency on lm_sensors-devel (#229109)
- spec file cleanups
* Tue Jan 23 2007 Radek Vokál <rvokal@redhat.com> - 5.4-8
- fix occasional segfaults when snmpd starts