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 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
15 CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
26 ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
30 config.status: configure
34 --host=$(DEB_HOST_GNU_TYPE) \
35 --build=$(DEB_BUILD_GNU_TYPE) \
37 --mandir=\$${prefix}/share/man \
38 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
40 build: build-arch build-indep
42 build-arch: build-stamp
43 build-indep: build-stamp
45 build-stamp: config.status
49 test -z '$(CHECK)' || make $(CHECK)
58 [ ! -f Makefile ] || $(MAKE) distclean
68 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
70 # we do not want .la files in Debian
71 rm -f debian/tmp/usr/lib/libmpdclient.la
73 # these files do not include any useful content
74 rm -f debian/tmp/usr/share/doc/libmpdclient/README
75 rm -f debian/tmp/usr/share/doc/libmpdclient/COPYING
77 # install that file as changelog instead
78 rm -f debian/tmp/usr/share/doc/libmpdclient/NEWS
80 dh_install --sourcedir=debian/tmp --fail-missing
82 binary-indep: build install
85 dh_installchangelogs -i NEWS
86 dh_installdocs -i -A AUTHORS
94 binary-arch: build install
97 dh_installchangelogs -a NEWS
98 dh_installdocs -a -A AUTHORS
100 dh_strip -a --dbg-package=libmpdclient2-dbg
103 dh_makeshlibs -a -V 'libmpdclient2 (>= 2.2)'
110 binary: binary-indep binary-arch
111 .PHONY: build clean binary-indep binary-arch binary install