Subversion Repositories

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

Rev 43 | Details | Compare with Previous | Last modification | View Log | RSS feed

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