2 # Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
5 # Prints OS-specific package profiles to stdout (one per-newline) to use
6 # as command-line args for ci/deps.perl. Called automatically by ci/run.sh
8 # set by os-release(5) or similar
12 for f in /etc/os-release /usr/lib/os-release
14 test -f $f || continue
17 # Debian sid (and testing) have no VERSION_ID
18 case $ID--$VERSION_ID in
21 */sid) VERSION_ID=sid ;;
23 echo >&2 "$ID, but no VERSION_ID"
32 case $ID--$VERSION_ID in
33 -|*--|--*) continue ;;
40 VERSION_ID=$(uname -r | cut -d . -f 1)
41 test "$VERSION_ID" -lt 11 && {
42 echo >&2 "ID=$ID $(uname -r) too old to support";
48 freebsd) PKG_FMT=pkg ;;
49 debian|ubuntu) PKG_FMT=deb ;;
50 centos|redhat|fedora) PKG_FMT=rpm ;;
51 *) echo >&2 "PKG_FMT undefined for ID=$ID in $0"
54 case $ID-$VERSION_ID in
55 freebsd-11|freebsd-12) sed "s/^/$PKG_FMT /" <<EOF
57 all devtest IO::KQueue-
58 all devtest IO::KQueue
64 debian-sid|debian-9|debian-10) sed "s/^/$PKG_FMT /" <<EOF
66 all devtest Search::Xapian-
73 centos-7) sed "s/^/$PKG_FMT /" <<EOF