2 # debian/rules for libmpdclient
4 # Written by Sebastian Harl <tokkee@debian.org>
6 # Uncomment this to turn on verbose mode.
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 include /usr/share/dpkg/architecture.mk
13 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
14 CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25 ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
29 config.status: configure
31 dh_autotools-dev_updateconfig
34 --host=$(DEB_HOST_GNU_TYPE) \
35 --build=$(DEB_BUILD_GNU_TYPE) \
37 --mandir=\$${prefix}/share/man \
38 --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
39 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
41 build: build-arch build-indep
43 build-arch: build-stamp
44 build-indep: build-stamp
46 build-stamp: config.status
50 test -z '$(CHECK)' || make $(CHECK)
59 [ ! -f Makefile ] || $(MAKE) distclean
61 dh_autotools-dev_restoreconfig
70 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
72 # we do not want .la files in Debian
73 rm -f debian/tmp/usr/lib/*/libmpdclient.la
75 # these files do not include any useful content
76 rm -f debian/tmp/usr/share/doc/libmpdclient/README
77 rm -f debian/tmp/usr/share/doc/libmpdclient/COPYING
79 # install that file as changelog instead
80 rm -f debian/tmp/usr/share/doc/libmpdclient/NEWS
82 dh_install --sourcedir=debian/tmp --fail-missing
85 binary-indep: build install
88 dh_installchangelogs -i NEWS
89 dh_installdocs -i -A AUTHORS
97 binary-arch: build install
100 dh_installchangelogs -a NEWS
101 dh_installdocs -a -A AUTHORS
103 dh_strip -a --dbg-package=libmpdclient2-dbg
106 dh_makeshlibs -a -V 'libmpdclient2 (>= 2.2)'
113 binary: binary-indep binary-arch
114 .PHONY: build clean binary-indep binary-arch binary install