OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 18-Aug-2003 15:22:32
Branch: HEAD Handle: 2003081814223001
Modified files:
openpkg-src/snmp snmp.spec
openpkg-web news.txt
Log:
add support for Perl API
Summary:
Revision Changes Path
1.53 +28 -7 openpkg-src/snmp/snmp.spec
1.6211 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/snmp/snmp.spec
============================================================================
$ cvs diff -u -r1.52 -r1.53 snmp.spec
--- openpkg-src/snmp/snmp.spec 8 Aug 2003 08:58:23 -0000 1.52
+++ openpkg-src/snmp/snmp.spec 18 Aug 2003 13:22:31 -0000 1.53
@@ -33,10 +33,11 @@
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 @@
# 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 @@
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 @@
# 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 @@
-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 @@
) >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 @@
--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
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.6210 -r1.6211 news.txt
--- openpkg-web/news.txt 18 Aug 2003 10:46:04 -0000 1.6210
+++ openpkg-web/news.txt 18 Aug 2003 13:22:30 -0000 1.6211
@@ -1,3 +1,4 @@
+18-Aug-2003: Upgraded package: P<snmp-5.0.8-20030818>
18-Aug-2003: Upgraded package: P<exim-4.21-20030818>
18-Aug-2003: Upgraded package: P<exim-4.20-20030818>
18-Aug-2003: Upgraded package: P<gv-3.5.8-20030818>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]