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 67 68 69 70 71
|
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
export DH_VERBOSE = 1
%:
dh $@ --with phpcomposer
override_dh_auto_build:
mkdir --parents vendor/app
phpabtpl composer.json > debian/autoload.php.tpl
phpab \
--output vendor/autoload.php \
--template debian/autoload.php.tpl \
app \
libs \
libs/picodb/lib \
libs/jsonrpc/src
ln -s ../../app/functions.php vendor/app/functions.php
printf '%s\n' "$(DEB_VERSION)" > $(CURDIR)/app/version.txt
@echo ' [*]' Building and minimizing the CSS
$(CURDIR)/cli css
@echo ' [*]' Building and minimizing the JavaScript
$(CURDIR)/cli js
@echo ' [*]' Generating manpage
ln -s ../cli debian/kanboard-cli
help2man --name="administrative interface for kanboard" \
--section=8 \
--no-info \
--help-option=list \
--version-string=$(DEB_VERSION) \
--output=debian/kanboard-cli.8 \
debian/kanboard-cli
override_dh_auto_test: export LOG_DRIVER := file
override_dh_auto_test: export LOG_FILE := /dev/null
override_dh_auto_test:
mkdir --parents vendor
phpabtpl \
--basedir vendor \
--require symfony/stopwatch \
--require-file autoload.php \
> debian/autoload.tests.php.tpl
phpab \
--output vendor/autoload.tests.php \
--template debian/autoload.tests.php.tpl \
tests/units
phpunit \
--configuration tests/units.sqlite.xml \
--bootstrap vendor/autoload.tests.php \
--do-not-cache-result \
--display-deprecations \
--display-phpunit-deprecations
override_dh_installchangelogs:
dh_installchangelogs ChangeLog
execute_after_dh_install:
rm -f $(CURDIR)/debian/kanboard/usr/share/kanboard/libs/*/LICENSE
rm -f $(CURDIR)/debian/kanboard/usr/share/kanboard/libs/*/README.*
execute_after_dh_fixperms:
chown www-data:www-data \
$(CURDIR)/debian/kanboard/var/cache/kanboard \
$(CURDIR)/debian/kanboard/var/lib/kanboard/data \
$(CURDIR)/debian/kanboard/var/lib/kanboard/files \
$(CURDIR)/debian/kanboard/var/lib/kanboard/plugins
find $(CURDIR)/debian/kanboard -type f -perm /111 \
\( -name '*.php' -o -name '*.dat' \) -print0 \
| xargs -0 chmod -x
|