File: rules

package info (click to toggle)
pyscrabble 1.6.2-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 15,276 kB
  • ctags: 1,396
  • sloc: python: 11,667; sh: 429; makefile: 67
file content (95 lines) | stat: -rwxr-xr-x 2,691 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DESTDIR=$(CURDIR)/debian/tmp
ICON_SIZES=16 22 32 48 64 96
PIXMAP_SIZES=16 32

include /usr/share/dpatch/dpatch.make

clean: clean-patched unpatch
	dh_clean

clean-patched: patch-stamp
	dh_testdir
	dh_testroot
	rm -f build-stamp
	rm -f pyscrabble-*.png pyscrabble-*.xpm

	python setup.py clean -a
	find -name '*.pyc' -delete

build: patch-stamp
	python setup.py build

	for size in $(ICON_SIZES); do \
		rsvg -h $$size -w $$size debian/pyscrabble.svg pyscrabble-$$size.png; \
	done
	for size in $(PIXMAP_SIZES); do \
		convert pyscrabble-$$size.png pyscrabble-$${size}x$${size}.xpm; \
	done

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 

	python setup.py install --no-compile --root=$(DESTDIR) \
		--install-scripts=/usr/games \
		--confdir=/etc/pyscrabble \
		--logdir=/var/log/pyscrabble \
		--dbdir=/var/lib/pyscrabble
	mv $(DESTDIR)/usr/games/pyscrabble-main.py $(DESTDIR)/usr/games/pyscrabble
	mv $(DESTDIR)/usr/games/server_console.py $(DESTDIR)/usr/games/pyscrabble-server
#	rm $(DESTDIR)/usr/bin/db_upgrade.py
	install -m755 -d $(DESTDIR)/usr/share/pixmaps
	install -m644 pyscrabble-*.xpm $(DESTDIR)/usr/share/pixmaps
	install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/scalable/apps
	gzip < debian/pyscrabble.svg > $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/pyscrabble.svgz
	for size in $(ICON_SIZES); do \
		install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \
		install -m644 pyscrabble-$$size.png \
			$(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/pyscrabble.png; \
	done
	install -d -m755 $(DESTDIR)/usr/share/applications/
	install -m644 debian/pyscrabble.desktop $(DESTDIR)/usr/share/applications/



# Build architecture-dependent files here.
binary-arch:
# We have nothing to do by default.

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_install --sourcedir=debian/tmp
	dh_link
	dh_pycentral
	dh_installchangelogs CHANGELOG.txt
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_installinit -r
	dh_installmenu
	dh_desktop
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure