File: rules

package info (click to toggle)
alsa-utils 1.0.8-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,612 kB
  • ctags: 754
  • sloc: ansic: 10,447; sh: 4,806; makefile: 242
file content (85 lines) | stat: -rwxr-xr-x 1,905 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
#!/usr/bin/make -f

include /usr/share/dpatch/dpatch.make

CFLAGS = -Wall -g

# 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)

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


configure: patch configure-stamp
configure-stamp:
	dh_testdir

	-rm -f config.sub config.guess
	ln -s /usr/share/misc/config.sub config.sub
	ln -s /usr/share/misc/config.guess config.guess

	./configure --prefix=/usr \
		    --mandir=\$${prefix}/share/man \
		    --infodir=\$${prefix}/share/info \
		    --host=$(DEB_HOST_GNU_TYPE) \
		    --build=$(DEB_BUILD_GNU_TYPE)

	touch configure-stamp

build: configure build-stamp
build-stamp:
	$(MAKE) CFLAGS='$(CFLAGS)'
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_clean

	-$(MAKE) distclean
	-rm -f version

	-rm -f configure-stamp build-stamp
	-rm -f config.cache config.log config.status Makefile.conf
	-rm -f config.sub config.guess

	-rm -f aplay/arecord


install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	$(MAKE) install DESTDIR=$(CURDIR)/debian/alsa-utils


binary-indep:
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdirs
	dh_link
	dh_installdocs
	dh_installman debian/speaker-test.1
	mv debian/alsa-utils/usr/share/doc/alsa-utils/patch-stamp debian/alsa-utils/usr/share/doc/alsa-utils/PATCHES
	cp alsamixer/README debian/alsa-utils/usr/share/doc/alsa-utils/README.alsamixer
	dh_installchangelogs ChangeLog
	dh_installmenu
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary:	binary-indep binary-arch
.PHONY: build clean binary binary-arch binary-indep install configure patch