summaryrefslogtreecommitdiff
path: root/misc/zoneinfo/Makefile
blob: 30bd89048f836a4ea1281702d790573e1e1eed2f (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# New ports collection makefile for:	zoneinfo
# Date created:				27 March 2006
# Whom:					Edwin Groothuis <edwin@mavetju.org>
#
# $FreeBSD$

PORTNAME=	zoneinfo
DISTVERSION=	2006l
CATEGORIES=	misc
MASTER_SITES=	ftp://elsie.nci.nih.gov/pub/
DISTNAME=	tzdata${DISTVERSION}

MAINTAINER=	edwin@mavetju.org
COMMENT=	Updated timezone definitions

WRKSRC=		${WRKDIR}
PREFIX=		/usr

USE_PERL5_BUILD=yes

TZFILES=	africa antarctica asia australasia etcetera europe \
		factory northamerica southamerica systemv
POSIXRULES=	America/New_York

# Prevent packages if on the FreeBSD building cluster. This because
# it overwrite system files and directories.
.if defined(PACKAGE_BUILDING)
NO_PACKAGE=	yes
.endif

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
EXTRA_PATCHES+=	${FILESDIR}/patch4-zone.tab
.endif

HAS_GG!=	${GREP} -c ^GG /usr/share/misc/iso3166 || ${TRUE}
.if ${HAS_GG} == "0"
EXTRA_PATCHES+=	${FILESDIR}/patchremove-gg
.endif

HAS_IM!=	${GREP} -c ^IM /usr/share/misc/iso3166 || ${TRUE}
.if ${HAS_IM} == "0"
EXTRA_PATCHES+=	${FILESDIR}/patchremove-im
.endif

HAS_JE!=	${GREP} -c ^JE /usr/share/misc/iso3166 || ${TRUE}
.if ${HAS_JE} == "0"
EXTRA_PATCHES+=	${FILESDIR}/patchremove-je
.endif

do-build:
	umask 022; \
	cd ${WRKSRC}; \
	zic -d ${WRKSRC}/zoneinfo -p ${POSIXRULES} -m ${NOBINMODE} \
		${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}

do-install:
	${MKDIR} ${PREFIX}/share/zoneinfo
	${CP} -R -p ${WRKSRC}/zoneinfo/ ${PREFIX}/share/zoneinfo
	${INSTALL_DATA} ${WRKSRC}/zone.tab ${PREFIX}/share/zoneinfo

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>