Code

rules: Use 'filter' rather than 'findstring'.
[pkg-fusedav.git] / debian / rules
index bbbe4db939b694516e720716572ffc2b017cf18a..a43f7f4a8aaf1e77ccc3da6bce1948b511b93d19 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 # debian/rules for fusedav
 #
-# Written by Sebastian Harl <sh@tokkee.org>.
+# Written by Sebastian Harl <tokkee@debian.org>.
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -15,15 +15,18 @@ CFLAGS = -Wall -g
 
 BUILDDIR = ./debian/build/
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
 else
        CFLAGS += -O2
 endif
 
-$(BUILDDIR)/config.status: configure
+include /usr/share/dpatch/dpatch.make
+
+$(BUILDDIR)/config.status: configure patch
        dh_testdir
        [ -e $(BUILDDIR) ] || mkdir $(BUILDDIR)
+       touch aclocal.m4 configure config.h.in Makefile.in
        cd $(BUILDDIR) && CFLAGS="$(CFLAGS)" ../../configure \
                        --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) \
@@ -38,19 +41,19 @@ build-stamp: $(BUILDDIR)/config.status
        
        touch build-stamp
 
-clean:
+clean: unpatch
        dh_testdir
        dh_testroot
-       rm -f build-stamp 
+       rm -f build-stamp
        
        rm -rf $(BUILDDIR)
        
-       dh_clean 
+       dh_clean
 
 install: build
        dh_testdir
        dh_testroot
-       dh_clean -k 
+       dh_clean -k
        
        $(MAKE) -C $(BUILDDIR) install DESTDIR=$(CURDIR)/debian/fusedav
 
@@ -60,7 +63,7 @@ binary-indep:
 binary-arch: build install
        dh_testdir
        dh_testroot
-       dh_installchangelogs 
+       dh_installchangelogs
        dh_installdocs README
        dh_installman debian/fusedav.1
        dh_link
@@ -74,5 +77,5 @@ binary-arch: build install
        dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+.PHONY: build clean binary-indep binary-arch binary install