Rev 38 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 38 | Rev 43 | ||
---|---|---|---|
1 | #!/usr/bin/make -f |
1 | #!/usr/bin/make -f |
2 | # -*- makefile -*- |
2 | # -*- makefile -*- |
3 | # Sample debian/rules that uses debhelper. |
3 | # Sample debian/rules that uses debhelper. |
4 | # This file was originally written by Joey Hess and Craig Small. |
4 | # This file was originally written by Joey Hess and Craig Small. |
5 | # As a special exception, when this file is copied by dh-make into a |
5 | # As a special exception, when this file is copied by dh-make into a |
6 | # dh-make output file, you may use that output file without restriction. |
6 | # dh-make output file, you may use that output file without restriction. |
7 | # This special exception was added by Craig Small in version 0.37 of dh-make. |
7 | # This special exception was added by Craig Small in version 0.37 of dh-make. |
8 | 8 | ||
9 | # Uncomment this to turn on verbose mode. |
9 | # Uncomment this to turn on verbose mode. |
10 | #export DH_VERBOSE=1 |
10 | #export DH_VERBOSE=1 |
11 | 11 | ||
12 | DESTDIR=$(CURDIR)/debian/tmp |
12 | DESTDIR=$(CURDIR)/debian/tmp |
13 | ICON_SIZES=16 22 32 48 64 96 |
13 | ICON_SIZES=16 22 32 48 64 96 |
14 | PIXMAP_SIZES=16 32 |
14 | PIXMAP_SIZES=16 32 |
15 | 15 | ||
16 | clean: |
16 | clean: |
17 | dh_testdir |
17 | dh_testdir |
18 | dh_testroot |
18 | dh_testroot |
19 | rm -f build-stamp |
19 | rm -f build-stamp |
20 | rm -f pyscrabble-*.png pyscrabble-*.xpm |
20 | rm -f pyscrabble-*.png pyscrabble-*.xpm |
21 | 21 | ||
22 | python setup.py clean -a |
22 | python setup.py clean -a |
23 | find -name '*.pyc' -delete |
23 | find -name '*.pyc' -delete |
24 | dh_clean |
24 | dh_clean |
25 | 25 | ||
26 | build: build-stamp |
26 | build: build-indep |
- | 27 | build-arch: |
|
- | 28 | build-indep: build-stamp |
|
27 | build-stamp: |
29 | build-stamp: |
28 | python setup.py build |
30 | python setup.py build |
29 | 31 | ||
30 | for size in $(ICON_SIZES); do \ |
32 | for size in $(ICON_SIZES); do \ |
31 | rsvg -h $$size -w $$size debian/pyscrabble.svg pyscrabble-$$size.png; \ |
33 | rsvg -h $$size -w $$size debian/pyscrabble.svg pyscrabble-$$size.png; \ |
32 | done |
34 | done |
33 | for size in $(PIXMAP_SIZES); do \ |
35 | for size in $(PIXMAP_SIZES); do \ |
34 | convert pyscrabble-$$size.png pyscrabble-$${size}x$${size}.xpm; \ |
36 | convert pyscrabble-$$size.png pyscrabble-$${size}x$${size}.xpm; \ |
35 | done |
37 | done |
36 | touch "$@" |
38 | touch "$@" |
37 | 39 | ||
38 | install: build |
40 | install: build |
39 | dh_testdir |
41 | dh_testdir |
40 | dh_testroot |
42 | dh_testroot |
41 | dh_prep |
43 | dh_prep |
42 | 44 | ||
43 | python setup.py install --no-compile --root=$(DESTDIR) \ |
45 | python setup.py install --no-compile --root=$(DESTDIR) \ |
44 | --install-layout=deb \ |
46 | --install-layout=deb \ |
45 | --install-scripts=/usr/share/games/pyscrabble/python \ |
47 | --install-scripts=/usr/share/games/pyscrabble/python \ |
46 | --install-lib=/usr/share/games/pyscrabble/python \ |
48 | --install-lib=/usr/share/games/pyscrabble/python \ |
47 | --confdir=/etc/pyscrabble \ |
49 | --confdir=/etc/pyscrabble \ |
48 | --logdir=/var/log/pyscrabble \ |
50 | --logdir=/var/log/pyscrabble \ |
49 | --dbdir=/var/lib/pyscrabble |
51 | --dbdir=/var/lib/pyscrabble |
50 | install -m755 -d $(DESTDIR)/usr/sbin |
52 | install -m755 -d $(DESTDIR)/usr/sbin |
51 | install -m755 -d $(DESTDIR)/usr/share/pixmaps |
53 | install -m755 -d $(DESTDIR)/usr/share/pixmaps |
52 | install -m644 pyscrabble-*.xpm $(DESTDIR)/usr/share/pixmaps |
54 | install -m644 pyscrabble-*.xpm $(DESTDIR)/usr/share/pixmaps |
53 | install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/scalable/apps |
55 | install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/scalable/apps |
54 | gzip < debian/pyscrabble.svg > $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/pyscrabble.svgz |
56 | gzip < debian/pyscrabble.svg > $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/pyscrabble.svgz |
55 | for size in $(ICON_SIZES); do \ |
57 | for size in $(ICON_SIZES); do \ |
56 | install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \ |
58 | install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \ |
57 | install -m644 pyscrabble-$$size.png \ |
59 | install -m644 pyscrabble-$$size.png \ |
58 | $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/pyscrabble.png; \ |
60 | $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/pyscrabble.png; \ |
59 | done |
61 | done |
60 | install -d -m755 $(DESTDIR)/usr/share/applications/ |
62 | install -d -m755 $(DESTDIR)/usr/share/applications/ |
61 | install -m644 debian/pyscrabble.desktop $(DESTDIR)/usr/share/applications/ |
63 | install -m644 debian/pyscrabble.desktop $(DESTDIR)/usr/share/applications/ |
62 | 64 | ||
63 | 65 | ||
64 | 66 | ||
65 | # Build architecture-dependent files here. |
67 | # Build architecture-dependent files here. |
66 | binary-arch: |
68 | binary-arch: |
67 | # We have nothing to do by default. |
69 | # We have nothing to do by default. |
68 | 70 | ||
69 | # Build architecture-independent files here. |
71 | # Build architecture-independent files here. |
70 | binary-indep: build install |
72 | binary-indep: build install |
71 | dh_testdir |
73 | dh_testdir |
72 | dh_testroot |
74 | dh_testroot |
73 | dh_install --sourcedir=debian/tmp |
75 | dh_install --sourcedir=debian/tmp |
74 | dh_link |
76 | dh_link |
75 | dh_python2 /usr/share/games/pyscrabble/python |
77 | dh_python2 /usr/share/games/pyscrabble/python |
76 | dh_installchangelogs CHANGELOG.txt |
78 | dh_installchangelogs CHANGELOG.txt |
77 | dh_installdocs |
79 | dh_installdocs |
78 | dh_installexamples |
80 | dh_installexamples |
79 | dh_installman |
81 | dh_installman |
80 | dh_installinit -r |
82 | dh_installinit -r |
81 | dh_installmenu |
83 | dh_installmenu |
82 | dh_strip |
84 | dh_strip |
83 | dh_compress |
85 | dh_compress |
84 | dh_fixperms |
86 | dh_fixperms |
85 | dh_installdeb |
87 | dh_installdeb |
86 | dh_shlibdeps |
88 | dh_shlibdeps |
87 | dh_gencontrol |
89 | dh_gencontrol |
88 | dh_md5sums |
90 | dh_md5sums |
89 | dh_builddeb |
91 | dh_builddeb |
90 | 92 | ||
91 | binary: binary-indep binary-arch |
93 | binary: binary-indep binary-arch |
92 | .PHONY: build clean binary-indep binary-arch binary install configure |
94 | .PHONY: build build-indep build-arch clean binary-indep binary-arch binary install configure |