mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
Some of the configuration files are useful for other distributions as well. So this change moves them out of `debian/` to `linux/keyman-config` so that they will be included in the source tar ball. Also remove zero-width space from one file. Closes #8880.
75 lines
2.8 KiB
Makefile
Executable file
75 lines
2.8 KiB
Makefile
Executable file
#!/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
|
|
|
|
export HOME=$(shell mktemp -d)
|
|
export XDG_DATA_HOME=$(shell mktemp -d)
|
|
export XDG_CONFIG_HOME=$(shell mktemp -d)
|
|
|
|
# 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!
|
|
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)
|
|
linux/ibus-keyman/build.sh configure -- \
|
|
--wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
|
linux/keyman-system-service/build.sh configure -- \
|
|
--wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
|
linux/keyman-config/build.sh configure
|
|
|
|
override_dh_auto_build:
|
|
cp linux/keyman-config/resources/keyman.sharedmimeinfo debian/
|
|
core/build.sh --no-tests build:arch
|
|
linux/ibus-keyman/build.sh build
|
|
linux/keyman-system-service/build.sh build
|
|
linux/keyman-config/build.sh build
|
|
cd linux/keyman-config && \
|
|
sed -i -e "s/^__pkgversion__ = \"[^\"]*\"/__pkgversion__ = \"$(DEB_VERSION)\"/g" keyman_config/version.py && \
|
|
make compile-po
|
|
|
|
override_dh_auto_test:
|
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
|
core/build.sh --no-tests test:arch
|
|
linux/ibus-keyman/build.sh test
|
|
linux/keyman-system-service/build.sh test
|
|
linux/keyman-config/build.sh test
|
|
endif
|
|
|
|
override_dh_auto_install:
|
|
install -d $(CURDIR)/debian/tmp
|
|
DESTDIR=$(CURDIR)/debian/tmp core/build.sh --no-tests install:arch
|
|
DESTDIR=$(CURDIR)/debian/tmp linux/ibus-keyman/build.sh install
|
|
DESTDIR=$(CURDIR)/debian/tmp linux/keyman-system-service/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*
|
|
# Don't call `build.sh install` - dh_auto_install does some extra smarts
|
|
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 instead of using `dh $@ --with-python3 --with bash-completion`
|
|
dh_bash-completion -O--buildsystem=pybuild
|
|
dh_python3 -O--buildsystem=pybuild
|
|
|
|
override_dh_missing:
|
|
dh_missing --fail-missing
|