5
5
include /usr/share/dpatch/dpatch.make
7
# These are used for cross-compiling and for saving the configure script
8
# from having to guess our platform (since we know it already)
9
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
12
# libmpd-dev pkg-config brokeness
13
CFLAGS = -Wall -g -I/usr/include/libmpd/
15
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
21
config.status: configure patch-stamp
23
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
24
cp -f /usr/share/misc/config.sub config.sub
26
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
27
cp -f /usr/share/misc/config.guess config.guess
29
LDFLAGS="-Wl,--as-needed" CFLAGS="$(CFLAGS)" ./configure \
30
--host=$(DEB_HOST_GNU_TYPE) \
31
--build=$(DEB_BUILD_GNU_TYPE) \
33
--mandir=\$${prefix}/share/man \
34
--infodir=\$${prefix}/share/info
38
build-stamp: config.status
9
build-stamp: patch-stamp
14
dh clean --before clean
15
dh_clean --exclude ./libmpdclient/Makefile.orig
16
dh clean --after clean
49
# Add here commands to clean up after the build process.
50
[ ! -f Makefile ] || $(MAKE) distclean
51
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
54
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
57
dh_clean --exclude ./libmpdclient/Makefile.orig
62
dh_clean -k --exclude ./libmpdclient/Makefile.orig
66
$(MAKE) install DESTDIR=$(CURDIR)/debian/mpdscribble
69
install -d $(CURDIR)/debian/mpdscribble/var/cache/mpdscribble
72
install -m 755 -d $(CURDIR)/debian/mpdscribble/etc
73
install -m 640 debian/mpdscribble.conf $(CURDIR)/debian/mpdscribble/etc
22
dh install --before installinit
23
# Needs to stop before mpd and start after it
24
dh_installinit -n -- start 31 2 3 4 5 . stop 14 0 1 6 .
25
dh install --after installinit
75
27
# Build architecture-independent files here.
76
28
binary-indep: build install
77
# We have nothing to do by default.
29
# We have nothing to do here.
79
31
# Build architecture-dependent files here.
80
32
binary-arch: build install
83
dh_installchangelogs ChangeLog
88
# Needs to stop before mpd and start after it
89
dh_installinit -n -- start 31 2 3 4 5 . stop 14 0 1 6 .
33
dh binary-arch --before strip
34
dh_strip --dbg-package=mpdscribble-dbg
35
dh binary-arch --after strip
101
37
binary: binary-indep binary-arch
102
38
.PHONY: build clean binary-indep binary-arch binary install