File: rules

package info (click to toggle)
snes9x 1.26-1
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 2,712 kB
  • ctags: 9,605
  • sloc: cpp: 40,776; asm: 27,081; ansic: 6,572; makefile: 314
file content (113 lines) | stat: -rwxr-xr-x 2,645 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
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.

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

BUILD_ARCH:=$(shell dpkg --print-gnu-build-architecture)
# New cross-compilation policy may set the DEB_HOST_ARCH variable.
ifdef DEB_HOST_ARCH
 ARCH:=$(DEB_HOST_ARCH)
else
 # dpkg-cross sets the ARCH environment variable, so use it.
 ifdef ARCH
  ARCH:=$(ARCH)
 else
  ARCH:=$(BUILD_ARCH)
 endif
endif

build: build-stamp
build-stamp:
	dh_testdir
ifeq ($(ARCH),i386)
# i386 can use the "standard" makefile
	$(MAKE) -f Makefile.linux
else
# all others use this, tested on m68k
	$(MAKE) -f Makefile.m68k
endif

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp

	-$(MAKE) -f Makefile.linux clean

	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

ifeq ($(ARCH),i386)
#	$(MAKE) -f Makefile.linux install DESTDIR=`pwd`/debian/tmp
	cp snes9x ssnes9x s9xserver debian/tmp/usr/bin
else
	$(MAKE) -f Makefile.m68k install DESTDIR=`pwd`/debian/tmp
endif

	touch install-stamp

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir -a
	dh_testroot -a
ifneq ($(ARCH),i386)
# no SVGA files for all but i386
# maybe this should not be removed?
	-rm debian/snes9x-svga.files
endif
	dh_movefiles -a
	dh_installdocs -a
	dh_installexamples -a
	dh_installmenu -a
	dh_installcron -a
ifeq ($(ARCH),i386)
# SVGA manpages only for i386
	dh_installmanpages -psnes9x-x ssnes9x.1 s9xserver.1
	dh_installmanpages -psnes9x-svga snes9x.1 s9xserver.1
	dh_installmanpages -psnes9x-server snes9x.1 ssnes9x.1
	dh_undocumented -psnes9x-svga 
else
	dh_installmanpages -psnes9x-x snes9x.1 s9xserver.1
	dh_installmanpages -psnes9x-server snes9x.1
endif
	dh_installchangelogs -a CHANGES
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_suidregister -a
	dh_installdeb -a
	dh_shlibdeps -a
ifeq ($(ARCH),i386)
# build SVGA packages only for i386
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a
else
	dh_gencontrol -psnes9x-x 
	dh_gencontrol -psnes9x-server
	dh_md5sums -a
	dh_builddeb -psnes9x-x
	dh_builddeb -psnes9x-server
endif

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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