aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authoritojun <itojun@FreeBSD.org>1997-11-12 13:12:18 +0800
committeritojun <itojun@FreeBSD.org>1997-11-12 13:12:18 +0800
commitdc9c3c2706648a4509bd4621421a5281be1e4be4 (patch)
tree81e18b7f35127aca5e2b4b60257ebec12c60eccb /japanese
parentc7e0508b5510a3819129028bc7e6aaf3d9d8f258 (diff)
downloadfreebsd-ports-gnome-dc9c3c2706648a4509bd4621421a5281be1e4be4.tar.gz
freebsd-ports-gnome-dc9c3c2706648a4509bd4621421a5281be1e4be4.tar.zst
freebsd-ports-gnome-dc9c3c2706648a4509bd4621421a5281be1e4be4.zip
japanese zipcode tables. includes both 3/5 digits form and 7 digits form.
just like /usr/share/misc/zipcodes.
Diffstat (limited to 'japanese')
-rw-r--r--japanese/zipcodes/Makefile26
-rw-r--r--japanese/zipcodes/distinfo1
-rw-r--r--japanese/zipcodes/files/patch-aa36
-rw-r--r--japanese/zipcodes/pkg-comment1
-rw-r--r--japanese/zipcodes/pkg-descr7
-rw-r--r--japanese/zipcodes/pkg-plist3
-rw-r--r--japanese/zipcodes/scripts/gennew.pl16
-rw-r--r--japanese/zipcodes/scripts/genold.pl16
8 files changed, 106 insertions, 0 deletions
diff --git a/japanese/zipcodes/Makefile b/japanese/zipcodes/Makefile
new file mode 100644
index 000000000000..dc1fe8aa24b5
--- /dev/null
+++ b/japanese/zipcodes/Makefile
@@ -0,0 +1,26 @@
+# New ports collection makefile for: ja-zipcodes
+# Version required: 1.0
+# Date created: 5 Nov 1997
+# Whom: Jun-ichiro itojun Itoh <itojun@itojun.org>
+#
+# $Id$
+#
+
+DISTNAME= ken_all
+PKGNAME= ja-zipcodes-1.0
+CATEGORIES= japanese
+MASTER_SITES= http://www.postal.mpt.go.jp/lzh/
+EXTRACT_SUFX= .lzh
+
+MAINTAINER= itojun@itojun.org
+
+BUILD_DEPENDS= lha:${PORTSDIR}/archivers/lha \
+ nkf:${PORTSDIR}/japanese/nkf
+
+EXTRACT_CMD= lha
+EXTRACT_BEFORE_ARGS= xfqw=${WRKDIR}
+NO_WRKSUBDIR= yes
+
+MAKE_ENV+= INSTALL_DATA="${INSTALL_DATA}" SCRIPTDIR=${SCRIPTDIR}
+
+.include <bsd.port.mk>
diff --git a/japanese/zipcodes/distinfo b/japanese/zipcodes/distinfo
new file mode 100644
index 000000000000..0cf0409062e8
--- /dev/null
+++ b/japanese/zipcodes/distinfo
@@ -0,0 +1 @@
+MD5 (ken_all.lzh) = 5b1feb6162770254e4c79568e21461c0
diff --git a/japanese/zipcodes/files/patch-aa b/japanese/zipcodes/files/patch-aa
new file mode 100644
index 000000000000..591b2e2bcd06
--- /dev/null
+++ b/japanese/zipcodes/files/patch-aa
@@ -0,0 +1,36 @@
+--- Makefile.orig Wed Nov 5 14:17:56 1997
++++ Makefile Wed Nov 5 14:24:42 1997
+@@ -0,0 +1,33 @@
++.SUFFIXES: .csv .euc-csv
++
++CSV= 01hokkai.csv 02aomori.csv 03iwate.csv 04miyagi.csv \
++ 05akita.csv 06yamaga.csv 07fukush.csv 08ibarak.csv \
++ 09tochig.csv 10gumma.csv 11saitam.csv 12chiba.csv \
++ 13tokyo.csv 14kanaga.csv 15niigat.csv 16toyama.csv \
++ 17ishika.csv 18fukui.csv 19yamana.csv 20nagano.csv \
++ 21gifu.csv 22shizuo.csv 23aichi.csv 24mie.csv \
++ 25shiga.csv 26kyouto.csv 27osaka.csv 28hyogo.csv \
++ 29nara.csv 30wakaya.csv 31tottor.csv 32shiman.csv \
++ 33okayam.csv 34hirosh.csv 35yamagu.csv 36tokush.csv \
++ 37kagawa.csv 38ehime.csv 39kochi.csv 40fukuok.csv \
++ 41saga.csv 42nagasa.csv 43kumamo.csv 44oita.csv \
++ 45miyaza.csv 46kagosh.csv 47okinaw.csv
++EUCCSV= ${CSV:%.csv=%.euc-csv}
++PERL?= /usr/bin/perl
++NKF?= /usr/local/bin/nkf
++
++all: zipcodes.5digits zipcodes.7digits
++
++install: zipcodes.5digits zipcodes.7digits
++ mkdir -p ${PREFIX}/share/misc/jp-zipcodes
++ for i in zipcodes.5digits zipcodes.7digits; do \
++ ${INSTALL_DATA} $$i ${PREFIX}/share/misc/jp-zipcodes; \
++ done
++
++zipcodes.5digits: ${EUCCSV}
++ cat ${EUCCSV} | ${PERL} ${SCRIPTDIR}/genold.pl > zipcodes.5digits
++zipcodes.7digits: ${EUCCSV}
++ cat ${EUCCSV} | ${PERL} ${SCRIPTDIR}/gennew.pl > zipcodes.7digits
++
++.csv.euc-csv:
++ ${NKF} -X -e < $*.csv > $*.euc-csv
diff --git a/japanese/zipcodes/pkg-comment b/japanese/zipcodes/pkg-comment
new file mode 100644
index 000000000000..457873dbe414
--- /dev/null
+++ b/japanese/zipcodes/pkg-comment
@@ -0,0 +1 @@
+japanese zipcode tables. includes both 3/5 digits form and 7 digits form.
diff --git a/japanese/zipcodes/pkg-descr b/japanese/zipcodes/pkg-descr
new file mode 100644
index 000000000000..3cc6c62e84ec
--- /dev/null
+++ b/japanese/zipcodes/pkg-descr
@@ -0,0 +1,7 @@
+The port contains japanese zipcode tables, both 3/5 digits form
+used until Jan 1998, and new 7 digits form which will be used
+from Feb 1998.
+
+The database was provided to the public by Japan Minstry of Posts and
+Telecommunications.
+More information can be found at http://www.postal.mpt.go.jp/ .
diff --git a/japanese/zipcodes/pkg-plist b/japanese/zipcodes/pkg-plist
new file mode 100644
index 000000000000..9930dce8ef5f
--- /dev/null
+++ b/japanese/zipcodes/pkg-plist
@@ -0,0 +1,3 @@
+share/misc/jp-zipcodes/zipcodes.5digits
+share/misc/jp-zipcodes/zipcodes.7digits
+@dirrm share/misc/jp-zipcodes
diff --git a/japanese/zipcodes/scripts/gennew.pl b/japanese/zipcodes/scripts/gennew.pl
new file mode 100644
index 000000000000..a7f1b87dbe8a
--- /dev/null
+++ b/japanese/zipcodes/scripts/gennew.pl
@@ -0,0 +1,16 @@
+while (<>) {
+ s/"//g;
+ split(/,/, $_);
+ $_[2] =~ s/[ \t]//g;
+ $_[8] = '' if ($_[8] eq '以下に掲載がない場合');
+ $zipstr = $_[6] . ' ' . $_[7] . ' ' . $_[8]; # uniq
+ $zipstr =~ s/[ \t]+$//;
+ $zip{$zipstr} = $_[2];
+}
+
+print "# Zip code:location\n";
+print "# 7 digits zipcode for japan, used since feb98.\n";
+foreach $i (sort {$zip{$a} cmp $zip{$b}} keys %zip) {
+ next if ($i eq '');
+ print $zip{$i} . ':' . $i . "\n";
+}
diff --git a/japanese/zipcodes/scripts/genold.pl b/japanese/zipcodes/scripts/genold.pl
new file mode 100644
index 000000000000..871814145b70
--- /dev/null
+++ b/japanese/zipcodes/scripts/genold.pl
@@ -0,0 +1,16 @@
+while (<>) {
+ s/"//g;
+ split(/,/, $_);
+ $_[1] =~ s/[ \t]//g;
+ $_[8] = '' if ($_[8] eq '以下に掲載がない場合');
+ $zipstr = $_[6] . ' ' . $_[7] . ' ' . $_[8]; # uniq
+ $zipstr =~ s/[ \t]+$//;
+ $zip{$zipstr} = $_[1];
+}
+
+print "# Zip code:location\n";
+print "# 3 to 5 digits zipcode for japan, used until jan98.\n";
+foreach $i (sort {$zip{$a} cmp $zip{$b}} keys %zip) {
+ next if ($i eq '');
+ print $zip{$i} . ':' . $i . "\n";
+}