File: rules

package info (click to toggle)
hannah 1.0-3.1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 8,932 kB
  • sloc: cpp: 2,170; makefile: 81
file content (41 lines) | stat: -rwxr-xr-x 1,218 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
#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
	dh $@

override_dh_auto_build-arch:
	$(MAKE) DATA_INSTALL_DIR=/usr/share/games/hannah/ \
	    SCOREDIR=/var/games/hannah/ CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" \
	    LDFLAGS="$(LDFLAGS)"

override_dh_auto_build-indep:
	# Avoid building the package for hannah-data
	:

override_dh_auto_clean:
	rm -f *.o hhh

override_dh_auto_install-arch:
	# dh_install cannot rename files
	cp $(CURDIR)/hhh $(CURDIR)/debian/hannah/usr/games/hannah

override_dh_auto_install-indep:
	# Transform the png into an xpm icon
	convert $(CURDIR)/hannah/default/hannah_down1.png $(CURDIR)/debian/hannah-data/usr/share/pixmaps/hannah.xpm

override_dh_fixperms-indep:
	dh_fixperms
	# Fix /var/games/hannah/hiscore.dat permissions
	chgrp games $(CURDIR)/debian/hannah-data/var/games/hannah/hiscore.dat
	chmod 664 $(CURDIR)/debian/hannah-data/var/games/hannah/hiscore.dat

override_dh_fixperms-arch:
	dh_fixperms
	# Make sure the binary belongs to the "games" group and set-gid it.
	chgrp games $(CURDIR)/debian/hannah/usr/games/hannah
	chmod 2755 $(CURDIR)/debian/hannah/usr/games/hannah