|
@@ -33,16 +33,21 @@ Distribution: OpenPKG [PLUS]
|
|
|
Group: Network
|
|
Group: Network
|
|
|
License: BSD
|
|
License: BSD
|
|
|
Version: 5.0.8
|
|
Version: 5.0.8
|
|
|
-Release: 20030318
|
|
|
|
|
|
|
+Release: 20030429
|
|
|
|
|
+
|
|
|
|
|
+# package options
|
|
|
|
|
+%option with_host_mib no
|
|
|
|
|
|
|
|
# list of sources
|
|
# list of sources
|
|
|
Source0: http://osdn.dl.sourceforge.net/net-snmp/net-snmp-%{version}.tar.gz
|
|
Source0: http://osdn.dl.sourceforge.net/net-snmp/net-snmp-%{version}.tar.gz
|
|
|
|
|
+Source1: rc.snmp
|
|
|
|
|
+Source2: snmpd.conf
|
|
|
|
|
|
|
|
# build information
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
BuildRoot: %{l_buildroot}
|
|
|
-BuildPreReq: OpenPKG, openpkg >= 20020206, openssl, zlib, db >= 4.1.24
|
|
|
|
|
-PreReq: OpenPKG, openpkg >= 20020206
|
|
|
|
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20030428, openssl
|
|
|
|
|
+PreReq: OpenPKG, openpkg >= 20030428
|
|
|
AutoReq: no
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
AutoReqProv: no
|
|
|
|
|
|
|
@@ -55,18 +60,28 @@ AutoReqProv: no
|
|
|
|
|
|
|
|
%prep
|
|
%prep
|
|
|
%setup -q -n net-snmp-%{version}
|
|
%setup -q -n net-snmp-%{version}
|
|
|
|
|
+ %{l_shtool} subst \
|
|
|
|
|
+ -e 's;/usr/include/rpm;%{l_prefix}/include/rpm;g' \
|
|
|
|
|
+ -e 's;-lpopt\([^a-z]\);-lrpmpopt\1;g' \
|
|
|
|
|
+ -e 's;-ldb\([^a-z]\);-lrpmdb\1;g' \
|
|
|
|
|
+ -e 's;-lz\([^a-z]\);-lrpz\1;g' \
|
|
|
|
|
+ -e 's;-lrpm\([^a-z]\);-lrpm -lrpmio\1;g' \
|
|
|
|
|
+ -e 's;-lrpmio\([^a-z]\);-lrpmio -lrpmpopt -lrpmbz2 -lrpmz\1;g' \
|
|
|
|
|
+ configure
|
|
|
|
|
|
|
|
%build
|
|
%build
|
|
|
./configure \
|
|
./configure \
|
|
|
--with-cc="%{l_cc}" \
|
|
--with-cc="%{l_cc}" \
|
|
|
--with-cflags="%{l_cflags -O}" \
|
|
--with-cflags="%{l_cflags -O}" \
|
|
|
|
|
+ --with-ldflags="%{l_ldflags}" \
|
|
|
--prefix=%{l_prefix} \
|
|
--prefix=%{l_prefix} \
|
|
|
--with-persistent-directory=%{l_prefix}/var/snmp \
|
|
--with-persistent-directory=%{l_prefix}/var/snmp \
|
|
|
--with-openssl=%{l_prefix} \
|
|
--with-openssl=%{l_prefix} \
|
|
|
- --with-zlib=%{l_prefix} \
|
|
|
|
|
- --with-db=%{l_prefix} \
|
|
|
|
|
--enable-silent-libtool \
|
|
--enable-silent-libtool \
|
|
|
--disable-shared \
|
|
--disable-shared \
|
|
|
|
|
+%if "%{with_host_mib}" == "yes"
|
|
|
|
|
+ --with-mib-modules="host" \
|
|
|
|
|
+%endif
|
|
|
--with-defaults
|
|
--with-defaults
|
|
|
%{l_make} %{l_mflags} touchit
|
|
%{l_make} %{l_mflags} touchit
|
|
|
%{l_make} %{l_mflags}
|
|
%{l_make} %{l_mflags}
|
|
@@ -79,12 +94,29 @@ AutoReqProv: no
|
|
|
-e "s;^\\(persistentdir.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/var/snmp;g" \
|
|
-e "s;^\\(persistentdir.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/var/snmp;g" \
|
|
|
`find . -type f -name Makefile -print`
|
|
`find . -type f -name Makefile -print`
|
|
|
%{l_make} %{l_mflags} install
|
|
%{l_make} %{l_mflags} install
|
|
|
|
|
+
|
|
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/var/snmp \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/snmp
|
|
|
|
|
+
|
|
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
|
|
+ %{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
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/snmpinform
|
|
|
ln $RPM_BUILD_ROOT%{l_prefix}/bin/snmptrap \
|
|
ln $RPM_BUILD_ROOT%{l_prefix}/bin/snmptrap \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/snmpinform
|
|
$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}/bin/* >/dev/null 2>&1 || true
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/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}
|
|
|
|
|
|
|
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
|
|
|
|
|
+ '%config %{l_prefix}/etc/snmp/*.conf'
|
|
|
|
|
|
|
|
%files -f files
|
|
%files -f files
|
|
|
|
|
|