# Maintainer: Томас <70m4c@70m4c.su> # shellcheck disable=SC2148 # Ignore lack of shebang # shellcheck disable=SC2034 # Ignore "unused" PKGBUILD variables # shellcheck disable=SC2154 # Ignore "unassigned" references to $srcdir and $pkgdir pkgname=chef-client pkgver=16.12.3 pkgrel=1 pkgdesc="The Chef Client installation package includes everything you need to start converging your machines." arch=('x86_64') url="https://downloads.chef.io/chef-client/" license=('custom:Chef EULA') depends=() conflicts=(chef chef-solo chef-dk cinc) source=("https://packages.chef.io/files/stable/chef/${pkgver}/ubuntu/20.04/chef_${pkgver}-1_amd64.deb") sha256sums=('e2ef7f9bb58a466ab9cce93e4a593cb62eaa49c6e7719d6cff0cb1d92b279a7a') package() { cd "$srcdir" || exit 1 bsdtar -xf data.tar.xz -C "$pkgdir" install -Dm644 "$pkgdir/opt/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" mkdir -p "$pkgdir/usr/bin" binaries="chef-apply chef-shell knife chef-client chef-solo ohai" for binary in $binaries; do ln -s "/opt/$pkgname/bin/$binary" "$pkgdir/usr/bin/" || error_exit "Cannot link $binary to /usr/bin" done chown -Rh 0:0 "$pkgdir" chmod -R 755 "$pkgdir/opt" }