-further adjust the perl filelist

- move netsnmp_check inside %check
- get rid of %major_ver macro
This commit is contained in:
Jan Šafránek 2009-11-27 13:33:35 +00:00
parent 8d8a8d4a72
commit 0731da1655
1 changed files with 13 additions and 15 deletions

View File

@ -4,21 +4,19 @@
%{!?netsnmp_tcp_wrappers:%define netsnmp_tcp_wrappers 1}
# use nestnmp_check 0 to speed up packaging by disabling 'make test'
%{!?netsnmp_check: %define netsnmp_check 1}
# Arches on which we need to prevent arch conflicts on net-snmp-config.h
%define multilib_arches %{ix86} ia64 ppc ppc64 s390 s390x x86_64 sparc sparcv9 sparc64
%define major_ver 5.5
Summary: A collection of SNMP protocol tools and libraries
Name: net-snmp
Version: %{major_ver}
Version: 5.5
Release: 3%{?dist}
Epoch: 1
License: BSD and MIT
Group: System Environment/Daemons
URL: http://net-snmp.sourceforge.net/
Source0: http://dl.sourceforge.net/net-snmp/net-snmp-%{major_ver}.tar.gz
Source0: http://dl.sourceforge.net/net-snmp/net-snmp-%{version}.tar.gz
Source1: net-snmp.redhat.conf
Source2: net-snmpd.init
Source3: net-snmptrapd.init
@ -46,7 +44,7 @@ BuildRequires: libselinux-devel, elfutils-libelf-devel, rpm-devel
BuildRequires: perl-devel, perl(ExtUtils::Embed), gawk, procps
BuildRequires: python-devel, python-setuptools
BuildRequires: chrpath
# for netstat, needed by 'make tests'
# for netstat, needed by 'make test'
BuildRequires: net-tools
%ifnarch s390 s390x
BuildRequires: lm_sensors-devel >= 3
@ -151,7 +149,7 @@ Net-SNMP toolkit library.
%prep
%setup -q -n %{name}-%{major_ver}
%setup -q
%ifnarch ia64
%patch1 -p1 -b .pie
@ -257,19 +255,17 @@ rm -f ${RPM_BUILD_ROOT}/%{_bindir}/fixproc
rm -f ${RPM_BUILD_ROOT}/%{_mandir}/man1/fixproc*
rm -f ${RPM_BUILD_ROOT}/%{_bindir}/ipf-mod.pl
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.la
# remove docs that do not apply to Linux
rm -f README.aix README.hpux11 README.osX README.Panasonic_AM3X.txt README.solaris README.win32
# copy missing mib2c.conf files
install -m 644 local/mib2c.*.conf ${RPM_BUILD_ROOT}%{_datadir}/snmp
# remove special perl files
find $RPM_BUILD_ROOT -name perllocal.pod \
-o -name .packlist \
-o -name "*.bs" \
-o -name Makefile.subs.pl \
| xargs -ri rm -f {}
# remove docs that do not apply to Linux
rm -f README.aix README.hpux11 README.osX README.Panasonic_AM3X.txt README.solaris README.win32
# copy missing mib2c.conf files
install -m 644 local/mib2c.*.conf ${RPM_BUILD_ROOT}%{_datadir}/snmp
# install python module
pushd python
@ -291,11 +287,12 @@ done
chmod 644 local/passtest local/ipf-mod.pl
%if %{netsnmp_check}
%check
%if %{netsnmp_check}
LD_LIBRARY_PATH=${RPM_BUILD_ROOT}/%{_libdir} make test
%endif
%post
/sbin/chkconfig --add snmpd
/sbin/chkconfig --add snmptrapd
@ -380,7 +377,8 @@ rm -rf ${RPM_BUILD_ROOT}
%attr(0644,root,root) %{_mandir}/man[15]/mib2c*
%attr(0644,root,root) %{_mandir}/man3/*.3pm.*
%attr(0644,root,root) %{_mandir}/man1/traptoemail*.1*
%{perl_vendorarch}/*
%{perl_vendorarch}/*SNMP*
%{perl_vendorarch}/auto/*SNMP*
%files python
%defattr(-,root,root,-)