spiegel-keyman/linux/keyman-config/debian/rules
Eberhard Beilharz 33bf5750b0
fix(linux): Improve version number
This change modifies the reported version number for km-config:
if km-config is installed from a debian package, the package
version will be output as well, e.g.:
`km-config version 14.0.252-beta (package version 14.0.252-1+bionic1)`

Otherwise the output will be identical to before:
`km-config version 14.0.252-beta-local`.

This change also modifies the script that sets the version number so
that builds on Jenkins are now detected in addition to TC.

This fixes #4579.
2021-03-03 20:01:34 +01:00

20 lines
619 B
Makefile
Executable file

#!/usr/bin/make -f
#export DH_VERBOSE=1
export PYBUILD_NAME=keyman-config
export PYBUILD_INSTALL_ARGS=--install-scripts=/usr/share/keyman-config/
%:
dh $@ --with python3 --buildsystem=pybuild --with bash-completion
override_dh_auto_build:
make man
sed -i -e "s/^__pkgversion__ = \"\"/__pkgversion__ = \"$(shell dpkg-parsechangelog --show-field Version)\"/g" keyman_config/version.py
make compile-po
dh_auto_build $@
override_dh_auto_install:
install -d $(CURDIR)/debian/keyman/usr/share/
cp -r locale/ $(CURDIR)/debian/keyman/usr/share/
rm $(CURDIR)/debian/keyman/usr/share/locale/*.po*
dh_auto_install $@