File: rules

package info (click to toggle)
lxdoom 1.4.4main-0.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,092 kB
  • ctags: 6,838
  • sloc: ansic: 53,874; sh: 1,944; asm: 650; makefile: 141
file content (111 lines) | stat: -rwxr-xr-x 2,464 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
#!/usr/bin/make -f
# Debhelper-using rules file for lxdoom

DEB_BUILD_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)

SVGA_ARCHS=i386
SVGA_KERNS=linux
ifneq ($(findstring $(DEB_BUILD_ARCH_CPU),$(SVGA_ARCHS)),)
ifneq ($(findstring $(DEB_BUILD_ARCH_OS),$(SVGA_KERNS)),)
DO_SVGA=1
endif
endif

SOUND_KERNS=linux kfreebsd
ifneq ($(findstring $(DEB_BUILD_ARCH_OS),$(SOUND_KERNS)),)
DO_SOUND=1
endif

CFLAGS = -g
INSTALL_PROGRAM = /usr/bin/install -c
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s
endif

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

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

# This has to be exported to make some magic below work.
export DH_OPTIONS

build: build-stamp
build-stamp:
	dh_testdir

	cp -f /usr/share/misc/config.{guess,sub} .
	CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --mandir=/usr/share/man --disable-cpu-opt
	# Add here commands to compile the package.
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp
	rm -f config.{guess,sub}

	# Add here commands to clean up after the build process.
	-$(MAKE) distclean

	dh_clean

install: DH_OPTIONS=-s
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	
	# Add here commands to install the package into debian/tmp.
	$(MAKE) install prefix=`pwd`/debian/tmp/usr mandir=`pwd`/debian/tmp/usr/share/man INSTALL_PROGRAM="$(INSTALL_PROGRAM)"

ifndef DO_SOUND
	install -m755 debian/no_sound debian/tmp/usr/games/sndserv
endif
	dh_movefiles
ifdef DO_SVGA
	cp debian/lxdoom-x11/usr/share/man/man6/lxdoom.6 \
	   debian/lxdoom-svga/usr/share/man/man6/lsdoom.6
endif

	cp debian/lxdoom.xpm debian/lxdoom/usr/share/pixmaps

	touch install-stamp

# Build architecture-independent files here. (none)
binary-indep:

# Build architecture-dependent files here.
binary-arch: DH_OPTIONS=-s
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdebconf
	dh_installdocs
	dh_installmenu 
	dh_installman
	dh_undocumented
	dh_installchangelogs ChangeLog
	dh_strip
	dh_link 
	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