#!/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|Pacific-New)$$' | \ 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