#!/usr/bin/make -f OTRSHOME := /usr/share/otrs DB_BASE := /usr/share/dbconfig-common DB_DIR := $(DB_BASE)/data/otrs2 OTRS_DST := $(CURDIR)/debian/otrs2/ %: dh $@ override_dh_install: cp scripts/apache2-httpd.include.conf debian/otrs2.conf dh_install # Setup dbconfig-common # PostgreSQL cat scripts/database/otrs-schema.postgresql.sql \ scripts/database/otrs-initial_insert.postgresql.sql \ scripts/database/otrs-schema-post.postgresql.sql > \ $(OTRS_DST)$(DB_DIR)/install/pgsql cp debian/schemas/DBUpdate-to-6.0.0 \ $(OTRS_DST)$(DB_BASE)/scripts/otrs2/upgrade/pgsql/6.0.0 cp debian/schemas/DBUpdate-to-6.0.1 \ $(OTRS_DST)$(DB_BASE)/scripts/otrs2/upgrade/pgsql/6.0.1 cp debian/schemas/DBUpdate-to-6.0.32 \ $(OTRS_DST)$(DB_BASE)/scripts/otrs2/upgrade/pgsql/6.0.32 # MySQL cat scripts/database/otrs-schema.mysql.sql \ scripts/database/otrs-initial_insert.mysql.sql \ scripts/database/otrs-schema-post.mysql.sql > \ $(OTRS_DST)$(DB_DIR)/install/mysql cp debian/schemas/DBUpdate-to-6.0.0 \ $(OTRS_DST)$(DB_BASE)/scripts/otrs2/upgrade/mysql/6.0.0 cp debian/schemas/DBUpdate-to-6.0.1 \ $(OTRS_DST)$(DB_BASE)/scripts/otrs2/upgrade/mysql/6.0.1 cp debian/schemas/DBUpdate-to-6.0.32 \ $(OTRS_DST)$(DB_BASE)/scripts/otrs2/upgrade/mysql/6.0.32 # Remove useless stuff. rm -rf $(OTRS_DST)$(OTRSHOME)/scripts/auto_build rm -rf $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/plugins/exportpdf/tests/ rm -rf $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/samples/ rm -rf $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/plugins/codesnippetgeshi/dev/ # Remove embedded ttf-dejavu fonts. rm $(OTRS_DST)/var/lib/otrs/fonts/DejaVu*.ttf # Remove embedded fontawesome fonts. rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/common/fonts/fontawesome-webfont.ttf rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/common/fonts/FontAwesome.otf # Remove extra license file. rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/LICENSE.md rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/plugins/codesnippet/lib/highlight/LICENSE rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/plugins/exportpdf/LICENSE.md rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/plugins/scayt/LICENSE.md rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/plugins/wsc/LICENSE.md # Remove extra documentation files. rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/jsdoc-readme.md rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/CHANGES.md rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/plugins/codesnippet/lib/highlight/CHANGES.md rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/plugins/codesnippet/lib/highlight/README.ru.md rm $(OTRS_DST)/var/lib/otrs/httpd/htdocs/js/thirdparty/ckeditor-*/skins/*/readme.md # Replace shebangs. find $(OTRS_DST)/usr/share/otrs/bin/ -type f -name \*.pl -exec sed 's;^#!/usr/bin/env perl;#!/usr/bin/perl;' -i {} \; find $(OTRS_DST)/usr/share/otrs/bin/ -type f -name \*.psgi -exec sed 's;^#!/usr/bin/env perl;#!/usr/bin/perl;' -i {} \; find $(OTRS_DST)/usr/share/otrs/scripts/ -type f -name \*.pl -exec sed 's;^#!/usr/bin/env perl;#!/usr/bin/perl;' -i {} \; override_dh_installchangelogs: dh_installchangelogs CHANGES.md