File: rules

package info (click to toggle)
exult 1.2-4
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 9,040 kB
  • ctags: 10,543
  • sloc: cpp: 99,373; sh: 8,333; ansic: 4,659; makefile: 988; yacc: 769; lex: 313; xml: 19
file content (125 lines) | stat: -rwxr-xr-x 3,496 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/make -f
#
# Debug builds:
#   If the environment variable DEB_BUILD_OPTIONS contains the substring 
#   debug , then the package is built with debugging info included.
#
#   To go with this, you'll probably want to leave the binaries unstripped;
#   having the substring nostrip in DEB_BUILD_OPTIONS will achieve this.
# 
#   Alternatively, just uncomment the line below

#export DEB_BUILD_OPTIONS=debug:nostrip:$DEB_BUILD_OPTIONS

# For normal, everyday builds, you can leave DEB_BUILD_OPTIONS blank
# or unset or whatever.
#
# Based on:
# Sample debian rules that uses debhelper
# GNU copyright 1997 by Joey Hess.
#
# Modified for exult and exult-tools by 
# Michael `Wumpus' Zinn <michael.z@acm.org>

# Modified for the Debian GNU/Linux system by
# Carlos Laviola <claviola@debian.org>

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

# This is the debhelper compatability version to use.
export DH_COMPAT=3

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  DEBUG := --enable-debug --disable-sdl-parachute
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  export CFLAGS := $(CFLAGS) -O0
  export CXXFLAGS := $(CXXFLAGS) -O0
endif

DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE  := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
  confopts := --build $(DEB_BUILD_GNU_TYPE)
else
  confopts := --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

CRUFT := usecode/compiler/uclex.cc usecode/compiler/ucparse.cc \
	 usecode/compiler/ucparse.h data/exult_flx.h data/exult_bg_flx.h \
	 data/exult_si_flx.h

bin := debian/tmp/usr/bin
exult_pixmaps := debian/exult/usr/share/pixmaps

configure: configure-stamp
configure-stamp:
	dh_testdir
	
	sh autogen.sh
	./configure $(CONFIGURE_DEBUG) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info $(DEBUG) --datadir=/usr/share/games --enable-exult-studio --enable-gimp-plugin $(confopts)
	
	touch configure-stamp
	
build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	-$(MAKE) distclean
	dh_clean $(CRUFT)
	dh_clean
	
install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	mkdir -p debian/tmp/usr/share/games/exult/estudio/new
	# Install the package into debian/tmp; dh_movefiles then puts
	# the files into debian/exult or debian/exult-tools as
	# required.
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	dh_movefiles -Nexult
	dh_movefiles -pexult
	@if [ `find debian/tmp -type d -or -print | wc -l` -gt 0 ]; then \
	    echo The following files are not accounted for:; \
	    find debian/tmp -type d -or -print; \
	    false; \
	fi
	install -d $(exult_pixmaps)
	install -m644 debian/exult.xpm $(exult_pixmaps)
	# handle the exult binary
	mv $(CURDIR)/debian/exult/usr/bin/exult \
		$(CURDIR)/debian/exult/usr/games/exult.bin
	install -m755 debian/exult.wrapper $(CURDIR)/debian/exult/usr/games/exult

binary-indep:
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installman -p exult-studio debian/exult_studio.1 debian/ucc.1
	dh_installchangelogs ChangeLog
	dh_installdebconf
	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