mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 16:35:33 +00:00
On local builds we shouldn't upload errors to Sentry. The `build-utils.sh` script sets the `UPLOAD_SENTRY` environment variable for that purpose. Also, Sentry doesn't like having an empty string as pkgversion (which should no longer happen with the rest of this change, but...)
72 lines
2.6 KiB
Makefile
Executable file
72 lines
2.6 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/
|
|
|
|
# xenial needs this to be explicit
|
|
export LC_ALL=C.UTF-8
|
|
|
|
# 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 common/core/desktop && \
|
|
./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)/common/core/desktop/build/arch/release/include -I$(CURDIR)/common/core/desktop/include" && \
|
|
export KEYMAN_PROC_LIBS="-L$(CURDIR)/common/core/desktop/build/arch/release/src -lkmnkbp0" && \
|
|
export PKG_CONFIG_PATH=$(CURDIR)/common/core/desktop/build/arch/release/meson-private && \
|
|
./autogen.sh && \
|
|
./configure --prefix=/usr
|
|
# keyman-config
|
|
|
|
override_dh_auto_build:
|
|
# keymankeyboardprocessor
|
|
cd common/core/desktop && ./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:
|
|
# keymankeyboardprocessor
|
|
cd common/core/desktop && ./build.sh tests
|
|
# ibus-keyman
|
|
cd linux/ibus-keyman && make check VERBOSE=1
|
|
# keyman-config
|
|
dh_auto_test --sourcedir=linux/keyman-config --buildsystem=pybuild $@
|
|
|
|
override_dh_auto_install:
|
|
# keymankeyboardprocessor
|
|
install -d $(CURDIR)/debian/tmp
|
|
cd common/core/desktop && 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
|