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
|
#!/usr/bin/make -f
export PYBUILD_NAME=onboard
export PYBUILD_INSTALL_ARGS=--root=$(CURDIR)/debian/tmp
export PYBUILD_TEST_PYTEST=1
export DEB_BUILD_MAINT_OPTIONS = optimize=+lto hardening=+all
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_clean:
# Don't fail to build from git-buildpackage:
-dh_auto_clean
rm -rf .pybuild
rm -rf Onboard/osk*.so
rm -rf Onboard/pypredict/lm*.so
rm -f po/onboard.pot
rm -rf onboard.egg-info/
rm -rf debian/home/
rm -rf debian/data/
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
cp onboard $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build
cp onboard-settings $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build
cp -r data $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build
cp -r icons $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build
cp -r themes $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build
cp -r layouts $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build
mkdir -p debian/home/.config/dconf/
mkdir -p debian/home/.config/dconf_profile/
mkdir -p debian/home/.local/share/onboard/
cp -r layouts debian/home/.local/share/onboard
cp -r models debian/home/.local/share/onboard
mkdir -p debian/data/glib-2.0/schemas
cp data/org.onboard.gschema.xml debian/data/glib-2.0/schemas/
glib-compile-schemas debian/data/glib-2.0/schemas/
export GSETTINGS_SCHEMA_DIR="$$(pwd)/debian/data/glib-2.0/schemas:/usr/share/glib-2.0/schemas" \
&& export HOME=$$(pwd)/debian/home \
&& export XDG_CONFIG_HOME=$$HOME/.config \
&& export XDG_DATA_HOME=$$HOME/.local/share/ \
&& export LC_ALL=en_US.utf8 \
&& xvfb-run -a \
dbus-test-runner --max-wait 3600 --keep-env --bus-type=session -t dh_auto_test
rm $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build/onboard
rm $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build/onboard-settings
rm $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build/data/ -Rfv
rm $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build/icons/ -Rfv
rm $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build/themes/ -Rfv
rm $$(find .pybuild/cpython3_*_onboard -maxdepth 0 | head -n1)/build/layouts/ -Rfv
endif
execute_before_dh_install:
rm -f debian/tmp/usr/share/onboard/COPYING
rm -f debian/tmp/usr/share/onboard/COPYING.GPL3
rm -f debian/tmp/usr/share/onboard/HACKING
rm -f debian/tmp/usr/share/onboard/COPYING.BSD3
# drop gnome-shell-extension-onboard files
rm -Rf debian/tmp/usr/share/gnome-shell/
|