File: adjust-for-release

package info (click to toggle)
cockpit 239-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 67,268 kB
  • sloc: javascript: 245,474; ansic: 72,273; python: 23,634; xml: 6,155; sh: 2,919; makefile: 923; sed: 5
file content (29 lines) | stat: -rwxr-xr-x 1,082 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
#!/bin/sh
# The upstream Debian packaging in tools/debian/ applies to all supported
# Debian/Ubuntu release targets of Cockpit. In some of them, some
# features or build dependendencies might not be available or are deliberately
# disabled.
# This script can modify (in-place) the debian/* packaging for a particular
# release (first CLI argument). It gets called by
# https://github.com/cockpit-project/cockpituous/blob/master/release/release-dsc
# for building Debian/Ubuntu packages for a new Cockpit release.

set -eu
if [ -z "${1:-}" ] || [ -n "${2:-}" ]; then
    echo "Usage: $0 <release>" >&2
    exit 1
fi
release="$1"

debian_dir=$(dirname $(readlink -f "$0"))

set -x
# Remove PCP build dependencies, binary package, and Suggests: while pcp is not in stable
# (https://tracker.debian.org/pcp)
case "$release" in
    stretch)
        sed -i '/libpcp.*-dev/d; /^Package: cockpit-pcp/,/^$/ d; /cockpit-pcp/d' $debian_dir/control
        # also remove the files, otherwise --fail-missing breaks the build
        sed -i 's/for m in /&pcp /' $debian_dir/rules
        ;;
esac