#!/usr/bin/make -f export DH_VERBOSE = 1 export DH_OPTIONS = -v export DEB_BUILD_MAINT_OPTIONS = hardening=+all export PYBUILD_NAME=keyman-config export PYBUILD_INSTALL_ARGS=--install-scripts=/usr/share/keyman-config/ export KEYMAN_PKG_BUILD=1 # xenial needs this to be explicit export LC_ALL=C.UTF-8 include /usr/share/dpkg/pkg-info.mk # Unfortunately dh-python 3.20180325 (bionic) doesn't provide the virtual dh-sequence-python3 # package, so we'll have to pass --with-python3 here %: dh $@ --with-python3 override_dh_auto_configure: # keymankeyboardprocessor - we need to configure and build core before # we can configure ibus-keyman! cd core && \ ./build.sh --no-tests configure:arch build:arch -- --wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --libdir=lib/$(DEB_TARGET_MULTIARCH) \ --libexecdir=lib/$(DEB_TARGET_MULTIARCH) # ibus-keyman cd linux/ibus-keyman && \ ./build.sh configure -- --wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var # keyman-config override_dh_auto_build: # keymankeyboardprocessor cd core && \ ./build.sh --no-tests build:arch # ibus-keyman cd linux/ibus-keyman && \ ./build.sh build # keyman-config cd linux/keyman-config && \ make man && \ sed -i -e "s/^__pkgversion__ = \"[^\"]*\"/__pkgversion__ = \"$(DEB_VERSION)\"/g" keyman_config/version.py && \ make compile-po dh_auto_build --sourcedir=linux/keyman-config --buildsystem=pybuild $@ override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) # keymankeyboardprocessor cd core && \ ./build.sh --no-tests test:arch # ibus-keyman cd linux/ibus-keyman && \ ./build.sh test # keyman-config dh_auto_test --sourcedir=linux/keyman-config --buildsystem=pybuild $@ endif override_dh_auto_install: install -d $(CURDIR)/debian/tmp cd core && \ DESTDIR=$(CURDIR)/debian/tmp ./build.sh --no-tests install:arch # ibus-keyman cd linux/ibus-keyman && \ DESTDIR=$(CURDIR)/debian/tmp ./build.sh install # keyman-config install -d $(CURDIR)/debian/keyman/usr/share/ cp -r linux/keyman-config/locale/ $(CURDIR)/debian/keyman/usr/share/ rm $(CURDIR)/debian/keyman/usr/share/locale/*.po* dh_auto_install --sourcedir=linux/keyman-config --buildsystem=pybuild $@ # Unfortunately bash-completion 2.10 (focal) doesn't yet provide dh-sequence-bash-completion, # which we could add as build-dependency, so we'll have to explicitly call # dh_bash_completion here... dh_bash-completion -O--buildsystem=pybuild dh_python3 -O--buildsystem=pybuild override_dh_missing: dh_missing --fail-missing