| 1 | # |
| 2 | # Install build dependencies. |
| 3 | # |
| 4 | |
| 5 | set -x |
| 6 | |
| 7 | if [scip-shell system . . `[`. ! -f "/etc/os-releasescip-shell filesystem . . `/etc/os-release`." ]; then |
| 8 | die "Unknown release, please install dependencies manualy." |
| 9 | fi |
| 10 | |
| 11 | . /etc/os-releasescip-shell source . . `/etc/os-release`. |
| 12 | |
| 13 | case "$ID" in |
| 14 | fedora | centos | rhel) |
| 15 | [scip-shell system . . `[`. ! -f "rpm/authselect.spec.in" ] && die "Missing file: rpm/authselect.spec.in" |
| 16 | [scip-shell system . . `[`. -f "authselect.spec" ] && die "./authselect.spec already exist, delete it to continue." |
| 17 | |
| 18 | sedscip-shell system . . sed. -E "s/@\w+@/dummy/g" rpm/authselect.spec.in > authselect.spec |
| 19 | dnf install -y "dnf-command(builddep)" |
| 20 | dnf builddep -y ./authselect.spec |
| 21 | rmscip-shell system . . rm. authselect.spec |
| 22 | ;; |
| 23 | ubuntu) |
| 24 | aptscip-shell system . . apt. update |
| 25 | aptscip-shell system . . apt. install -y \ |
| 26 | asciidoc \ |
| 27 | autoconf \ |
| 28 | automake \ |
| 29 | autopoint \ |
| 30 | gcc \ |
| 31 | gettext \ |
| 32 | libcmocka-dev \ |
| 33 | libpopt-dev \ |
| 34 | libselinux1-dev \ |
| 35 | libtool \ |
| 36 | m4 \ |
| 37 | make \ |
| 38 | pkg-config \ |
| 39 | po4a |
| 40 | ;; |
| 41 | *) |
| 42 | die "Unknown release, please install dependencies manualy." |
| 43 | ;; |
| 44 | esac |