summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 0c60bcd2e5790426561f49b304bc1851af9ef39d (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/make -f
#export DH_VERBOSE=1

%:
	dh $@

execute_after_dh_install:
	# Remove extra license files
	find debian/*/usr/share/icinga-php -name LICENSE -delete
	find debian/*/usr/share/icinga-php -name LICENSE.LGPL -delete
	find debian/*/usr/share/icinga-php -name LICENSE.md -delete
	find debian/*/usr/share/icinga-php -name LICENSE.txt -delete
	find debian/*/usr/share/icinga-php -name license.rtf -delete

	# Remove documentation
	find debian/*/usr/share/icinga-php/vendor/vendor -name API.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name AUTHORS.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name CHANGELOG*.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name CHANGES.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name CODE_OF_CONDUCT.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name CONTRIBUTING.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name DEVELOPMENT_README.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name INSTALL.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name NOTICE.txt -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name PATCHES.txt -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name README.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name README-GIT.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name readme.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name SECURITY.md -delete
	find debian/*/usr/share/icinga-php/vendor/vendor -name UPGRADING*.md -delete

	$(RM) -r debian/*/usr/share/icinga-php/vendor/vendor/doctrine/collections/docs/
	$(RM) -r debian/*/usr/share/icinga-php/vendor/vendor/psr/http-message/docs/

	# Remove useless files
	$(RM) -r debian/*/usr/share/icinga-php/vendor/vendor/predis/predis/docker/

	$(RM) debian/*/usr/share/icinga-php/vendor/vendor/simshaun/recurr/test.sh
	$(RM) debian/*/usr/share/icinga-php/vendor/vendor/simshaun/recurr/test.ps1

	# Remove empty directories
	$(RM) -r debian/*/usr/share/icinga-php/vendor/vendor/jfcherng/php-diff/CHANGELOG/ \
	         debian/*/usr/share/icinga-php/vendor/vendor/jfcherng/php-diff/UPGRADING/ \
	         debian/*/usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Service/WindowsAzure/CommandLine/Scaffolders/DefaultScaffolder/resources/PhpOnAzure.Web/resources/

	# Remove duplicate font files
	$(RM) debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSans.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSans-Bold.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSans-BoldOblique.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSans-Oblique.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSansMono.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSansMono-Bold.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSansMono-BoldOblique.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSansMono-Oblique.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSerif.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSerif-Bold.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSerif-BoldItalic.ttf \
	      debian/*/usr/share/icinga-php/vendor/vendor/dompdf/dompdf/lib/fonts/DejaVuSerif-Italic.ttf

	# Remove executable bit
	chmod -x debian/*/usr/share/icinga-php/vendor/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/README \
                 debian/*/usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/*/*.php \
	         debian/*/usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/*/*/*.php \
	         debian/*/usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/*/*/*.xml \
	         debian/*/usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/*/*/*/*.php \
	         debian/*/usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/*/*/*/*/*.php