mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 08:25: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.
(cherry picked from commit 749112660d)
79 lines
2.7 KiB
Makefile
Executable file
79 lines
2.7 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
|
|
|
|
# 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
|
|
cd core && \
|
|
./build.sh configure -- --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 && \
|
|
cp -f ../../VERSION.md VERSION && \
|
|
export KEYMAN_PROC_CFLAGS="-I$(CURDIR)/core/build/arch/release/include -I$(CURDIR)/common/include -I$(CURDIR)/core/include" && \
|
|
export KEYMAN_PROC_LIBS="-L$(CURDIR)/core/build/arch/release/src -lkmnkbp0" && \
|
|
export PKG_CONFIG_PATH=$(CURDIR)/core/build/arch/release/meson-private && \
|
|
./autogen.sh && \
|
|
./configure --prefix=/usr
|
|
# keyman-config
|
|
|
|
override_dh_auto_build:
|
|
cp linux/keyman-config/resources/keyman.sharedmimeinfo debian/
|
|
# keymankeyboardprocessor
|
|
cd core && ./build.sh build
|
|
# ibus-keyman
|
|
cd linux/ibus-keyman && make
|
|
# 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 tests
|
|
# ibus-keyman
|
|
cd linux/ibus-keyman && make check VERBOSE=1
|
|
# keyman-config
|
|
dh_auto_test --sourcedir=linux/keyman-config --buildsystem=pybuild $@
|
|
endif
|
|
|
|
override_dh_auto_install:
|
|
# keymankeyboardprocessor
|
|
install -d $(CURDIR)/debian/tmp
|
|
cd core && DESTDIR=$(CURDIR)/debian/tmp ./build.sh install
|
|
# ibus-keyman
|
|
cd linux/ibus-keyman && make install DESTDIR=$(CURDIR)/debian/tmp
|
|
# 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
|