On 09/07/17 15:21, Stuart Henderson wrote: > On 2017/09/07 12:05, Giovanni Bechis wrote: >> Index: files/cc.gif >> =================================================================== >> RCS file: files/cc.gif >> diff -N files/cc.gif >> Binary files /dev/null and cc.gif differ >> Index: files/ip.gif >> =================================================================== >> RCS file: files/ip.gif >> diff -N files/ip.gif >> Binary files /dev/null and ip.gif differ > > I'm not a fan of binaries in ${FILESDIR}.. Can you upload them > somewhere to use as an extra distfile instead like we do for > geolite, the mac address database, etc, please? (Or someone else > could host them, but that gets annoying when you want to update it!). >
What about that ? Cheers Giovanni
Index: Makefile =================================================================== RCS file: /var/cvs/ports/net/p5-IP-Country/Makefile,v retrieving revision 1.9 diff -u -p -r1.9 Makefile --- Makefile 20 Mar 2016 19:56:51 -0000 1.9 +++ Makefile 7 Sep 2017 16:13:24 -0000 @@ -4,13 +4,30 @@ COMMENT= fast lookup of country codes b MODULES= cpan PKG_ARCH= * +D= 20170907 DISTNAME= IP-Country-2.28 +PKGNAME= p5-${DISTNAME}.$D +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + IP-Country-data-$D.tar.bz2:0 + CATEGORIES= net -REVISION= 0 + +MAINTAINER = Giovanni Bechis <giova...@openbsd.org> # Artistic PERMIT_PACKAGE_CDROM= Yes +MASTER_SITES0 = https://paclan.it/distfiles/ + RUN_DEPENDS = geo/p5-Geography-Countries + +post-patch: + ${SUBST_CMD} ${WRKSRC}/dbmScripts/ipcc_maker.pl + ${INSTALL_DATA} ${WRKDIR}/data/*.gif ${WRKSRC}/lib/IP/Country/Fast/ + +# maintainer convenience target +updatedb: + cd ${WRKSRC}/dbmScripts && sh whois_filenames \ + && perl ipcc_loader.pl && perl ipcc_maker.pl .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /var/cvs/ports/net/p5-IP-Country/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- distinfo 17 Nov 2013 04:02:58 -0000 1.3 +++ distinfo 7 Sep 2017 16:10:29 -0000 @@ -1,2 +1,4 @@ SHA256 (IP-Country-2.28.tar.gz) = iNuDOlqyLtBstT1vIFcl47U3GyVFlgU3OIhekfoQX3U= +SHA256 (IP-Country-data-20170907.tar.bz2) = ZQuOCMnbwEXzMAj21R9pfOxtU33o+Yww1xqDcY/A+pc= SIZE (IP-Country-2.28.tar.gz) = 296585 +SIZE (IP-Country-data-20170907.tar.bz2) = 386248 Index: patches/patch-dbmScripts_ipcc_loader_pl =================================================================== RCS file: patches/patch-dbmScripts_ipcc_loader_pl diff -N patches/patch-dbmScripts_ipcc_loader_pl --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-dbmScripts_ipcc_loader_pl 7 Sep 2017 09:12:59 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: dbmScripts/ipcc_loader.pl +--- dbmScripts/ipcc_loader.pl.orig ++++ dbmScripts/ipcc_loader.pl +@@ -70,7 +70,7 @@ read_reg('delegated-afrinic-latest'); + read_reg('delegated-lacnic-latest'); + read_reg('delegated-apnic-latest'); + read_ripe(); +-read_reg('delegated-arin-latest'); ++read_reg('delegated-arin-extended-latest'); + + join_neighbours(); + punch_holes(); Index: patches/patch-dbmScripts_ipcc_maker_pl =================================================================== RCS file: patches/patch-dbmScripts_ipcc_maker_pl diff -N patches/patch-dbmScripts_ipcc_maker_pl --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-dbmScripts_ipcc_maker_pl 7 Sep 2017 16:05:29 -0000 @@ -0,0 +1,23 @@ +$OpenBSD$ + +Index: dbmScripts/ipcc_maker.pl +--- dbmScripts/ipcc_maker.pl.orig ++++ dbmScripts/ipcc_maker.pl +@@ -31,7 +31,7 @@ close REG || warn("can't close $reg_file, but continui + + + print "Saving ultralite IP registry to disk\n"; +-my $ip = new IO::File "> ../lib/IP/Country/Fast/ip.gif"; ++my $ip = new IO::File "> ${WRKDIR}/data/ip.gif"; + if (defined $ip) { + binmode $ip; + print $ip pack("N",time()); # returned by $obj->db_time() +@@ -44,7 +44,7 @@ if (defined $ip) { + + print "Saving ultralite country database to disk\n"; + +-open (CC, "> ../lib/IP/Country/Fast/cc.gif") ++open (CC, "> ${WRKDIR}/data/cc.gif") + or die ("couldn't create country database: $!"); + binmode CC; + foreach my $country (sort $tree->get_countries()){ Index: patches/patch-dbmScripts_whois_filenames =================================================================== RCS file: patches/patch-dbmScripts_whois_filenames diff -N patches/patch-dbmScripts_whois_filenames --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-dbmScripts_whois_filenames 6 Sep 2017 16:46:59 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ + +Index: dbmScripts/whois_filenames +--- dbmScripts/whois_filenames.orig ++++ dbmScripts/whois_filenames +@@ -2,5 +2,5 @@ + ftp ftp://ftp.ripe.net/ripe/dbase/split/ripe.db.inetnum.gz && gunzip ripe.db.inetnum.gz + ftp ftp://ftp.ripe.net/pub/stats/afrinic/delegated-afrinic-latest + ftp ftp://ftp.ripe.net/pub/stats/apnic/delegated-apnic-latest +-ftp ftp://ftp.ripe.net/pub/stats/arin/delegated-arin-latest ++ftp ftp://ftp.ripe.net/pub/stats/arin/delegated-arin-extended-latest + ftp ftp://ftp.ripe.net/pub/stats/lacnic/delegated-lacnic-latest