Code

Remove dh_autoreconf which isn't needed anymore.
[pkg-ncmpc.git] / debian / rules
index 271e3f8fda144aa3b0bf4fd72e0278cca7b2e78c..042e001a95056c29fe03b619e3bc9ac79d91178e 100755 (executable)
 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
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-else
-       CFLAGS += -O2
-endif
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS += -Wall
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
 
 CHECK = check
 
@@ -25,9 +22,7 @@ ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
        CHECK =
 endif
 
-include /usr/share/dpatch/dpatch.make
-
-config.status: configure $(DPATCH_STAMPFN)
+config.status: configure
        dh_testdir
        ./configure --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
@@ -50,9 +45,13 @@ config.status: configure $(DPATCH_STAMPFN)
                        --enable-outputs-screen \
                        --enable-documentation \
                        --with-ncursesw \
-                       CFLAGS="$(CFLAGS)"
+                       CPPFLAGS="$(CPPFLAGS)" \
+                       CFLAGS="$(CFLAGS)" \
+                       LDFLAGS="$(LDFLAGS)"
 
-build: build-stamp
+build: build-arch build-indep
+build-indep:
+build-arch: build-stamp
 
 build-stamp: config.status
        dh_testdir
@@ -62,7 +61,7 @@ build-stamp: config.status
        
        touch build-stamp
 
-clean: unpatch
+clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp