Subversion Repositories

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

Rev 23 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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