File: rules

package info (click to toggle)
xmp 3.2.0-0.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,144 kB
  • ctags: 4,693
  • sloc: ansic: 46,366; sh: 2,933; asm: 1,013; makefile: 381; xml: 47; cpp: 40
file content (96 lines) | stat: -rwxr-xr-x 2,572 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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode
#export DH_VERBOSE=1

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

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

generated_files=debian/xmp.mime
mime_types=xm mod nst s3m it stm stx mtm ptm okt far wow mdl 669 alm

build: build-stamp
build-stamp:
	dh_testdir
	STRIP='/bin/true' CFLAGS="$(CFLAGS)" \
		./configure \
			--host=$(DEB_HOST_GNU_TYPE) \
			--build=$(DEB_BUILD_GNU_TYPE) \
			--prefix=/usr \
		    	--mandir='$${prefix}/share/man' \
		    	--enable-dynamic \
			--enable-audacious-plugin
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	[ ! -f Makefile.rules ] || $(MAKE) clean
	rm -rf config.status src/plugin/audacious.lo src/plugin/xmp-audacious.so src/main/xmp src/drivers/smix.lo
	dh_clean
	rm -rf debian/_tmp_  lib/drivers $(generated_files) config.log
	find . -type l -print | xargs rm -f --

debian/xmp.mime:
	set -e; for i in $(mime_types); do \
		echo "application/x-$$i; xmp %s;" \
		     'test=test -z "$$DISPLAY";' \
		     'needsterminal; description=Module file;' \
		     "nametemplate=%s.$$i"; \
	done > debian/xmp.mime

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	dh_install

# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
# affect _all_ packages. Anything you want to only affect one package
# should be put in another target, such as the install target.
binary-common: $(generated_files)
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
#	dh_installmenu
	dh_installmime
	dh_installman
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	dh_makeshlibs -V
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture independant packages using the common target.
binary-indep: build install
	 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
binary-arch: build install
	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

# Any other binary targets build just one binary package at a time.
binary-%: build install
	make -f debian/rules binary-common DH_OPTIONS=-p$*

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