summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules66
1 files changed, 66 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..0c60bcd
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,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