File: rules

package info (click to toggle)
hex-a-hop 0.0.20070315-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 3,668 kB
  • ctags: 705
  • sloc: cpp: 5,296; ansic: 153; makefile: 148
file content (81 lines) | stat: -rwxr-xr-x 2,007 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

CFLAGS = -Wall -W -g -DUSE_GETTEXT

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

patch:
	dh_testdir
	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2

unpatch:
	dh_testdir
	QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2

configure: configure-stamp
configure-stamp:
	dh_testdir
	$(MAKE) -f /usr/share/quilt/quilt.make patch
	touch $@

build: build-stamp
build-stamp: configure-stamp 
	dh_testdir
	$(MAKE) CXXFLAGS="$(CFLAGS)" NAME="hex-a-hop" DATA_DIR="/usr/share/games/hex-a-hop"
	$(MAKE) CXXFLAGS="$(CFLAGS)" NAME="hex-a-hop" DATA_DIR="/usr/share/games/hex-a-hop" -C debian/i18n
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	$(MAKE) -C debian/i18n clean
	[ ! -f Makefile ] || $(MAKE) NAME="hex-a-hop" clean
	$(MAKE) -f /usr/share/quilt/quilt.make unpatch
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	install -p -d -m 755 $(CURDIR)/debian/hex-a-hop/usr/share/lintian/overrides/
	install -m 644 debian/lintian-override $(CURDIR)/debian/hex-a-hop/usr/share/lintian/overrides/hex-a-hop
	#$(MAKE) DESTDIR=$(CURDIR)/debian/hex-a-hop install
	$(MAKE) -C debian/i18n install LOCALEDIR=$(CURDIR)/debian/hex-a-hop/usr/share/locale/ \
	  MANDIR=$(CURDIR)/debian/hex-a-hop/usr/share/man/


# Build architecture-independent files here.
binary-indep: build install

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs debian/hints.html
	dh_installexamples
	dh_install
	dh_installmenu
	# dh_installman is not yet able to install translations into <lang>.UTF-8/
	dh_installman debian/hex-a-hop.6
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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