b7cf0d49ed789e378404d8b1d566034540e8092e
1 #! /usr/bin/make -f
2 # debian/rules for libmpdclient
3 #
4 # Written by Sebastian Harl <tokkee@debian.org>
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CFLAGS = -Wall -g
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17 CFLAGS += -O0
18 else
19 CFLAGS += -O2
20 endif
22 config.status: configure
23 dh_testdir
25 ./configure \
26 --host=$(DEB_HOST_GNU_TYPE) \
27 --build=$(DEB_BUILD_GNU_TYPE) \
28 --prefix=/usr \
29 --mandir=\$${prefix}/share/man \
30 CFLAGS="$(CFLAGS)"
32 build: build-stamp
34 build-stamp: config.status
35 dh_testdir
37 $(MAKE)
39 touch build-stamp
41 clean:
42 dh_testdir
43 dh_testroot
44 rm -f build-stamp
46 [ ! -f Makefile ] || $(MAKE) distclean
48 dh_clean
50 install: build
51 dh_testdir
52 dh_testroot
53 dh_prep
54 dh_installdirs
56 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
58 # we do not want .la files in Debian
59 rm -f debian/tmp/usr/lib/libmpdclient.la
61 # these files do not include any useful content
62 rm -f debian/tmp/usr/share/doc/libmpdclient/README
63 rm -f debian/tmp/usr/share/doc/libmpdclient/COPYING
65 # install that file as changelog instead
66 rm -f debian/tmp/usr/share/doc/libmpdclient/NEWS
68 dh_install --sourcedir=debian/tmp --fail-missing
70 binary-indep: build install
71 dh_testdir
72 dh_testroot
73 dh_installchangelogs -i NEWS
74 dh_installdocs -i AUTHORS
75 dh_compress -i
76 dh_fixperms -i
77 dh_installdeb -i
78 dh_gencontrol -i
79 dh_md5sums -i
80 dh_builddeb -i
82 binary-arch: build install
83 dh_testdir
84 dh_testroot
85 dh_installchangelogs -a NEWS
86 dh_installdocs -a AUTHORS
87 dh_link -a
88 dh_strip -a --dbg-package=libmpdclient2-dbg
89 dh_compress -a
90 dh_fixperms -a
91 dh_makeshlibs -a
92 dh_installdeb -a
93 dh_shlibdeps -a
94 dh_gencontrol -a
95 dh_md5sums -a
96 dh_builddeb -a
98 binary: binary-indep binary-arch
99 .PHONY: build clean binary-indep binary-arch binary install