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
|
#!/usr/bin/make -f
# -*- makefile -*-
include /usr/share/dpkg/architecture.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export LC_ALL := C.UTF-8
export LANG := C.UTF-8
export LANGUAGE := C.UTF-8
WITH_TESTS :=$(if $(findstring nocheck,$(DEB_BUILD_OPTIONS)),OFF,ON)
DH_FULL := --builddirectory=obj-$(DEB_HOST_GNU_TYPE)-full
%:
dh $@
override_dh_auto_configure:
if [ -e src/zxcvbn/ ]; then rm -r src/zxcvbn/ ; fi
dh_auto_configure -- -DWITH_TESTS=$(WITH_TESTS) \
-DWITH_GUI_TESTS=$(WITH_TESTS) \
-DWITH_XC_UPDATECHECK=OFF \
-DWITH_XC_YUBIKEY=ON \
-DWITH_XC_ALL=OFF
dh_auto_configure $(DH_FULL) -- -DWITH_TESTS=$(WITH_TESTS) \
-DWITH_GUI_TESTS=$(WITH_TESTS) \
-DWITH_XC_UPDATECHECK=OFF \
-DWITH_XC_ALL=ON
override_dh_auto_build:
dh_auto_build
dh_auto_build $(DH_FULL)
override_dh_auto_clean:
dh_auto_clean
dh_auto_clean $(DH_FULL)
override_dh_auto_install:
dh_auto_install --destdir=debian/keepassxc-minimal
dh_auto_install $(DH_FULL) --destdir=debian/keepassxc-full
sed -i s#https://cdnjs.cloudflare.com/ajax/libs/font-awesome/.*/font-awesome.min.css#../../fonts-font-awesome/css/font-awesome.min.css#g $$(find debian/ -name '*.html')
override_dh_auto_test:
dh_auto_test -- ARGS+="-E 'test(cli|gui)'"
dh_auto_test $(DH_FULL) -- ARGS+="-E 'test(cli|gui)'"
# testcli and testgui use X, and have horrible X clipboard tests that
# randomly fail, so ignore failures
xvfb-run -a --server-args="-screen 0 800x600x24" dh_auto_test --no-parallel -- ARGS+="-R 'test(cli|gui)'" || true
xvfb-run -a --server-args="-screen 0 800x600x24" dh_auto_test $(DH_FULL) --no-parallel -- ARGS+="-R 'test(cli|gui)'" || true
override_dh_makeshlibs:
# keepassxc only ships plugins
dh_makeshlibs -p keepassxc-minimal -X/usr/lib/$(DEB_HOST_MULTIARCH)/keepassxc
dh_makeshlibs -p keepassxc-full -X/usr/lib/$(DEB_HOST_MULTIARCH)/keepassxc
|