File: rules

package info (click to toggle)
pyscrabble 1.6.2-10
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 15,652 kB
  • ctags: 1,897
  • sloc: python: 11,697; sh: 77; makefile: 69
file content (94 lines) | stat: -rwxr-xr-x 2,658 bytes parent folder | download | duplicates (2)
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
#!/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

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

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

build: build-indep
build-arch:
build-indep: build-stamp
build-stamp:
	python setup.py build

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

install: build
	dh_testdir
	dh_testroot
	dh_prep

	python setup.py install --no-compile --root=$(DESTDIR) \
		--install-layout=deb \
		--install-scripts=/usr/share/games/pyscrabble/python \
		--install-lib=/usr/share/games/pyscrabble/python \
		--confdir=/etc/pyscrabble \
		--logdir=/var/log/pyscrabble \
		--dbdir=/var/lib/pyscrabble
	install -m755 -d $(DESTDIR)/usr/sbin
	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_python2 /usr/share/games/pyscrabble/python
	dh_installchangelogs CHANGELOG.txt
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_installinit -r
	dh_installmenu
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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