minecraft-server-fabric/PKGBUILD

52 lines
2.1 KiB
Bash
Raw Normal View History

# Maintainer: Gordian Edenhofer <gordian.edenhofer@gmail.com>
2015-09-20 14:23:34 -07:00
# Contributer: Philip Abernethy <chais.z3r0@gmail.com>
# Contributer: sowieso <sowieso@dukun.de>
2015-07-03 10:16:00 -07:00
pkgname=minecraft-server
2016-06-23 11:38:15 -07:00
pkgver=1.10.2
pkgrel=3
2015-07-03 10:16:00 -07:00
pkgdesc="Minecraft server unit files, script, and jar"
2015-09-20 14:23:34 -07:00
arch=('any')
2015-07-03 10:16:00 -07:00
url="http://minecraft.net/"
license=('custom')
depends=('java-runtime-headless' 'screen' 'sudo' 'bash' 'awk' 'sed')
optdepends=("tar: needed in order to create world backups"
"netcat: required in order to suspend an idle server")
2015-07-03 10:16:00 -07:00
conflicts=('minecraft-server-systemd' 'minecraft-canary')
backup=('etc/conf.d/minecraft')
install="${pkgname}.install"
2015-09-20 14:23:34 -07:00
source=("https://s3.amazonaws.com/Minecraft.Download/versions/${pkgver}/minecraft_server.${pkgver}.jar"
2015-12-13 06:32:38 -08:00
"minecraftd-backup.service"
"minecraftd-backup.timer"
"minecraftd.service"
"minecraftd.conf"
"minecraftd.sh")
2015-09-20 14:23:34 -07:00
noextract=("minecraft_server.${pkgver}.jar")
2016-06-23 11:38:15 -07:00
md5sums=('41c4e081defd80b09cb0391c894c2f3c'
'b786935d6517d46fe0944377daba32b8'
'fef6fadd0739ae03ff71ba61025be207'
'afb84ad0316af0aca421b36eaa2bbd90'
'025712e71efa4e21f625bddff28a2f15'
'3cba3f02ad59b7d0df3df561409d7d1a')
_game="minecraft"
_server_root="/srv/minecraft"
2015-07-03 10:16:00 -07:00
package() {
install -Dm644 ${_game}d.conf "${pkgdir}/etc/conf.d/${_game}"
install -Dm755 ${_game}d.sh "${pkgdir}/usr/bin/${_game}d"
install -Dm644 ${_game}d.service "${pkgdir}/usr/lib/systemd/system/${_game}d.service"
install -Dm644 ${_game}d-backup.service "${pkgdir}/usr/lib/systemd/system/${_game}d-backup.service"
install -Dm644 ${_game}d-backup.timer "${pkgdir}/usr/lib/systemd/system/${_game}d-backup.timer"
install -Dm644 ${_game}_server.${pkgver}.jar "${pkgdir}${_server_root}/${_game}_server.${pkgver}.jar"
ln -s "${_game}_server.${pkgver}.jar" "${pkgdir}${_server_root}/${_game}_server.jar"
2015-07-03 10:16:00 -07:00
# Link the log files
2015-12-13 06:32:38 -08:00
mkdir -p "${pkgdir}/var/log/"
install -dm2755 "${pkgdir}/${_server_root}/logs"
ln -s "${_server_root}/logs" "${pkgdir}/var/log/${_game}"
# Give the group write permissions and set user or group ID on execution
chmod g+ws "${pkgdir}${_server_root}"
2015-07-03 10:16:00 -07:00
}