~ubuntu-branches/ubuntu/precise/lightning-extension/precise

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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/usr/bin/make -f

COMM_REPO	:=	http://hg.mozilla.org/releases/comm-release
XUL_SDK_DIR	:=	$(shell ls -d /usr/lib/thunderbird-devel-* | tail -n 1)
XPI_STAGE	:=	mozilla/dist/xpi-stage
XPI_FILES = \
	lightning \
	calendar-timezones \
	gdata-provider \
	$(NULL)

DEB_CONFIGURE_USER_FLAGS = 				\
	--enable-application=calendar			\
	--with-libxul-sdk=$(XUL_SDK_DIR)		\
	--with-system-libxul				\
	--disable-strip					\
	--disable-strip-libs				\
	--enable-optimize				\
	--disable-debug 				\
	--enable-official-branding			\
	--disable-sunbird				\
	--disable-ogg					\
	--disable-wave					\
	--disable-dbus					\
	--disable-libnotify				\
	--disable-necko-wifi				\
	--disable-crashreporter				\
    	--disable-webm 					\
    	--disable-libjpeg-turbo 			\
    	--enable-chrome-format=jar 			\
    	--enable-libxul 				\
	--disable-tests					\
	--disable-elf-hack				\
	$(NULL)

%:
	dh $@ --with xul-ext

debian/stamp-autotools-moz:
	if [ ! -e $(CURDIR)/configure ]; then \
		`which autoconf2.13`; \
	fi
	if [ ! -e $(CURDIR)/mozilla/configure ]; then \
		cd mozilla; `which autoconf2.13`; \
	fi
	touch $@

override_dh_auto_configure: debian/stamp-autotools-moz
	dh_auto_configure -- $(DEB_CONFIGURE_USER_FLAGS)

override_dh_auto_install:
	$(foreach xpi,$(XPI_FILES),install-xpi -p xul-ext-$(xpi) $(XPI_STAGE)/$(xpi).xpi;)

override_dh_auto_clean:
	rm -f debian/stamp-autotools-moz
	dh_auto_clean

# Below here for building the source tarball
DIRS = \
	bridge \
	build \
	calendar \
	config \
	mozilla/browser/config \
	mozilla/build \
	mozilla/config \
	mozilla/other-licenses/ply/ply \
	mozilla/toolkit/mozapps/installer \
	mozilla/xpcom/idl-parser \
	mozilla/xpcom/typelib/xpt/tools \
	other-licenses/branding/sunbird \
	$(NULL)

FILES = \
	aclocal.m4 \
	allmakefiles.sh \
	configure.in \
	db/mork/Makefile.in \
	ldap/sdks/c-sdk/Makefile.in \
	ldap/xpcom/Makefile.in \
	mail/config/version.txt \
	Makefile.in \
	mozilla/aclocal.m4 \
	mozilla/allmakefiles.sh \
	mozilla/configure.in \
	mozilla/extensions/build.mk \
	mozilla/extensions/Makefile.in \
	mozilla/ipc/app/defs.mk \
	mozilla/LEGAL \
	mozilla/LICENSE \
	mozilla/Makefile.in \
	mozilla/netwerk/necko-config.h.in \
	mozilla/nsprpub/config/make-system-wrappers.pl \
	mozilla/probes/Makefile.in \
	mozilla/probes/mozilla-trace.d \
	mozilla/services/crypto/Makefile.in \
	mozilla/services/makefiles.sh \
	mozilla/services/Makefile.in \
	mozilla/services/sync/locales/Makefile.in \
	mozilla/services/sync/Makefile.in \
	mozilla/services/sync/tests/Makefile.in \
	mozilla/testing/testsuite-targets.mk \
	mozilla/toolkit/locales/l10n.mk \
	mozilla/toolkit/xre/make-platformini.py \
	mozilla/xpcom/xpcom-config.h.in \
	mozilla/xpcom/xpcom-private.h.in \
	mozilla/xpfe/components/autocomplete \
	suite/config/version.txt \
	$(NULL)

EXCLUDE = \
	*.hg* \
	*mozilla/config/*.exe \
	*mozilla/config/*.pyc \
	$(NULL)

$(foreach path, $(EXCLUDE), $(eval EXCLUDE_PARAMS += --exclude $(path)))

ifdef DEBIAN_TAG
REV_ARGS	:= --comm-rev=$(DEBIAN_TAG) --mozilla-rev=$(DEBIAN_TAG)
endif

ifdef LOCAL_BRANCH
COMM_REPO	:= $(shell echo $(LOCAL_BRANCH) | sed -n 's/\/\?$$//p')
COMM_REPO_NAME	:= $(notdir $(COMM_REPO))
MOZ_REPO	:= --mozilla-repo=$(dir $(COMM_REPO))/$(shell echo $(COMM_REPO_NAME) | sed -n 's/comm/mozilla/p')
endif

get-orig-source:
	rm -rf tmp
	mkdir tmp
	hg clone $(COMM_REPO) tmp/lightning-extension
	cd tmp/lightning-extension ; \
		python client.py checkout $(REV_ARGS) $(MOZ_REPO)
	cd tmp ; \
		if [ -z $(VERSION) ] ; then \
			ver=`cat $(CURDIR)/tmp/lightning-extension/calendar/sunbird/config/version.txt` ; \
		else \
			ver=$(VERSION) ; \
		fi ; \
		mv lightning-extension lightning-extension-$$ver ; \
		tar -jvc $(EXCLUDE_PARAMS) -f lightning-extension_$$ver.orig.tar.bz2 $(addprefix lightning-extension-$$ver/, $(DIRS) $(FILES))
	mv tmp/*.bz2 ../ && rm -rf tmp