summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2012-02-23 11:02:24 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2012-02-23 11:02:24 +0100
commit864a94d1f266022fdd4cfb3ecf7978f50fa412c3 (patch)
tree5ef6cc9fe880c26fbf87d7dfa0df78f2891f83c7
parent0b86371dc447a977fa2ddd71a7888529fc78d3f1 (diff)
Keep sources directory pristine after make clean
"make clean" removed openvpn.spec and t_client.sh. dh_clean removed win/openvpn.nsi.orig. Hacked debian/rules to keep them so that git claims no changes to the source directory.
-rwxr-xr-xdebian/rules11
1 files changed, 11 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index 7e8167c..4e56fd9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,6 +18,8 @@ override_dh_auto_configure:
override_dh_auto_build:
dh_auto_build
+ # The one shipped in the tarball gets rebuild (chaging /bin/sh in some cases)
+ sed -i -e '1s%.*%#!/bin/sh%' t_client.sh
# make plugins
$(MAKE) -C plugin/auth-pam/
$(MAKE) -C plugin/down-root/
@@ -26,11 +28,20 @@ override_dh_auto_build:
#override_dh_auto_test:
override_dh_auto_clean:
+ # These two get deleted on "make clean", but come in the tarball
+ # hack to keep them around after "make clean"
+ -test -f openvpn.spec.not || mv openvpn.spec openvpn.spec.not
+ -test -f t_client.sh.not || mv t_client.sh t_client.sh.not
dh_auto_clean
+ mv openvpn.spec.not openvpn.spec
+ mv t_client.sh.not t_client.sh
# clean plugins
$(MAKE) -C plugin/auth-pam/ clean
$(MAKE) -C plugin/down-root/ clean
+override_dh_clean:
+ dh_clean -X win/openvpn.nsi.orig
+
override_dh_auto_install:
dh_auto_install
install -m 755 sample-scripts/verify-cn $(CURDIR)/debian/openvpn/usr/share/openvpn