File: rules

package info (click to toggle)
wsoundserver 0.4.0-19
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 1,720 kB
  • ctags: 253
  • sloc: sh: 10,011; ansic: 2,240; makefile: 147
file content (89 lines) | stat: -rwxr-xr-x 2,520 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
#!/usr/bin/make -f
# GNU (c) 1999 Marcelo Magallon <mmagallo@debian.org>
# Based on sample debhelper debian/rules, GNU copyright 1997 by Joey Hess.
# Later changed by Josip Rodin.
# Even later changed by Jeff Teunissen

#export DH_VERBOSE=1
export DH_COMPAT=3
export DH_OPTIONS

wss          := wsoundserver
libname      := libwsound
wssdev       := $(libname)-dev
tmp          := $(CURDIR)/debian/$(wss)
devtmp       := $(CURDIR)/debian/$(wssdev)

CFLAGS := -O2 `get-wutil-flags --cflags`
ifneq "$(findstring debug,$(DEB_BUILD_OPTIONS))" ""
CFLAGS += -g
endif

CONFIG_PATHS=	--prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info
CONFIG_OPTIONS= --with-x --with-gnu-ld

configure: configure-stamp
configure-stamp:
	aclocal-1.9
	libtoolize --automake --force --copy
	automake-1.9 --add-missing --copy
	autoconf
	CFLAGS="$(CFLAGS)" ./configure $(CONFIG_PATHS) $(CONFIG_OPTIONS)
	touch $@

build: configure-stamp build-stamp
build-stamp: config.status
	dh_testdir
	$(MAKE)
	touch $@

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean build-stamp configure-stamp debian/conffiles wslib/get-wsound-flags

install: DH_OPTIONS=
install: configure-stamp build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	$(MAKE) install DESTDIR=$(tmp)
	dh_movefiles --sourcedir=debian/$(wss) -p$(wssdev) \
          usr/bin/get-wsound-flags usr/share/man/man1/get-wsound-flags.1x \
          usr/include usr/lib/$(libname).a usr/lib/$(libname).la \
	  usr/lib/$(libname).so
	find $(tmp) -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty
	dh_installdirs etc/GNUstep/Defaults
	install -m644 debian/WMSound $(tmp)/etc/GNUstep/Defaults

binary-indep:
# We have no architecture-independent files here.

binary-arch: DH_OPTIONS=-a
binary-arch: build install
	dh_testdir
	dh_testroot
	find $(tmp)/etc ! -type d | sed -e "s:^$(tmp)::" > debian/conffiles
	DH_OPTIONS=-p$(wss) dh_installdocs AUTHORS NEWS README
	DH_OPTIONS=-p$(wssdev) dh_installdocs
	rm -rf debian/$(wssdev)/usr/share/doc/$(wssdev)
	ln -s $(wss) $(devtmp)/usr/share/doc/$(wssdev)
	DH_OPTIONS=-p$(wss) dh_installchangelogs ChangeLog
	DH_OPTIONS=-p$(wss) dh_installmenu
ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
	dh_strip
endif
	dh_compress
	dh_fixperms
	dh_installdeb
	DH_OPTIONS=-p$(wss) dh_makeshlibs
	DH_OPTIONS="-p$(wss) -l$(tmp)/usr/lib" dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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