mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-31 04:37:41 +00:00
chore(linux): Use build.sh for Debian packaging
This commit is contained in:
parent
9b4ca1aebd
commit
fd562019dd
2 changed files with 13 additions and 9 deletions
|
|
@ -9,7 +9,9 @@ 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
|
||||
|
|
@ -32,26 +34,23 @@ override_dh_auto_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
|
||||
# keyman-config
|
||||
linux/keyman-config/build.sh configure
|
||||
|
||||
override_dh_auto_build:
|
||||
core/build.sh --no-tests build:arch
|
||||
linux/ibus-keyman/build.sh build
|
||||
linux/keyman-system-service/build.sh build
|
||||
# keyman-config
|
||||
linux/keyman-config/build.sh build
|
||||
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)))
|
||||
core/build.sh --no-tests test:arch
|
||||
linux/ibus-keyman/build.sh test
|
||||
linux/keyman-system-service/build.sh test
|
||||
# keyman-config
|
||||
dh_auto_test --sourcedir=linux/keyman-config --buildsystem=pybuild $@
|
||||
linux/keyman-config/build.sh test
|
||||
endif
|
||||
|
||||
override_dh_auto_install:
|
||||
|
|
@ -63,6 +62,7 @@ override_dh_auto_install:
|
|||
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
|
||||
|
|
|
|||
|
|
@ -44,8 +44,12 @@ build_action() {
|
|||
version.py.in > version.py
|
||||
popd
|
||||
pushd buildtools
|
||||
builder_echo "Create lang_tags_map.py"
|
||||
python3 ./build-langtags.py
|
||||
if [ -f build-langtags.py ]; then
|
||||
builder_echo "Create lang_tags_map.py"
|
||||
python3 ./build-langtags.py
|
||||
else
|
||||
builder_echo "Skip building lang_tags_map.py during package build"
|
||||
fi
|
||||
popd
|
||||
builder_echo "Building man pages"
|
||||
./build-help.sh --man --no-reconf
|
||||
|
|
@ -68,7 +72,7 @@ install_action() {
|
|||
mkdir -p "/tmp/keyman/$(python3 -c 'import sys;import os;pythonver="python%d.%d" % (sys.version_info[0], sys.version_info[1]);sitedir = os.path.join("lib", pythonver, "site-packages");print(sitedir)')"
|
||||
# when we no longer have to support old pip version (python > 3.6) change this to:
|
||||
# pip3 install --prefix /tmp/keyman .
|
||||
PYTHONUSERBASE=/tmp/keyman python3 setup.py install --user
|
||||
PYTHONUSERBASE=${DESTDIR:-/tmp/keyman} python3 setup.py install --user
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue