File: rules

package info (click to toggle)
mozilla-locale-es-es 1.7.3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,864 kB
  • ctags: 6
  • sloc: makefile: 80; sh: 16
file content (117 lines) | stat: -rwxr-xr-x 3,468 bytes parent folder | download
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/usr/bin/make -f
# debian/rules for mozilla-locale-es
# based on the mozilla-locale-de package
# GNU copyright 1997 to 1999 by Joey Hess.
# (c) 2002, 2003 Javier Fernandez-Sanguino

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

# This is the debhelper compatability version to use.
export DH_COMPAT=3

LOC=ES
LANG=es
mozillalocale=mozilla-locale-es
installed_locale=installed-locale-es
mozilladir=/usr/lib/mozilla

build: build-stamp
build-stamp:
	dh_testdir

	mkdir -p temp-$(LOC) 
	# The global one contains both the locale and registry
	# entries
	unzip -o -d temp-$(LOC) globeses.xpi
	unzip -o -d temp-$(LOC) langeses.xpi
	unzip -o -d temp-$(LOC) reges.xpi

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	-rm -rf temp-*

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	for i in $(LOC); do \
	cd $(CURDIR) ; \
	export loc=`echo $$i | perl -ne 'print lc'`; \
	echo Creating location for $$loc ; \
	cp debian/50$(LANG)$$i-locale debian/$(mozillalocale)-$$loc/var/lib/mozilla/chrome.d ; \
	install -d  $(CURDIR)/debian/$(mozillalocale)-$$loc/$(mozilladir)/chrome/ ; \
	install -d  $(CURDIR)/debian/$(mozillalocale)-$$loc/$(mozilladir)/searchplugins/ ; \
	[ -f temp/bin/chrome/$(LANG)-unix.jar ] && \
	install -m 644 temp/bin/chrome/$(LANG)-unix.jar \
		$(CURDIR)/debian/$(mozillalocale)-$$loc/$(mozilladir)/chrome/ ; \
	[ -f temp/bin/chrome/$(LANG)-$$i.jar ] && \
	install -m 644 temp/bin/chrome/$(LANG)-$$i.jar \
		$(CURDIR)/debian/$(mozillalocale)-$$loc/$(mozilladir)/chrome/ ; \
	[ -f temp/bin/chrome/$$i.jar ] && \
	install -m 644 temp/bin/chrome/$$i.jar \
		$(CURDIR)/debian/$(mozillalocale)-$$loc/$(mozilladir)/chrome/ ; \
	cd temp-$$i/bin && tar chf - chrome  | \
	tar -C $(CURDIR)/debian/$(mozillalocale)-$$loc/$(mozilladir)/ -xhf - ; \
	done

# Where is the defaults dir?
#	cd temp-$$i/bin && tar chf - chrome defaults | \



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

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

binary: binary-indep binary-arch

consistency-check: build
# Check if the debian/50esXX files provide all the localize content
# (for update-mozilla-locale to work)
# Check if the items we are providing are available or not
	for i in $(LOC) ; do \
	echo "Checking consistency for $$i."; \
	cd temp-$$i/bin/chrome ;\
	for jarfiles in *.jar ; do \
	echo "Checking $$jarfiles in $$i." ;\
	[ -d locale ] && rm -rf locale ; \
	echo "A" | unzip $$jarfiles >/dev/null 2>&1;\
	echo "The following items are not provided by this jar but are defined" ; \
	for item in `cat $(CURDIR)/debian/50es$$i-locale | grep /$$jarfiles! |cut -d ! -f 2 | sed -e 's/^\///'`; do \
	[ ! -d  $(CURDIR)/temp-$$i/bin/chrome/$$item ]  && echo $$item ; \
	done ; \
	echo "The following items are present but have not been defined:" ; \
	for item in `find $(CURDIR)/temp-$$i/bin/chrome/locale -type d `; do \
	item=`echo $$item | sed -e 's/.*chrome\///'`;  \
	[ -z  "`grep $$item $(CURDIR)/debian/50es$$i-locale`" ] &&  \
	echo "locale,install,url,jar:resource:/chrome/$$jarfiles!/$$item" ; \
	done ; \
	done ; \
	cd $(CURDIR); \
	done

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