[Pkg-sympa-commits] [libmime-lite-html-perl] 06/08: Add a fix to clean properly files modified by build process

Emmanuel Bouthenot kolter at moszumanska.debian.org
Fri Nov 25 09:38:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

kolter pushed a commit to branch unstable
in repository libmime-lite-html-perl.

commit 3671a2ae8a38cb340365466ccdd626c446574f3f
Author: Emmanuel Bouthenot <kolter at openics.org>
Date:   Fri Nov 25 10:07:53 2016 +0100

    Add a fix to clean properly files modified by build process
---
 debian/rules | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/debian/rules b/debian/rules
index 31c9581..634ac73 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,15 @@
 #!/usr/bin/make -f
 
+FILES_MODIFIED_BY_BUILD = $(shell find t -type f -regex '.*\.\(cid\|extern\|location\)' | sed 's/\.keep//')
+
+override_dh_auto_configure:
+	dh_auto_configure
+	for file in $(FILES_MODIFIED_BY_BUILD); do \
+		if [ -e $$file ] && [ ! -e $$file.keep ] ; then \
+			cp $$file $$file.keep ; \
+		fi \
+	done
+
 override_dh_auto_test:
 	# recreate ref files
 	# ignore non-zero exit code that occurs since no tests are run
@@ -7,5 +17,14 @@ override_dh_auto_test:
 	-perl -Iblib/lib t/50generic.t 1
 	dh_auto_test
 
+override_dh_auto_clean:
+	dh_auto_clean
+	for file in $(FILES_MODIFIED_BY_BUILD); do \
+		if [ -e $$file.keep ] ; then \
+			rm -f $$file; \
+			mv $$file.keep $$file; \
+		fi \
+	done
+
 %:
 	dh $@

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sympa/libmime-lite-html-perl.git



More information about the Pkg-sympa-commits mailing list