Code

Override embedded-javascript-library lintian warning.
[pkg-libmpdclient.git] / debian / rules
index 8be3e2bd5c69ddd2b40dcca9bdba4c9a9c79f2e0..efa37f06387a75cade4f161412e87f3df3f2959b 100755 (executable)
@@ -11,7 +11,9 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-CFLAGS = -Wall -g
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS += -Wall -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
@@ -27,15 +29,19 @@ endif
 
 config.status: configure
        dh_testdir
+       dh_autotools-dev_updateconfig
        
        ./configure \
                        --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) \
                        --prefix=/usr \
                        --mandir=\$${prefix}/share/man \
-                       CFLAGS="$(CFLAGS)"
+                       CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
 
-build: build-stamp
+build: build-arch build-indep
+
+build-arch: build-stamp
+build-indep: build-stamp
 
 build-stamp: config.status
        dh_testdir
@@ -52,6 +58,7 @@ clean:
        
        [ ! -f Makefile ] || $(MAKE) distclean
        
+       dh_autotools-dev_restoreconfig
        dh_clean
 
 install: build
@@ -73,6 +80,7 @@ install: build
        rm -f debian/tmp/usr/share/doc/libmpdclient/NEWS
        
        dh_install --sourcedir=debian/tmp --fail-missing
+       dh_lintian
 
 binary-indep: build install
        dh_testdir
@@ -95,7 +103,7 @@ binary-arch: build install
        dh_strip -a --dbg-package=libmpdclient2-dbg
        dh_compress -a
        dh_fixperms -a
-       dh_makeshlibs -a
+       dh_makeshlibs -a -V 'libmpdclient2 (>= 2.2)'
        dh_installdeb -a
        dh_shlibdeps -a
        dh_gencontrol -a