File: rules

package info (click to toggle)
slashem 0.0.7E7F3-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 24,636 kB
  • sloc: ansic: 263,206; cpp: 7,180; yacc: 2,154; sh: 739; lex: 440; awk: 97; makefile: 63; sed: 11
file content (86 lines) | stat: -rwxr-xr-x 2,803 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
#!/usr/bin/make -f

%:
	dh $@

override_dh_clean:
	-rm -f build-stamp
	rm -f slashem-tty slashem-sdl slashem-x11 slashem-gtk slashem-qt
	-$(MAKE) spotless
	rm -f Makefile src/Makefile dat/Makefile doc/Makefile util/Makefile
	dh_clean

override_dh_auto_configure:
	# "Configuring" has been done in the form of that gigantic
	# slashem-debian.patch. Unfortunately upstream doesn't have any coherent
	# build system in place, so there's not much of an alternative...

override_dh_missing:
	dh_missing --list-missing

override_dh_auto_build:
	# Copy out the Makefiles
	$(SHELL) ./sys/unix/setup.sh foobar
	(cd util ; $(MAKE) recover)

	touch include/config.h
	$(MAKE) slashem GUI=TTY
	mv src/slashem slashem-tty

	touch include/config.h
	$(MAKE) slashem GUI=X11
	mv src/slashem slashem-x11

	touch include/config.h
	$(MAKE) slashem GUI=SDL
	mv src/slashem slashem-sdl

	touch include/config.h
	$(MAKE) all GUI=GTK
	mv src/slashem slashem-gtk

	# touch include/config.h
	# $(MAKE) all GUI=QT
	# mv src/slashem slashem-qt

override_dh_auto_install:
	cp slashem-tty src/slashem
	$(MAKE) install PREFIX=$(CURDIR)/debian/tmp
	-cp slashem-x11 debian/tmp/usr/games/
	-cp slashem-sdl debian/tmp/usr/games/
	-cp slashem-gtk debian/tmp/usr/games/
	-cp slashem-qt  debian/tmp/usr/games/
	cp util/recover debian/tmp/usr/lib/games/slashem/recover
	chown root:games debian/tmp/usr/lib/games/slashem/recover
	chmod 02755 debian/tmp/usr/lib/games/slashem/recover
	mkdir -p debian/slashem-common/usr/lib/games/slashem/
	install -m 0755 -o root -g root debian/recover-helper \
	        debian/slashem-common/usr/lib/games/slashem/recover-helper
	install -m 0755 -o root -g root debian/recover-all \
	        debian/slashem-common/usr/lib/games/slashem/recover-all
	mkdir -p debian/tmp/etc
	cp debian/slashemrc.x11 debian/tmp/etc/slashemrc.x11
	chown root:games debian/tmp/usr/lib/games/slashem/slashem
	chmod 02755 debian/tmp/usr/lib/games/slashem/slashem
	-chown root:games debian/tmp/usr/games/slashem-x11
	-chmod 02755 debian/tmp/usr/games/slashem-x11
	-chown root:games debian/tmp/usr/games/slashem-sdl
	-chmod 02755 debian/tmp/usr/games/slashem-sdl
	-chown root:games debian/tmp/usr/games/slashem-gtk
	-chmod 02755 debian/tmp/usr/games/slashem-gtk
	-chown root:games debian/tmp/usr/games/slashem-qt
	-chmod 02755 debian/tmp/usr/games/slashem-qt

	dh_install

override_dh_installinit:
	dh_installinit -r -u "start 80 S ."

override_dh_link:
	ln -s slashem.6.gz debian/slashem-x11/usr/share/man/man6/slashem-x11.6.gz
	ln -s slashem.6.gz debian/slashem-sdl/usr/share/man/man6/slashem-sdl.6.gz
	ln -s slashem.6.gz debian/slashem-gtk/usr/share/man/man6/slashem-gtk.6.gz

override_dh_fixperms:
	dh_fixperms -Xusr/lib/games/slashem/slashem -Xusr/games/slashem-x11 \
	            -Xusr/games/slashem-sdl -Xusr/games/slashem-gtk