%define perlname SNMP_Session %define perlver 1.03 %define perlprefix %{buildroot}%{_prefix} %define perlmake %(perl -e 'print (($]<5.008)?"":"PREFIX=%{perlprefix}")') %define perlinst %(perl -e 'print (($]<5.008)?"PREFIX=%{perlprefix}":"")') Summary: Simple SNMP modules for Perl Name: perl-%{perlname} Version: %{perlver} Release: 1 Group: Utilities/Text License: Artistic #Source: ftp://ftp.switch.ch/software/sources/network/snmp/perl/SNMP_Session-%{version}.tar.gz Source: http://www.switch.ch/misc/leinen/snmp/perl/dist/SNMP_Session-%{version}.tar.gz URL: http://www.switch.ch/misc/leinen/snmp/perl/ Requires: perl BuildPreReq: perl BuildArch: noarch BuildRoot: /var/tmp/%{name}-root %description This archive contains Perl 5 modules SNMP_Session.pm and BER.pm, which, when used together, provide rudimentary access to remote SNMP (v1) agents. This module differs from existing SNMP packages in that it is completely stand-alone, i.e. you don't need to have another SNMP package such as CMU SNMP. It is also written entirely in Perl, so you don't have to compile any C modules. It uses the Perl 5 Socket.pm module and should therefore be very portable, even to non-Unix systems. %prep %setup -q -n %{perlname}-%{perlver} perl Makefile.PL OPTIMIZE="%{optflags}" %{perlmake} < /dev/null %build make %install rm -rf %{buildroot} make pure_install %{perlinst} find %{buildroot} -type f |\ xargs perl -pi -e 's!%{buildroot}!!g' find %{buildroot} -name .packlist -print | xargs rm -f %define filelist %{perlname}-%{perlver}-filelist [ -x %{_libdir}/rpm/brp-compress ] && %{_libdir}/rpm/brp-compress find %{buildroot}%{_prefix} -type f -print |\ perl -pe 's!%{buildroot}!!g' > %{filelist} %clean rm -rf %{buildroot} %files -f %{filelist} %defattr (-, root, root) %doc README* index.html %changelog * Fri Apr 30 2004 Chris Adams 1.03-1 - initial build