spiegel-keyman/linux/scripts/debian.sh
2021-09-29 12:35:19 +02:00

40 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
# Build source packages suitable to import into the Debian package repos
# (https://salsa.debian.org/input-method-team)
# must be run from linux dir
# parameters: [PROJECT=<project>] [DIST=<dist>] ./scripts/debian.sh
# PROJECT=<project> only process this project
# DIST=<dist> distribution to create packages for (unstable, experimental, etc). If not
# specified UNRELEASED will be used.
set -e
## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")"
. "$(dirname "$THIS_SCRIPT")/../../resources/build/build-utils.sh"
## END STANDARD BUILD SCRIPT INCLUDE
. $(dirname "$THIS_SCRIPT")/package-build.inc.sh
checkPrerequisites
BASEDIR=$(pwd)
rm -rf debianpackage
mkdir -p debianpackage
for proj in ${projects}; do
downloadSource debianpackage
cd ${proj}-${version}
if [ -n "$DIST" ]; then
EXTRA_ARGS="--distribution $DIST --force-distribution"
fi
dch --newversion ${version}-1 ${EXTRA_ARGS} "Re-release to Debian"
debuild -d -S -sa -Zxz
cd ${BASEDIR}
done