Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 19 | Rev 23 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19 Rev 20
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
include /usr/share/dpatch/dpatch.make
16
include /usr/share/dpatch/dpatch.make
17
17
18
clean: clean-patched unpatch
18
clean: clean-patched unpatch
19
	dh_clean
19
	dh_clean
20
20
21
clean-patched: patch-stamp
21
clean-patched: patch-stamp
22
	dh_testdir
22
	dh_testdir
23
	dh_testroot
23
	dh_testroot
24
	rm -f build-stamp
24
	rm -f build-stamp
25
	rm -f pyscrabble-*.png pyscrabble-*.xpm
25
	rm -f pyscrabble-*.png pyscrabble-*.xpm
26
26
27
	python setup.py clean -a
27
	python setup.py clean -a
28
	find -name '*.pyc' -delete
28
	find -name '*.pyc' -delete
29
29
30
build: patch-stamp
30
build: patch-stamp
31
	python setup.py build
31
	python setup.py build
32
32
33
	for size in $(ICON_SIZES); do \
33
	for size in $(ICON_SIZES); do \
34
		rsvg -h $$size -w $$size debian/pyscrabble.svg pyscrabble-$$size.png; \
34
		rsvg -h $$size -w $$size debian/pyscrabble.svg pyscrabble-$$size.png; \
35
	done
35
	done
36
	for size in $(PIXMAP_SIZES); do \
36
	for size in $(PIXMAP_SIZES); do \
37
		convert pyscrabble-$$size.png pyscrabble-$${size}x$${size}.xpm; \
37
		convert pyscrabble-$$size.png pyscrabble-$${size}x$${size}.xpm; \
38
	done
38
	done
39
39
40
install: build
40
install: build
41
	dh_testdir
41
	dh_testdir
42
	dh_testroot
42
	dh_testroot
43
	dh_clean -k 
43
	dh_clean -k 
44
44
45
	python setup.py install --no-compile --root=$(DESTDIR) \
45
	python setup.py install --no-compile --root=$(DESTDIR) \
46
		--prefix=/usr \
46
		--prefix=/usr \
47
		--install-scripts=/usr/games \
47
		--install-scripts=/usr/games \
48
		--confdir=/etc/pyscrabble \
48
		--confdir=/etc/pyscrabble \
49
		--logdir=/var/log/pyscrabble \
49
		--logdir=/var/log/pyscrabble \
50
		--dbdir=/var/lib/pyscrabble
50
		--dbdir=/var/lib/pyscrabble
51
	install -m755 -d $(DESTDIR)/usr/sbin
51
	install -m755 -d $(DESTDIR)/usr/sbin
52
	mv $(DESTDIR)/usr/games/pyscrabble-main.py $(DESTDIR)/usr/games/pyscrabble
52
	mv $(DESTDIR)/usr/games/pyscrabble-main.py $(DESTDIR)/usr/games/pyscrabble
53
	mv $(DESTDIR)/usr/games/server_console.py $(DESTDIR)/usr/sbin/pyscrabble-server
53
	mv $(DESTDIR)/usr/games/server_console.py $(DESTDIR)/usr/sbin/pyscrabble-server
54
#	rm $(DESTDIR)/usr/bin/db_upgrade.py
54
#	rm $(DESTDIR)/usr/bin/db_upgrade.py
55
	install -m755 -d $(DESTDIR)/usr/share/pixmaps
55
	install -m755 -d $(DESTDIR)/usr/share/pixmaps
56
	install -m644 pyscrabble-*.xpm $(DESTDIR)/usr/share/pixmaps
56
	install -m644 pyscrabble-*.xpm $(DESTDIR)/usr/share/pixmaps
57
	install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/scalable/apps
57
	install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/scalable/apps
58
	gzip < debian/pyscrabble.svg > $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/pyscrabble.svgz
58
	gzip < debian/pyscrabble.svg > $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/pyscrabble.svgz
59
	for size in $(ICON_SIZES); do \
59
	for size in $(ICON_SIZES); do \
60
		install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \
60
		install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \
61
		install -m644 pyscrabble-$$size.png \
61
		install -m644 pyscrabble-$$size.png \
62
			$(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/pyscrabble.png; \
62
			$(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/pyscrabble.png; \
63
	done
63
	done
64
	install -d -m755 $(DESTDIR)/usr/share/applications/
64
	install -d -m755 $(DESTDIR)/usr/share/applications/
65
	install -m644 debian/pyscrabble.desktop $(DESTDIR)/usr/share/applications/
65
	install -m644 debian/pyscrabble.desktop $(DESTDIR)/usr/share/applications/
66
66
67
67
68
68
69
# Build architecture-dependent files here.
69
# Build architecture-dependent files here.
70
binary-arch:
70
binary-arch:
71
# We have nothing to do by default.
71
# We have nothing to do by default.
72
72
73
# Build architecture-independent files here.
73
# Build architecture-independent files here.
74
binary-indep: build install
74
binary-indep: build install
75
	dh_testdir
75
	dh_testdir
76
	dh_testroot
76
	dh_testroot
77
	dh_install --sourcedir=debian/tmp
77
	dh_install --sourcedir=debian/tmp
78
	dh_link
78
	dh_link
79
	dh_pycentral
79
	dh_pycentral
80
	dh_installchangelogs CHANGELOG.txt
80
	dh_installchangelogs CHANGELOG.txt
81
	dh_installdocs
81
	dh_installdocs
82
	dh_installexamples
82
	dh_installexamples
83
	dh_installman
83
	dh_installman
84
	dh_installinit -r
84
	dh_installinit -r
85
	dh_installmenu
85
	dh_installmenu
86
	dh_desktop
-
 
87
	dh_strip
86
	dh_strip
88
	dh_compress
87
	dh_compress
89
	dh_fixperms
88
	dh_fixperms
90
	dh_installdeb
89
	dh_installdeb
91
	dh_shlibdeps
90
	dh_shlibdeps
92
	dh_gencontrol
91
	dh_gencontrol
93
	dh_md5sums
92
	dh_md5sums
94
	dh_builddeb
93
	dh_builddeb
95
94
96
binary: binary-indep binary-arch
95
binary: binary-indep binary-arch
97
.PHONY: build clean binary-indep binary-arch binary install configure
96
.PHONY: build clean binary-indep binary-arch binary install configure