|
|
@@ -33,21 +33,27 @@ Distribution: OpenPKG [PLUS]
|
|
|
Group: Network
|
|
|
License: BSD
|
|
|
Version: 5.0.8
|
|
|
-Release: 20030429
|
|
|
+Release: 20030703
|
|
|
|
|
|
# package options
|
|
|
+%option with_fsl yes
|
|
|
%option with_host_mib no
|
|
|
|
|
|
# list of sources
|
|
|
Source0: http://osdn.dl.sourceforge.net/net-snmp/net-snmp-%{version}.tar.gz
|
|
|
Source1: rc.snmp
|
|
|
Source2: snmpd.conf
|
|
|
+Source3: fsl.snmp
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20030428, openssl
|
|
|
PreReq: OpenPKG, openpkg >= 20030428
|
|
|
+%if "%{with_fsl}" == "yes"
|
|
|
+BuildPreReq: fsl
|
|
|
+PreReq: fsl
|
|
|
+%endif
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
|
|
|
@@ -73,7 +79,8 @@ AutoReqProv: no
|
|
|
./configure \
|
|
|
--with-cc="%{l_cc}" \
|
|
|
--with-cflags="%{l_cflags -O}" \
|
|
|
- --with-ldflags="%{l_ldflags}" \
|
|
|
+ --with-ldflags="%{l_ldflags} %{l_fsl_ldflags}" \
|
|
|
+ --with-libs="%{l_fsl_libs}" \
|
|
|
--prefix=%{l_prefix} \
|
|
|
--with-persistent-directory=%{l_prefix}/var/snmp \
|
|
|
--with-openssl=%{l_prefix} \
|
|
|
@@ -96,6 +103,7 @@ AutoReqProv: no
|
|
|
%{l_make} %{l_mflags} install
|
|
|
|
|
|
%{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
|
|
|
@@ -104,18 +112,34 @@ AutoReqProv: no
|
|
|
%{SOURCE snmpd.conf} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/snmp/
|
|
|
|
|
|
- %{l_shtool} install -c -m 755 \
|
|
|
- -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
- -e 's;@l_susr@;%{l_susr};g' \
|
|
|
- %{SOURCE rc.snmp} \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
-
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/snmpinform
|
|
|
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
|
|
|
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
|
|
|
+
|
|
|
+ # 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 \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ -e 's;@l_susr@;%{l_susr};g' \
|
|
|
+ -e 's;@l_rusr@;%{l_rusr};g' \
|
|
|
+ -e 's;@l_rgrp@;%{l_rgrp};g' \
|
|
|
+ %{SOURCE rc.%{name}} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
+
|
|
|
+ # OSSP fake syslog library
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ %{SOURCE fsl.%{name}} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
|
|
|
+
|
|
|
+ # determine installation files
|
|
|
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
+ %{l_files_std} \
|
|
|
+ '%not %dir %{l_prefix}/etc/fsl' \
|
|
|
+ '%config %{l_prefix}/etc/fsl/fsl.%{name}' \
|
|
|
'%config %{l_prefix}/etc/snmp/*.conf'
|
|
|
|
|
|
%files -f files
|