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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
#!/usr/bin/make -f
export LC_ALL=C
TZGEN := $(CURDIR)/tzgen
VERSION := $(shell dpkg-parsechangelog | sed -e '/^Version/!d;s/^Version: //g;s/.*://g;s/-.*//g')
TIMEZONES := africa \
antarctica \
asia \
australasia \
europe \
northamerica \
southamerica \
etcetera \
factory \
backward \
systemv \
pacificnew
TEMPLATES_FILE := $(CURDIR)/debian/tzdata.templates
TEMPLATES_AREAS := Africa \
America \
Antarctica \
Australia \
Arctic \
Asia \
Atlantic \
Europe \
Indian \
Pacific \
SystemV \
US \
Etc
%:
dh $@
override_dh_auto_build-indep:
# Build the "default" version
for zone in $(TIMEZONES); do \
/usr/sbin/zic -d $(TZGEN) -L /dev/null -y yearistype.sh $${zone} ; \
/usr/sbin/zic -d $(TZGEN)/posix -L /dev/null -y yearistype.sh $${zone} ; \
/usr/sbin/zic -d $(TZGEN)/right -L leapseconds -y $(TZGEN)/yearistype.sh $${zone} ; \
done
# Generate a posixrules file
/usr/sbin/zic -d $(TZGEN) -p America/New_York
# Replace hardlinks by symlinks
rdfind -outputname /dev/null -makesymlinks true -removeidentinode false $(TZGEN)
symlinks -r -s -c $(TZGEN)
# Generate the templates file
( echo "Template: tzdata/Areas" ; \
echo "Type: select" ; \
echo "# Note to translators:" ; \
echo "# - \"Etc\" will present users with a list" ; \
echo "# of \"GMT+xx\" or \"GMT-xx\" timezones" ; \
echo "# - SystemV will give the choice between zone named as per SystemV conventions:" ; \
echo "# EST5, MST7, etc." ; \
echo -n "__Choices: " ; \
echo "$(TEMPLATES_AREAS)" | sed -e 's# #, #g' -e 's#, $$##' ; \
echo "_Description: Geographic area:" ; \
echo " Please select the geographic area in which you live. Subsequent" ; \
echo " configuration questions will narrow this down by presenting a list of" ; \
echo " cities, representing the time zones in which they are located." ; \
echo ; \
for i in $(TEMPLATES_AREAS) ; do \
echo "Template: tzdata/Zones/$$i" ; \
echo "Type: select" ; \
echo "# Translators: do not translate underscores. You can use spaces instead." ; \
echo "#flag:partial" ; \
if [ "$$i" = "Etc" ] || [ "$$i" = "SystemV" ] ; then \
echo -n "Choices: " ; \
else \
echo -n "__Choices: " ; \
fi ; \
cd $(CURDIR)/tzgen/$$i ; \
find . -maxdepth 2 -type f -o -type l | sed -e 's#^\./##' | \
egrep -v '^(Ashkhabad|Chungking|Dacca|Macao|Thimbu|Ulan_Bator|Faeroe|ACT|LHI|NSW|North|Queensland|South|Tasmania|Victoria|West|Argentina/ComodRivadavia|Buenos_Aires|Catamarca|Cordoba|Jujuy|Mendoza|Rosario|Louisville|Fort_Wayne|Indianapolis|Knox_IN|East-Indiana|East-Starke|Asmera|South_Pole|Saigon|Calcutta|Katmandu)$$' | \
sort -n | tr '\n' ',' | sed -e 's#,#, #g' -e 's#, $$#\n#' ; \
echo "_Description: Time zone:" ; \
echo " Please select the city or region corresponding to your time zone." ; \
echo ; \
done ) > $(TEMPLATES_FILE)
debconf-updatepo
override_dh_auto_test:
# The upstream tests are related to the sources. Just skip it.
override_dh_auto_install:
# Nothing to do.
override_dh_auto_clean:
-rm -rf $(TZGEN)
dh_auto_clean
override_dh_installchangelogs:
dh_installchangelogs NEWS
|