* Remove dpatch dependency and references in debian/rules (no upstream
[fmit.git] / debian / rules
index a44ec2a..4186fec 100755 (executable)
@@ -9,9 +9,6 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# include file for dpatch system
-include /usr/share/dpatch/dpatch.make
-
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -34,7 +31,7 @@ else
        CFLAGS += -O2
 endif
 
-config.status: patch configure
+config.status: configure
        dh_testdir
        # Add here commands to configure the package.
        ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-Qt-dir=/usr/share/qt3 $(DEB_CONFIGURE_ALSA) CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
@@ -51,13 +48,13 @@ build-stamp:  config.status
 
        touch $@
 
-clean: unpatch
+clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp 
 
        # Add here commands to clean up after the build process.
-       -$(MAKE) distclean
+       [ ! -f Makefile ] || $(MAKE) distclean
 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
        cp -f /usr/share/misc/config.sub config.sub
 endif
@@ -66,6 +63,13 @@ ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 endif
 
        rm -f $(CURDIR)/config.sub $(CURDIR)/config.guess
+
+       # If we're not in a mercurial repository, make sure no hg metadata is
+       # lying around
+       if ! [ -d .hg ]; then \
+               rm -f .hg*; \
+       fi
+
        dh_clean
 
 install: build
@@ -114,4 +118,4 @@ binary-arch: build install
        dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install patch unpatch
+.PHONY: build clean binary-indep binary-arch binary install