aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/zipcodes/Makefile
blob: bdee38967b55b3572902fc3b4c9adcd891aa9a73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# $FreeBSD$

PORTNAME=   zipcodes
PORTVERSION=    20130830
CATEGORIES= japanese
MASTER_SITES=   ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= kuriyama
DISTFILES=  ken_all-${PORTVERSION_K}.lzh jigyosyo-${PORTVERSION_J}.lzh

MAINTAINER= kuriyama@FreeBSD.org
COMMENT=    Japanese zipcode tables. includes both 3/5 and 7 digits form

BUILD_DEPENDS=  nkf:${PORTSDIR}/japanese/nkf

NO_WRKSUBDIR=   yes
USE_LHA=    yes

USES=       perl5
USE_PERL5=  build
MAKE_ENV=   INSTALL_DATA="${INSTALL_DATA}" SCRIPTDIR=${SCRIPTDIR} PERL=${PERL}
PORTVERSION_K?= ${PORTVERSION}
PORTVERSION_J?= ${PORTVERSION}

post-extract:
    @${CP} ${FILESDIR}/Makefile ${WRKDIR}

# for maintenance.
fetch1:
    fetch http://www.post.japanpost.jp/zipcode/dl/kogaki/lzh/ken_all.lzh
    fetch http://www.post.japanpost.jp/zipcode/dl/jigyosyo/lzh/jigyosyo.lzh
    ${CHMOD} og+r *.lzh

fetch2:
    m=`stat -f %m ken_all.lzh`; \
    ${MV} ken_all.lzh `date -r $${m} +ken_all-%Y%m%d.lzh`
    m=`stat -f %m jigyosyo.lzh`; \
    ${MV} jigyosyo.lzh `date -r $${m} +jigyosyo-%Y%m%d.lzh`

.include <bsd.port.mk>