|
|
|
|
@ -33,10 +33,11 @@ Distribution: OpenPKG [PLUS]
|
|
|
|
|
Group: Network |
|
|
|
|
License: BSD |
|
|
|
|
Version: 5.0.8 |
|
|
|
|
Release: 20030808 |
|
|
|
|
Release: 20030818 |
|
|
|
|
|
|
|
|
|
# package options |
|
|
|
|
%option with_fsl yes |
|
|
|
|
%option with_perl no |
|
|
|
|
%option with_host_mib no |
|
|
|
|
|
|
|
|
|
# list of sources |
|
|
|
|
@ -49,7 +50,7 @@ Patch0: snmp.patch
|
|
|
|
|
# build information |
|
|
|
|
Prefix: %{l_prefix} |
|
|
|
|
BuildRoot: %{l_buildroot} |
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20030718 |
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20030718, gcc |
|
|
|
|
PreReq: OpenPKG, openpkg >= 20030718 |
|
|
|
|
BuildPreReq: openssl |
|
|
|
|
PreReq: openssl |
|
|
|
|
@ -57,6 +58,10 @@ PreReq: openssl
|
|
|
|
|
BuildPreReq: fsl >= 1.2.0 |
|
|
|
|
PreReq: fsl >= 1.2.0 |
|
|
|
|
%endif |
|
|
|
|
%if "%{with_perl}" == "yes" |
|
|
|
|
BuildPreReq: perl |
|
|
|
|
PreReq: perl |
|
|
|
|
%endif |
|
|
|
|
AutoReq: no |
|
|
|
|
AutoReqProv: no |
|
|
|
|
|
|
|
|
|
@ -71,6 +76,9 @@ AutoReqProv: no
|
|
|
|
|
# unpack and patch package |
|
|
|
|
%setup -q -n net-snmp-%{version} |
|
|
|
|
%patch -p0 |
|
|
|
|
|
|
|
|
|
# adjust package for RPM support in Host MIB |
|
|
|
|
# (because OpenPKG RPM is a little bit different) |
|
|
|
|
%{l_shtool} subst \ |
|
|
|
|
-e 's;/usr/include/rpm;%{l_prefix}/include/rpm;g' \ |
|
|
|
|
-e 's;-lpopt\([^a-z]\);-lrpmpopt\1;g' \ |
|
|
|
|
@ -83,6 +91,19 @@ AutoReqProv: no
|
|
|
|
|
-e 's;@OPENPKG_RPMRC@;"%{l_prefix}/etc/openpkg/rpmrc";' \ |
|
|
|
|
agent/mibgroup/host/hr_swinst.c |
|
|
|
|
|
|
|
|
|
# adjust package for not requiring --enable-shared for --with-perl-modules |
|
|
|
|
# (because it technically working also with static libraries on most platforms) |
|
|
|
|
%{l_shtool} subst \ |
|
|
|
|
-e 's/if test "x$enable_shared" != "xyes"; then/if false; then/g' \ |
|
|
|
|
configure |
|
|
|
|
|
|
|
|
|
# adjust package to install Perl packages into RPM_BUILD_ROOT |
|
|
|
|
%{l_shtool} subst \ |
|
|
|
|
-e "s;perl Makefile.PL;perl Makefile.PL PERL=$perl FULLPERL=$perl PREFIX=${RPM_BUILD_ROOT}%{l_prefix} INSTALLDIRS=site;g" \ |
|
|
|
|
-e 's/cd perl ; $(MAKE))/cd perl ; $(MAKE) pure_all)/g' \ |
|
|
|
|
-e 's/cd perl ; $(MAKE) install/cd perl ; $(MAKE) pure_install/g' \ |
|
|
|
|
Makefile.in |
|
|
|
|
|
|
|
|
|
%build |
|
|
|
|
# disable search for db library |
|
|
|
|
( echo "ac_cv_lib_db1_dbopen=no" |
|
|
|
|
@ -92,14 +113,10 @@ AutoReqProv: no
|
|
|
|
|
) >config.cache |
|
|
|
|
|
|
|
|
|
# configure package |
|
|
|
|
CC="%{l_cc}" \ |
|
|
|
|
CFLAGS="%{l_cflags -O}" \ |
|
|
|
|
CPPFLAGS="%{l_cppflags}" \ |
|
|
|
|
LDFLAGS="%{l_ldflags}" \ |
|
|
|
|
./configure \ |
|
|
|
|
--cache-file=./config.cache \ |
|
|
|
|
--with-cc="%{l_cc}" \ |
|
|
|
|
--with-cflags="%{l_cflags -O}" \ |
|
|
|
|
--with-cflags="%{l_cflags -O} %{l_cppflags} -fpic" \ |
|
|
|
|
--with-ldflags="%{l_ldflags} %{l_fsl_ldflags}" \ |
|
|
|
|
--with-libs="%{l_fsl_libs}" \ |
|
|
|
|
--prefix=%{l_prefix} \ |
|
|
|
|
@ -109,6 +126,10 @@ AutoReqProv: no
|
|
|
|
|
--disable-shared \ |
|
|
|
|
%if "%{with_host_mib}" == "yes" |
|
|
|
|
--with-mib-modules="host" \ |
|
|
|
|
%endif |
|
|
|
|
%if "%{with_perl}" == "yes" |
|
|
|
|
--with-perl-modules \ |
|
|
|
|
--enable-embedded-perl \ |
|
|
|
|
%endif |
|
|
|
|
--with-defaults |
|
|
|
|
|
|
|
|
|
|