File: rules

package info (click to toggle)
tzdata 2008e-1etch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 228 kB
  • ctags: 5
  • sloc: sh: 80; makefile: 73
file content (98 lines) | stat: -rwxr-xr-x 2,168 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export LC_ALL=C

TZGEN := $(CURDIR)/tzgen
TZSOURCE := $(CURDIR)/tzsource
TIMEZONES := africa \
             antarctica \
             asia \
             australasia \
             europe \
             northamerica \
             southamerica \
             etcetera \
             factory \
             solar87 \
             solar88 \
             solar89 \
             backward \
             systemv 

QUILT := quilt --quiltrc ../debian/patches/quiltrc

build: build-stamp
build-stamp:
	dh_testdir

	# Unpack the sources
	mkdir $(TZSOURCE)
	for x in $$(ls tzdata*.tar.gz); do \
	  tar -xzvC $(TZSOURCE) -f $${x} ;\
	done
	
	# Apply patches
	@cd $(TZSOURCE); \
	if $(QUILT) next >/dev/null 2>&1; then \
	  echo -n "Applying patches..."; \
	  if $(QUILT) push -a -v > $(CURDIR)/patch-log 2>&1; then \
	    echo "successful."; \
	  else \
	    echo "failed! (check $(CURDIR)/patch-log for details)"; \
	    exit 1; \
	  fi; \
	else \
	  echo "No patches to apply"; \
	fi
	
	# Build
	for zone in $(TIMEZONES); do \
	  /usr/sbin/zic -d $(TZGEN) -L /dev/null -y $(TZSOURCE)/yearistype.sh $(TZSOURCE)/$${zone} ; \
	  /usr/sbin/zic -d $(TZGEN)/posix -L /dev/null -y $(TZSOURCE)/yearistype.sh $(TZSOURCE)/$${zone} ; \
	  /usr/sbin/zic -d $(TZGEN)/right -L $(TZSOURCE)/leapseconds -y $(TZGEN)/yearistype.sh $(TZSOURCE)/$${zone} ; \
	done

	# Generate a posixrules file
	/usr/sbin/zic -d $(TZGEN) -p America/New_York
						
	touch $@

clean:
	dh_testdir
	dh_testroot
	-rm -rf $(TZSOURCE) $(TZGEN) .pc
	rm -f build-stamp
	rm -f patch-log
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	# Do nothing

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdirs
	dh_install
	dh_installchangelogs
	dh_link
	dh_installdocs
	dh_installinfo
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install