# Maintainer: Hetsh pkgname=mcsctl-git pkgver=master commit=('d0729f6eca367a3b36ca8dbca7c62b28c4636ca8') pkgrel=8 pkgdesc='Manage multiple minecraft servers with a simple bash script and systemd unit template.' arch=('any') url='https://github.com/Hetsh/mcsctl' license=('GPL3') depends=('bash' 'grep' 'java-runtime-headless>=8' 'jq' 'screen' 'sudo' 'systemd') provides=('mcsctl') conflicts=('mcsctl') install="$pkgname.install" source=("$url/archive/$commit.tar.gz") sha256sums=('11dc0e82d0106e2cdd1ae57b054c88fc3d7163f8d95358ac84d6ee87776b8487') package() { install -Dm 644 "${pkgname%-git}-$commit/mcs@.service" "$pkgdir/usr/lib/systemd/system/mcs@.service" install -Dm 755 "${pkgname%-git}-$commit/mcsctl.sh" "$pkgdir/usr/bin/mcsctl" install -Dm 644 "${pkgname%-git}-$commit/mcs-update@.timer" "$pkgdir/usr/lib/systemd/system/mcs-update@.timer" install -Dm 644 "${pkgname%-git}-$commit/mcs-update@.service" "$pkgdir/usr/lib/systemd/system/mcs-update@.service" # Generate an example config file from default options inside the mcsctl script sed -n '/\# Mutable config/,/\# \/Mutable config/p' "${pkgname%-git}-$commit/mcsctl.sh" | head -n -1 | tail -n +2 > "${pkgname%-git}-$commit/mcsctl.conf.bak" install -Dm 644 "${pkgname%-git}-$commit/mcsctl.conf.bak" "$pkgdir/etc/mcsctl.conf.bak" }