]> git.donarmstrong.com Git - dactyl.git/blob - debian/rules
Work around the binary/ directory by adding an extra target
[dactyl.git] / debian / rules
1 #!/usr/bin/make -f
2
3 PACKAGES=pentadactyl # teledactyl melodactyl
4 VERSION=$(shell dpkg-parsechangelog | \
5         sed -n -e '/^Version:/ { s/^Version:\s*//; s/[^a-z0-9]/_/g; p }')
6
7 %:
8         dh $@ --with xul-ext
9
10 # this silliness is needed due to the binary/ directory in the project root
11 .PHONY: binary
12 binary:
13         dh binary --with xul-ext
14
15 override_dh_auto_build:
16         make DIRS=$(PACKAGES) MANGLE=chrome XPI_FILES='bootstrap.js NEWS' xpi
17
18 override_dh_auto_install:
19         for PACKAGE in $(PACKAGES); \
20                 do install-xpi -p xul-ext-$$PACKAGE downloads/$$PACKAGE-*.xpi; \
21                 done
22
23 override_dh_auto_clean:
24         make DIRS=$(PACKAGES) clean
25         for PACKAGE in $(PACKAGES); \
26                 do rm -f $$PACKAGE/chrome.zip; \
27                 done
28
29 override_dh_installchangelogs:
30         for PACKAGE in $(PACKAGES); \
31                 do dh_installchangelogs -p xul-ext-$$PACKAGE $$PACKAGE/NEWS; \
32                 done
33
34 UPSTREAM_REPO=../upstream
35 UPSTREAM_REVISION=pentadactyl-1.0rc1
36 UPSTREAM_DEST=$(shell pwd)/dactyl.tar.gz
37
38 get-orig-source:
39         rm -f .hg-repo-created
40         test -d $(UPSTREAM_REPO) || ( cd `dirname $(UPSTREAM_REPO)` && \
41                 hg clone http://dactyl.googlecode.com/hg/ `basename $(UPSTREAM_REPO)` && \
42                 touch .hg-repo-created )
43         hg --cwd $(UPSTREAM_REPO) pull
44         hg --cwd $(UPSTREAM_REPO) update
45         hg --cwd $(UPSTREAM_REPO) archive \
46                 -r $(UPSTREAM_REVISION) -p dactyl \
47                 -X .hgtags -X common/javascript.vim \
48                 -t tgz $(UPSTREAM_DEST)
49         test ! -f .hg-repo-created || ( rm -rf $(UPSTREAM_REPO); rm -f .hg-repo-created )