|
|
@@ -33,7 +33,7 @@ Distribution: OpenPKG [PLUS]
|
|
|
Group: Network
|
|
|
License: BSD
|
|
|
Version: 5.0.8
|
|
|
-Release: 20030703
|
|
|
+Release: 20030704
|
|
|
|
|
|
# package options
|
|
|
%option with_fsl yes
|
|
|
@@ -65,6 +65,7 @@ AutoReqProv: no
|
|
|
SNMP; etc.
|
|
|
|
|
|
%prep
|
|
|
+ # unpack and patch package
|
|
|
%setup -q -n net-snmp-%{version}
|
|
|
%{l_shtool} subst \
|
|
|
-e 's;/usr/include/rpm;%{l_prefix}/include/rpm;g' \
|
|
|
@@ -76,6 +77,7 @@ AutoReqProv: no
|
|
|
configure
|
|
|
|
|
|
%build
|
|
|
+ # configure package
|
|
|
./configure \
|
|
|
--with-cc="%{l_cc}" \
|
|
|
--with-cflags="%{l_cflags -O}" \
|
|
|
@@ -90,11 +92,15 @@ AutoReqProv: no
|
|
|
--with-mib-modules="host" \
|
|
|
%endif
|
|
|
--with-defaults
|
|
|
+
|
|
|
+ # build package
|
|
|
%{l_make} %{l_mflags} touchit
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
+
|
|
|
+ # install package
|
|
|
%{l_shtool} subst -v \
|
|
|
-e "s;^\\(prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
|
|
|
-e "s;^\\(exec_prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
|
|
|
@@ -102,23 +108,27 @@ AutoReqProv: no
|
|
|
`find . -type f -name Makefile -print`
|
|
|
%{l_make} %{l_mflags} install
|
|
|
|
|
|
+ # create additional directories
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/%{name} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/snmp \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/snmp
|
|
|
|
|
|
+ # install default configuration
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
%{SOURCE snmpd.conf} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/snmp/
|
|
|
|
|
|
+ # strip down installation
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/snmpinform
|
|
|
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ipf-mod.pl
|
|
|
ln $RPM_BUILD_ROOT%{l_prefix}/bin/snmptrap \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/snmpinform
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
|
|
|
|
|
|
- # Creating run-command script
|
|
|
+ # creating run-command script
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
%{l_shtool} install -c -m 755 \
|