summaryrefslogtreecommitdiffabout
path: root/Makefile.am
blob: a3236ce8de7904e43bbc3c93231640b9cce75eb2 (plain)
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
SUBDIRS = content locale

xpi_DATA = \
	install.rdf \
	AUTHORS COPYING NEWS

EXTRA_DIST = NEWS NEWS.xml NEWS.xsl chrome.manifest

XPI=${PACKAGE}-${VERSION}.xpi

xpi: ${XPI}

${XPI}: install
	test -z "${NO_UPDATE}" || sed -i -e '/em:update\(URL\|Key\)/d' ${xpidir}/install.rdf
	cd ${xpichromedir} \
	&& ${ZIP} -r -m ${PACKAGE}.jar */
	cd ${xpidir} \
	&& ${ZIP} -r @abs_builddir@/$@ .

update.rdf: update-template.rdf ${XPI}
	sed -e "s/<!--SHA1-->/$$(sha1sum ${XPI}|cut -d\  -f1)/" <$< >$@

install-data-local: ${xpidir}/chrome.manifest

${xpidir}/chrome.manifest: chrome.manifest Makefile
	sed \
	 -e 's,^content[[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+\([^[:space:]]\+\)$$,content \1 jar:chrome/${PACKAGE}.jar!/\2,' \
	 -e 's,^locale[[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+\([^[:space:]]\+\)$$,locale \1 \2 jar:chrome/${PACKAGE}.jar!/\3,' \
	 $< >$@

clean-local:
	rm -rf ${xpidir} ${XPI}

all-local: NEWS

NEWS: NEWS.xsl NEWS.xml
	${XSLTPROC} -o $@ NEWS.xsl NEWS.xml

mozextptr: ${MOZ_EXT_ID}
${MOZ_EXT_ID}:
	echo @abs_srcdir@ >$@