Code

Override embedded-javascript-library lintian warning.
[pkg-libmpdclient.git] / debian / rules
index 2418ad8848fd9d1955914cc4badf59ab63ec8055..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