File: debian.sh

package info (click to toggle)
keyman 18.0.245-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,316 kB
  • sloc: python: 52,784; cpp: 21,278; sh: 7,633; ansic: 4,823; xml: 3,617; perl: 959; makefile: 139; javascript: 138
file content (42 lines) | stat: -rwxr-xr-x 1,225 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/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>] [DEBREVISION=<no>] ./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.
# DEBREVISION=<no>    the debian revision number. Defaults to 1.

set -e

## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
. "${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
    # shellcheck disable=SC2086
    dch --newversion "${version}-${DEBREVISION-1}" ${EXTRA_ARGS} ""
    debuild -d -S -sa -Zxz
    cd "${BASEDIR}"
done