File: install-build-deps.sh

package info (click to toggle)
authselect 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,416 kB
  • sloc: ansic: 7,807; sh: 477; makefile: 356; python: 164; xml: 24
file content (44 lines) | stat: -rw-r--r-- 933 bytes parent folder | download
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
43
44
#
# Install build dependencies.
#

set -x

if [ ! -f "/etc/os-release" ]; then
    die "Unknown release, please install dependencies manualy."
fi

. /etc/os-release

case "$ID" in
  fedora | centos | rhel)
    [ ! -f "rpm/authselect.spec.in" ] && die "Missing file: rpm/authselect.spec.in"
    [ -f "authselect.spec" ] && die "./authselect.spec already exist, delete it to continue."

    sed -E "s/@\w+@/dummy/g" rpm/authselect.spec.in > authselect.spec
    dnf install -y "dnf-command(builddep)"
    dnf builddep -y ./authselect.spec
    rm authselect.spec
    ;;
  ubuntu)
    apt update
    apt install -y \
      asciidoc \
      autoconf \
      automake \
      autopoint \
      gcc \
      gettext \
      libcmocka-dev \
      libpopt-dev \
      libselinux1-dev \
      libtool \
      m4 \
      make \
      pkg-config \
      po4a
    ;;
  *)
    die "Unknown release, please install dependencies manualy."
    ;;
esac