Code

Added debug line
[gosa.git] / gosa-core / dh-make-gosa
index 178fcf5fa0ad3b2d216fbb4bb5080e06817da50c..ded67ec9064372c384043457e810d425fee98a32 100755 (executable)
@@ -181,6 +181,7 @@ sed -i '/^Upstream/,/^$/d' debian/copyright
 sed -i 's/^Section: unknown/Section: web/g' debian/control
 sed -i 's/^Architecture: any/Architecture: all/g' debian/control
 sed -i 's/^Depends: .*$/Depends: gosa/g' debian/control
+sed -i 's/^\(Build-Depends: .*\)$/\1, dpatch/g' debian/control
 sed -i "s/^Description: .*$/Description: $PL_NAME plugin for GOsa/g" debian/control
 sed -i "s/^ <.*$/ %DESCRIPTION%/g" debian/control
 dsc=$(tempfile)
@@ -196,6 +197,9 @@ sed -i "/%DESCRIPTION%/r $dsc" debian/control
 sed -i "/%DESCRIPTION%/d" debian/control
 rm $dsc
 
+# Create patch directory
+[ ! -d debian/patches ] && mkdir debian/patches
+
 # Adapt README.debian
 cat <<EOF > debian/README.Debian
 README.Debian for GOsa $PL_NAME plugin $PL_VERSION
@@ -228,20 +232,29 @@ configure-stamp:
        dh_testdir
        touch configure-stamp
 
+patch: patch-stamp
+patch-stamp:
+       dpatch apply-all
+       dpatch cat-all >patch-stamp
 
-build: build-stamp
+build: patch build-stamp
 
 build-stamp: configure-stamp 
        dh_testdir
 
        touch $@
 
-clean:
+clean: clean-patched unpatch
+clean-patched:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
        dh_clean 
 
+unpatch:
+       dpatch deapply-all
+       rm -rf patch-stamp debian/patched
+
 install: build
        dh_testdir
        dh_testroot