#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk # If the Debian version ends in a +tzver, regenerate the time zone data files # from the installed tzdata package. TZVER := $(shell echo '$(DEB_VERSION)' | \ sed -n 's/^.*+\([0-9]\{4\}[a-z]\)$$/\1/p' ) ifneq (,$(TZVER)) data/meta/$(TZVER).json: # Fail the build if the tzdata package does not match TZVER. grep -q '^# version $(TZVER)$$' /usr/share/zoneinfo/tzdata.zi mkdir -p temp/download/$(TZVER) ln -s /usr/share/zoneinfo/*.tab temp/download/$(TZVER)/ grunt data-meta:$(TZVER) data/unpacked/$(TZVER).json: data/meta/$(TZVER).json mkdir -p temp/zic/$(TZVER) cp -a /usr/share/zoneinfo/posix/* temp/zic/$(TZVER)/ # Not supported. rm -f temp/zic/$(TZVER)/Factory grunt data-zdump:$(TZVER) grunt data-collect:$(TZVER) grunt data-dedupe:$(TZVER) data/packed/$(TZVER).json: data/unpacked/$(TZVER).json grunt data-pack:$(TZVER) %/latest.json: %/$(TZVER).json cp $< $@ tests/zones/%.js: data/packed/latest.json temp/collect/latest.json grunt data-tests execute_after_dh_auto_clean: rm -f data/packed/$(TZVER).json data/unpacked/$(TZVER).json data/meta/$(TZVER).json rm -rf temp/ endif %: dh $@ override_dh_auto_build: data/packed/latest.json data/unpacked/latest.json \ tests/zones/zulu.js grunt build uglifyjs moment-timezone.js -o moment-timezone.min.js uglifyjs moment-timezone-utils.js -o moment-timezone-utils.min.js cd builds; for i in *.js; do \ uglifyjs $$i -o $${i%.js}.min.js; \ done