chore(linux): Fix launchpad build (closes #3875)

This change fixes the launchpad build script and also improves
updating the watch file.

If we use the variables that uscan provides we don't have to
hard-code the package name in the watch file. This makes it possible
to use a generic one for all packages.
This commit is contained in:
Eberhard Beilharz 2020-11-20 11:30:42 +01:00
parent 6a2290b1ae
commit cf515cefdf
No known key found for this signature in database
GPG key ID: 64A39A9E98B53105
9 changed files with 15 additions and 29 deletions

3
.gitignore vendored
View file

@ -265,3 +265,6 @@ lerna-debug.log
# Cached/auto-compiled Python bytecode
*.pyc
# Debian watch file - we generate it from watch.in
watch

View file

@ -1,3 +0,0 @@
version=4
# Tier set by launchpad.sh script
https://downloads.keyman.com/linux/$tier/(\d\S+)/keyman-keyboardprocessor-(.+)\.tar\.gz debian uupdate

View file

@ -1,3 +0,0 @@
version=4
# Tier set by launchpad.sh script
https://downloads.keyman.com/linux/$tier/(\d\S+)/ibus-keyman-(.+)\.tar\.gz debian uupdate

View file

@ -1,3 +0,0 @@
version=4
# Tier set by launchpad.sh script
https://downloads.keyman.com/linux/$tier/(\d\S+)/ibus-kmfl-(.+)\.tar\.gz debian uupdate

View file

@ -1,3 +0,0 @@
version=4
# Tier set by launchpad.sh script
https://downloads.keyman.com/linux/$tier/(\d\S+)/keyman_config-(.+)\.tar\.gz debian uupdate

View file

@ -1,3 +0,0 @@
version=4
# Tier set by launchpad.sh script
https://downloads.keyman.com/linux/$tier/(\d\S+)/kmflcomp-(.+)\.tar\.gz debian uupdate

View file

@ -1,3 +0,0 @@
version=4
# Tier set by launchpad.sh script
https://downloads.keyman.com/linux/$tier/(\d\S+)/libkmfl-(.+)\.tar\.gz debian uupdate

View file

@ -37,7 +37,7 @@ else
fi
echo "ppa: ${ppa}"
if [ ! `which xmllint` ]; then
if [ ! $(which xmllint) ]; then
echo "you must install xmllint (libxml2-utils package) to use this script"
exit 1
fi
@ -61,7 +61,7 @@ else
fi
BASEDIR=`pwd`
BASEDIR=$(pwd)
rm -rf launchpad
mkdir -p launchpad
@ -72,30 +72,28 @@ for proj in ${projects}; do
else
cd ${proj}
fi
if [ "${proj}" == "keyman-config" ]; then
tarname="keyman_config"
make clean
else
tarname="${proj}"
fi
# Update tier in Debian watch files (replacing any previously set tier)
sed -i "s/\$tier\|alpha\|beta\|stable/${TIER}/g" debian/watch
sed "s/\$tier\|alpha\|beta\|stable/${TIER}/g" $BASEDIR/scripts/watch.in > debian/watch
version=`uscan --report --dehs|xmllint --xpath "//dehs/upstream-version/text()" -`
dirversion=`uscan --report --dehs|xmllint --xpath "//dehs/upstream-url/text()" - | cut -d/ -f6`
version=$(uscan --report --dehs|xmllint --xpath "//dehs/upstream-version/text()" -)
dirversion=$(uscan --report --dehs|xmllint --xpath "//dehs/upstream-url/text()" - | cut -d/ -f6)
echo "${proj} version is ${version}"
uscan
cd ..
mv ${proj}-${version} ${BASEDIR}/launchpad
mv ${proj}_${version}.orig.tar.gz ${BASEDIR}/launchpad
mv ${tarname}-${version}.tar.gz ${BASEDIR}/launchpad
mv ${proj}-${version}.tar.gz ${BASEDIR}/launchpad
rm ${proj}*.debian.tar.xz
cd ${BASEDIR}/launchpad
wget -N https://downloads.keyman.com/linux/${TIER}/${dirversion}/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS |grep ${tarname}
sha256sum -c --ignore-missing SHA256SUMS |grep ${proj}
cd ${proj}-${version}
echo `pwd`
echo $(pwd)
cp debian/changelog ../${proj}-changelog
#TODO separate source builds and dputs for each of $dists?
for dist in ${distributions}; do

3
linux/scripts/watch.in Normal file
View file

@ -0,0 +1,3 @@
version=4
# Tier set by launchpad.sh script
https://downloads.keyman.com/linux/$tier/@ANY_VERSION@/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate