From 2a9aaacc5a6b5246c199f5b43eead30428bd2911 Mon Sep 17 00:00:00 2001 From: Julien "shaddai" Reveret Date: Mon, 2 Nov 2015 17:46:35 +0100 Subject: packaging inside a squeeze chroot modifies the malwares.yara file, adding a git checkout to make sure it is restored before packaging starts --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c34bcee..0a9d1bb 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,21 @@ VERSION=1.0 +DEBVER := $(shell cut -d'.' -f1 < /etc/debian_version) + clean: rm -rf php-malware-finder/debian extract: cp -r debian php-malware-finder + git checkout php-malware-finder/malwares.yara set_distribution: sed -e "s/##version/`cut -d'.' -f1 < /etc/debian_version`/" -i php-malware-finder/debian/control php-malware-finder/debian/changelog -package: clean extract set_distribution +check_distribution: +ifeq ($(DEBVER),6) + sed -e 's/^import.*//g' -e 's/^include.*//g' -e 's/and\ not\ IsWhitelisted//g' -i php-malware-finder/malwares.yara +endif + +package: clean extract set_distribution check_distribution cd php-malware-finder && debuild -b -us -uc --lintian-opts -X po-debconf -- cgit v1.3