cb105b0d15627a22971841771860fc90709c5da9
[xkcdha] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 PACKAGE := $(shell head -1 $(CURDIR)/debian/changelog | sed 's/^\([^ ]\+\) .*/\1/')
7 PREFIX := $(CURDIR)/debian/$(PACKAGE)
8 PYTHON := python2.5
9
10 build: build-stamp
11
12 build-stamp: 
13         dh_testdir
14         python setup.py build
15         touch $@
16
17 clean:
18         dh_testdir
19         dh_testroot
20         rm -f build-stamp
21         rm -f *.pyc
22         dh_clean 
23
24 install: build
25         dh_testdir
26         dh_testroot
27         dh_clean -k 
28         dh_installdirs
29         cp $(CURDIR)/$(PACKAGE).py $(PREFIX)/usr/lib/hildon-desktop/
30         cp $(CURDIR)/$(PACKAGE).desktop $(PREFIX)/usr/share/applications/hildon-home/
31         cp $(CURDIR)/$(PACKAGE).app.desktop $(PREFIX)/usr/share/applications/hildon/$(PACKAGE).desktop
32         cp $(CURDIR)/$(PACKAGE).service $(PREFIX)/usr/share/dbus-1/services/
33         cp -r $(CURDIR)/icons $(PREFIX)/usr/share/$(PACKAGE)/
34         cp -r $(CURDIR)/maemo-icons/* $(PREFIX)/usr/share/icons/
35         cp -r $(CURDIR)/img $(PREFIX)/usr/share/$(PACKAGE)/
36         dh_link usr/lib/hildon-desktop/$(PACKAGE).py usr/bin/$(PACKAGE)
37
38 binary-indep: build install
39         dh_testdir
40         dh_testroot
41         dh_installchangelogs
42         dh_installdocs
43         #dh_installmenu
44         #dh_python
45         dh_compress
46         dh_fixperms
47         dh_installdeb
48         #dh_shlibdeps
49         dh_gencontrol
50         dh_md5sums
51         dh_builddeb
52
53 binary-arch: build install
54
55 binary: binary-indep binary-arch
56 .PHONY: build clean binary-indep binary-arch binary install