File: rules

package info (click to toggle)
esound 0.2.17-7
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,348 kB
  • ctags: 594
  • sloc: ansic: 7,379; sh: 7,180; makefile: 199; csh: 86
file content (118 lines) | stat: -rwxr-xr-x 3,500 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
114
115
116
117
118
#!/usr/bin/make -f

DEB_BUILD_ARCH := $(shell dpkg --print-installation-architecture)

INSTALL=$(shell pwd)/debian/tmp
INSTALL_ALSA=$(shell pwd)/debian/tmp-alsa
export DH_COMPAT=2
ALSA_ARCHS=i386 sparc

ifneq ($(findstring $(DEB_BUILD_ARCH),$(ALSA_ARCHS)),)
build-targets=build-debstamp build-alsa-debstamp
install-targets=install-debstamp install-alsa-debstamp
binary-targets=normal alsa
else
build-targets=build-debstamp
install-targets=install-debstamp
binary-targets=normal
endif

build: $(build-targets)

build-debstamp:
	dh_testdir
	mkdir build-normal
	cd build-normal && ../configure --prefix=/usr --sysconfdir=/etc/esound --disable-alsa --with-libwrap
	$(MAKE) -C build-normal all
	(cd docs && for i in *.pod; do pod2man --center="Debian GNU/Linux" --release="potato" $$i > `basename $$i .pod`.1; done)
	touch $@

build-alsa-debstamp:
	dh_testdir
	mkdir build-alsa
	cd build-alsa && ../configure --prefix=/usr --sysconfdir=/etc/esound --enable-alsa --with-libwrap
	$(MAKE) -C build-alsa all
	touch $@

clean:
	dh_testdir
	-rm -rf static shared
	-rm -fr build-normal build-alsa
	-rm -f build-debstamp build-alsa-debstamp install-debstamp install-alsa-debstamp
	-make distclean
	-rm -f `find . -name "*~"`
	-rm -rf `find . -name "\.deps"`
	-rm -rf `find . -name "\.libs"`
	-rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
	-rm -f debian/*substvars
	dh_clean

install: $(install-targets)
install-debstamp: build-debstamp
	dh_testdir
	dh_testroot
	dh_clean
	$(MAKE) -C build-normal DESTDIR=$(INSTALL) install
	mkdir -p $(INSTALL)/usr/share/man/man1
	cp docs/*.1 $(INSTALL)/usr/share/man/man1
	gzip -9 $(INSTALL)/usr/share/man/man1/*.1
	ldd $(INSTALL)/usr/bin/esd
	touch $@

install-alsa-debstamp: build-alsa-debstamp
	dh_testdir
	dh_testroot
	$(MAKE) -C build-alsa DESTDIR=$(INSTALL_ALSA) install
	touch $@

binary-indep: build-debstamp install-debstamp
	dh_installchangelogs -pesound-common ChangeLog
	dh_movefiles         -pesound-common
	dh_compress          -pesound-common 
	dh_fixperms          -pesound-common 
	dh_installdocs       -pesound-common
	dh_installdebconf    -pesound-common
	dh_installdeb        -pesound-common
	dh_gencontrol        -pesound-common
	dh_md5sums           -pesound-common
	dh_builddeb          -pesound-common

alsa: install-alsa-debstamp
	dh_installchangelogs -a ChangeLog
	for i in esound-alsa libesd-alsa0 libesd-alsa0-dev; do \
		dh_movefiles         -p$$i --sourcedir=debian/tmp-alsa;\
		dh_strip             -p$$i; \
		dh_compress          -p$$i; \
		dh_fixperms          -p$$i; \
		dh_installdocs       -p$$i; \
		dh_installdeb        -p$$i; \
		dh_shlibdeps         -p$$i; \
		dh_gencontrol        -p$$i; \
		dh_makeshlibs        -p$$i -V "libesd0 (>= 0.2.16) | libesd-alsa0 (>= 0.2.16)"; \
		dh_md5sums           -p$$i;\
		dh_builddeb          -p$$i;\
	done

normal: install-debstamp
	dh_installchangelogs -a ChangeLog
	for i in esound libesd0 libesd0-dev; do \
		dh_movefiles         -p$$i;\
		dh_strip             -p$$i;\
		dh_compress          -p$$i;\
		dh_fixperms          -p$$i;\
		dh_installdocs       -p$$i;\
		dh_installdeb        -p$$i;\
		dh_shlibdeps         -p$$i;\
		dh_gencontrol        -p$$i;\
		dh_makeshlibs        -p$$i -V "libesd0 (>= 0.2.16) | libesd-alsa0 (>= 0.2.16)"; \
		dh_md5sums           -p$$i;\
		dh_builddeb          -p$$i;\
	done

binary-arch: install $(binary-targets)

binary: binary-indep binary-arch

.PHONY: binary clean binary-indep binary-arch build install install-save install-saved