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 openpkg$ Date: 12-Sep-2003 09:28:33
Branch: HEAD Handle: 2003091208283102
Modified files:
openpkg-re/vcheck vc.geoip
openpkg-src/geoip geoip.spec
openpkg-web news.txt
Log:
add optional Perl API
Summary:
Revision Changes Path
1.31 +5 -0 openpkg-re/vcheck/vc.geoip
1.37 +54 -4 openpkg-src/geoip/geoip.spec
1.6519 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-re/vcheck/vc.geoip
============================================================================
$ cvs diff -u -r1.30 -r1.31 vc.geoip
--- openpkg-re/vcheck/vc.geoip 11 Aug 2003 07:03:40 -0000 1.30
+++ openpkg-re/vcheck/vc.geoip 12 Sep 2003 07:28:31 -0000 1.31
@@ -6,4 +6,9 @@
url = http://maxmind.com/download/geoip/api/c/
regex = GeoIP-(__VER__)\.tar\.gz
}
+prog geoip:perl = {
+ version = 1.21
+ url = http://www.cpan.org/modules/by-module/Geo/
+ regex = Geo-IP-(__VER__)\.tar\.gz
+}
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/geoip/geoip.spec
============================================================================
$ cvs diff -u -r1.36 -r1.37 geoip.spec
--- openpkg-src/geoip/geoip.spec 11 Aug 2003 11:53:01 -0000 1.36
+++ openpkg-src/geoip/geoip.spec 12 Sep 2003 07:28:33 -0000 1.37
@@ -23,6 +23,10 @@
## SUCH DAMAGE.
##
+# package version
+%define V_api_c 1.2.2
+%define V_api_pl 1.21
+
# package information
Name: geoip
Summary: Geographic IP Resolution
@@ -32,11 +36,15 @@
Distribution: OpenPKG [EVAL]
Group: Network
License: GPL
-Version: 1.2.2
-Release: 20030811
+Version: %{V_api_c}
+Release: 20030912
+
+# package options
+%option with_perl no
# list of sources
-Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz
+Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{V_api_c}.tar.gz
+Source1: http://www.cpan.org/modules/by-module/Geo/Geo-IP-%{V_api_pl}.tar.gz
# build information
Prefix: %{l_prefix}
@@ -55,7 +63,10 @@
public IP address.
%prep
- %setup -q -n GeoIP-%{version}
+ %setup -q -n GeoIP-%{V_api_c}
+%if "%{with_perl}" == "yes"
+ %setup -q -D -T -a 1 -n GeoIP-%{V_api_c}
+%endif
%{l_shtool} subst \
-e 's;-Wall;;g' \
-e 's;-ansi;;g' \
@@ -73,6 +84,17 @@
--mandir=$RPM_BUILD_ROOT%{l_prefix}/man \
--disable-shared
%{l_make} %{l_mflags}
+%if "%{with_perl}" == "yes"
+ ( cd Geo-IP-%{V_api_pl}
+ %{l_prefix}/bin/perl Makefile.PL \
+ PREFIX=$RPM_BUILD_ROOT%{l_prefix} \
+ PERL=%{l_prefix}/bin/perl \
+ FULLPERL=%{l_prefix}/bin/perl \
+ LIBS="-L../libGeoIP/.libs" \
+ INC="-I../libGeoIP"
+ %{l_make} %{l_mflags}
+ ) || exit $?
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -80,9 +102,37 @@
$RPM_BUILD_ROOT%{l_prefix}/man \
$RPM_BUILD_ROOT%{l_prefix}/man/man1
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
+%if "%{with_perl}" == "yes"
+ ( cd Geo-IP-%{V_api_pl}
+ %{l_make} %{l_mflags} install
+ ) || exit $?
+%endif
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/geoip/GeoIP.conf.default
+%if "%{with_perl}" != "yes"
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+%else
+ find ${RPM_BUILD_ROOT}${l_prefix} \
+ -name perllocal.pod -print | xargs rm -f
+ find ${RPM_BUILD_ROOT}${l_prefix} \
+ -name .packlist -print | xargs rm -f
+ find ${RPM_BUILD_ROOT}${l_prefix} \
+ -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true) || true
+ eval `%{l_prefix}/bin/perl -V:installarchlib -V:installprivlib
-V:installsitearch -V:installsitelib`
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%not %dir %{l_prefix}/lib/perl' \
+ '%not %dir %{l_prefix}/lib/perl/*' \
+ "%not %dir $installarchlib" \
+ "%not %dir $installprivlib" \
+ "%not %dir $installsitearch" \
+ "%not %dir $installsitelib" \
+ "%not %dir $installarchlib/auto" \
+ "%not %dir $installprivlib/auto" \
+ "%not %dir $installsitearch/auto" \
+ "%not %dir $installsitelib/auto" \
+ "%not %dir %{l_prefix}/lib/pkgconfig"
+%endif
%files -f files
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.6518 -r1.6519 news.txt
--- openpkg-web/news.txt 11 Sep 2003 18:31:15 -0000 1.6518
+++ openpkg-web/news.txt 12 Sep 2003 07:28:31 -0000 1.6519
@@ -1,3 +1,4 @@
+12-Sep-2003: Upgraded package: P<geoip-1.2.2-20030912>
11-Sep-2003: Upgraded package: P<imagemagick-5.5.7.10-20030911>
11-Sep-2003: Upgraded package: P<perl-wx-20030911-20030911>
11-Sep-2003: Upgraded package: P<uvscan-4.24+4292-20030911>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]