summaryrefslogtreecommitdiff
path: root/Makefile
blob: ddf79b70922e84320dd8ed8cfca0ddb95308670d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
VERSION=1.0
DEBVER := $(shell sed 's,[/\.].*,,' < /etc/debian_version)

tests:
	@cd ./php-malware-finder && bash ./tests.sh

clean:
	rm -rf php-malware-finder/debian
	rm -f *.build *.changes *.deb

extract:
	cp -r debian php-malware-finder
	git checkout php-malware-finder/common.yara
	git checkout php-malware-finder/php.yara
	git checkout php-malware-finder/asp.yara

set_distribution:
	sed -e "s/##version/${DEBVER}/" -i php-malware-finder/debian/control php-malware-finder/debian/changelog

check_distribution:
ifeq ($(DEBVER),6)
		sed -e '/too_many_chr/d'  -e '/b64_concat/d' -e 's/^import.*//g' -e 's/^include.*//g' -e 's/and\ not\ IsWhitelisted//g' -i php-malware-finder/common.yara
endif

package: clean extract set_distribution check_distribution
	cd php-malware-finder && debuild -b -us -uc --lintian-opts -X po-debconf