File: rules

package info (click to toggle)
alsaplayer 0.99.76-9%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 4,752 kB
  • ctags: 2,970
  • sloc: ansic: 16,775; sh: 10,709; cpp: 9,442; makefile: 694
file content (118 lines) | stat: -rwxr-xr-x 2,612 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
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
#!/usr/bin/make -f

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

include /usr/share/dpatch/dpatch.make

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

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


CFLAGS = -Wall -g

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

configure-stamp: patch
	dh_testdir
	cd m4 && rm -f audiofile.m4 esd.m4 gtk.m4 libmikmod.m4 libtool.m4 ogg.m4 vorbis.m4
	CFLAGS="$(CFLAGS)" ./configure \
		--host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--prefix=/usr \
		--mandir=\$${prefix}/share/man \
	    	--enable-alsa --enable-oss --enable-esd --enable-nas \
	    	--enable-jack --enable-oggvorbis=yes --enable-audiofile=no \
		--enable-static --enable-shared 
	touch configure-stamp

maintainerclean: clean
	aclocal -I m4
	libtoolize --force --copy
	automake --add-missing --copy
	autoheader
	autoconf

build: configure-stamp
	dh_testdir

	$(MAKE)

	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot

	-$(MAKE) -k distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif

	rm -f build-stamp install-stamp configure-stamp
	rm -f config.cache

	dh_clean


install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	install -d debian/tmp
	dh_installdirs

	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install

	# Remove files we won't include in a package
	for dir in input output reader scopes interface; do \
		rm -f debian/tmp/usr/lib/alsaplayer/$$dir/lib*.a \
			debian/tmp/usr/lib/alsaplayer/$$dir/lib*.la ; \
	done

	touch install-stamp


binary-indep: build install
# Nothing to see here, move along


binary-arch: build install
	dh_testdir
	dh_testroot
	dh_install -a --sourcedir=debian/tmp --list-missing
	dh_installdocs
	dh_installexamples -palsaplayer-common
	dh_installmenu -a
	dh_installchangelogs ChangeLog
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_installmime -palsaplayer-gtk -palsaplayer-text -palsaplayer-daemon -palsaplayer-xosd

	dh_fixperms -a
	dh_makeshlibs -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a


binary: binary-indep binary-arch


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