nrelease - fix/improve livecd
[dragonfly.git] / share / zoneinfo / Makefile
CommitLineData
984263bc
MD
1# $FreeBSD: src/share/zoneinfo/Makefile,v 1.16.2.3 2002/08/07 16:31:52 ru Exp $
2
3CLEANFILES+= yearistype
4
5.if defined(LEAPSECONDS)
6LEAPFILE= -L leapseconds
7.else
8LEAPFILE=
9.endif
10
d34e7773 11ZIC_UG_FLAGS= -u ${BINOWN} -g ${BINGRP}
12
cfbb806a 13TZFILES= africa antarctica asia australasia etcetera europe \
d31cacd3 14 northamerica southamerica
984263bc 15TZFILES+= backward
d87a94cb 16POSIXRULES= America/New_York
984263bc
MD
17
18.if exists(${.OBJDIR}/yearistype)
19YEARISTYPE= ${.OBJDIR}/yearistype
20.else
21YEARISTYPE= ${.CURDIR}/yearistype
22.endif
23
7c587434
SW
24FILES= iso3166.tab zone.tab
25FILESDIR_iso3166.tab= ${SHAREDIR}/misc
26FILESNAME_iso3166.tab= iso3166
27FILESDIR_zone.tab= ${SHAREDIR}/zoneinfo
28
984263bc
MD
29all: yearistype
30
31yearistype: yearistype.sh
32 cp ${.ALLSRC} ${.TARGET}
33 chmod +x ${.TARGET}
34
35beforeinstall:
36 umask 022; cd ${.CURDIR}; \
37 zic -D -d ${DESTDIR}/usr/share/zoneinfo -p ${POSIXRULES} \
d34e7773 38 ${ZIC_UG_FLAGS} ${LEAPFILE} -y ${YEARISTYPE} ${TZFILES}
984263bc 39
d87a94cb
SW
40afterinstall:
41#
42# If the file /var/db/zoneinfo exists, and it is owned by root:wheel,
43# and the contents of it exists in /usr/share/zoneinfo, then reinstall
44# it.
45#
46 @-if [ -f ${DESTDIR}/var/db/zoneinfo -a -O ${DESTDIR}/var/db/zoneinfo \
47 -a -G ${DESTDIR}/var/db/zoneinfo ]; then \
48 zf=$$(cat ${DESTDIR}/var/db/zoneinfo); \
49 if [ -f ${DESTDIR}/usr/share/zoneinfo/$${zf} ]; then \
50 if [ ! -z "${DESTDIR}" ]; then \
51 optC="-C ${DESTDIR}"; \
52 fi; \
53 echo "Updating /etc/localtime"; \
54 tzsetup $${optC} -r; \
55 fi; \
56 else \
57 echo "Run tzsetup(8) manually to update /etc/localtime."; \
58 fi
59
984263bc 60.include <bsd.prog.mk>