Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 -include /usr/share/dpkg/buildtools.mk
4 CC_FOR_BUILD ?= $(CC)
5
6 PACKAGE = ace-of-penguins
7 PRGPREFIX = ace-
8 ICON_NAME = ace.png
9 ICON_SRC = desktop/ace.png
10
11 # list of programs taken from games/Makefile
12 PROGS = \
13 canfield \
14 freecell \
15 golf \
16 mastermind \
17 merlin \
18 minesweeper \
19 pegged \
20 solitaire \
21 spider \
22 taipedit \
23 taipei \
24 thornq
25
26 CFLAGS += -D_FILE_OFFSET_BITS=64
27 cc := $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
28
29 CONFFLAGS = --prefix=/usr --bindir=/usr/games
30
31 include debian/debian-vars.mk
32
33 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
34
35 # NOTE: The sources won't compile with -pedantic
36 export DEB_CFLAGS_MAINT_APPEND = -Wall $(CPPFLAGS) -std=gnu17
37
38 MANDIR = $(MANROOTDIR)/man6
39
40 #######################################################################
41
42 override_dh_auto_configure:
43 CC="$(cc)" dh_auto_configure -- $(CONFFLAGS)
44
45 override_dh_auto_build: build-man
46 dh_auto_build -- CC="$(cc)" BUILD_CC="$(CC_FOR_BUILD)"
47
48 test:
49 # target: test
50
51 @echo "# Display commands to test programs. Feed through '| sh'" >&2
52
53 @for prog in $(PROGS); \
54 do \
55 echo "$$prog &"; \
56 done
57
58 man:
59 # target: man
60 $(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) \
61 MANSECT=6 makeman
62
63 clean-man:
64 # target: clean-man - remove manual page links (will be generated)
65
66 for NAME in $(PROGS); \
67 do \
68 man=$(DEBDIR)/$(PRGPREFIX)$$NAME.6; \
69 rm -f $$man; \
70 done || :
71
72 build-man: man
73 # target: build-man - link pages to master page
74 for NAME in $(PROGS); \
75 do \
76 man=debian/$(PRGPREFIX)$$NAME.6; \
77 echo ".so man6/ace-of-penguins.6" > $$man; \
78 done
79
80 override_dh_auto_test:
81 # nothing to test
82
83 override_dh_clean: clean-man
84 # target: clean - You may safely ignore message "invalid host type"
85 if [ -f Makefile ]; then \
86 $(MAKE) \
87 to_srcdir="$(TOPDIR)" \
88 top_builddir="$(TOPDIR)" \
89 clean distclean \
90 || : ; \
91 fi
92
93 rm -rf lib/.lib lib/.deps games/.lib games/.deps */*.[ao] *.[ao]
94
95 dh_clean
96
97 override_dh_installman:
98 dh_installman
99 # Check that all is in order
100 echo "PWD: pwd"
101 ( cd $(MANDIR) && ls -l )
102
103 override_dh_auto_install:
104 dh_auto_install
105
106 # rename programs to start with prefix
107 for NAME in $(PROGS) ; do \
108 mv $(PKGDIR)/usr/games/$$NAME \
109 $(PKGDIR)/usr/games/$(PRGPREFIX)$$NAME || exit 1; \
110 done
111
112 $(INSTALL_DIR) $(PKGDIR)/usr/share/applications
113 $(INSTALL_DATA) debian/desktop/*.desktop $(PKGDIR)/usr/share/applications
114
115 # delete test program
116 rm -f $(PKGDIR)/usr/games/penguins
117
118 # Not used in Debian
119 find $(PKGDIR) -name "*.la" | xargs --no-run-if-empty rm -f
120
121 # Install custom icon
122 install -D -m 644 $(ICON_SRC) $(ICONDIR)/hicolor/48x48/apps/$(ICON_NAME)
123
124 override_dh_installdocs:
125 # Policy: COPYING file is not needed
126 dh_installdocs -X COPYING -X .git -X CVS -X .svn docs/*
127
128 %:
129 dh $@
130
131 .PHONY: test man build-man clean-man
132
133 # End of file