zoneinfo: move zoneinfo data to /usr/share/zoneinfo
[unleashed.git] / bin / tzselect / Makefile
blobf1b0bd68daa30c71f10669a415885b5e94c7b95a
1 PROG= tzselect
2 SRCS=
3 MAN= tzselect.8
5 CONTRIB_PATH = ${.CURDIR:H:H}/contrib/tzcode
7 VERSION!=cat ${CONTRIB_PATH}/version
9 .PATH: ${CONTRIB_PATH}
11 tzselect: tzselect.ksh
12 sed \
13 -e 's|#!/bin/bash|#!/bin/sh|g' \
14 -e 's|AWK=[^}]*|AWK=/usr/bin/awk|g' \
15 -e 's|\(PKGVERSION\)=.*|\1='\''(tzcode) '\''|' \
16 -e 's|\(REPORT_BUGS_TO\)=.*|\1=tz@iana.org|' \
17 -e 's|TZDIR=[^}]*|TZDIR=/usr/share/zoneinfo|' \
18 -e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \
19 < ${.ALLSRC} >$@
21 ${.CURDIR}/tzselect.8: ${CONTRIB_PATH}/tzselect.8
22 sed \
23 -e 's@/usr/local/etc@/usr/share/lib@' \
24 -e 's@newctime(3), @@' \
25 -e 's@zdump(8), @@' \
26 < ${.ALLSRC} > $@
28 # FIXME: This is a gross hack to generate a cleaner version of the manpage
29 # in the current directory so that the install target finds it and installs
30 # it.
31 all: ${.CURDIR}/tzselect.8
33 CLEANFILES+= tzselect.8
35 .include <unleashed.mk>
36 .include <prog.mk>