2015-09-20 14:23:34 -07:00
|
|
|
# Maintainer: Gordian Edenhofer <gordian.edenhofer[at]yahoo[dot]de>
|
|
|
|
# Contributer: Philip Abernethy <chais.z3r0@gmail.com>
|
2016-02-29 12:35:38 -08:00
|
|
|
# Contributer: sowieso <sowieso@dukun.de>
|
2015-07-03 10:16:00 -07:00
|
|
|
|
|
|
|
pkgname=minecraft-server
|
2016-02-29 12:35:38 -08:00
|
|
|
pkgver=1.9
|
2016-03-05 01:08:55 -08:00
|
|
|
pkgrel=4
|
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')
|
2015-09-20 14:23:34 -07:00
|
|
|
depends=('java-runtime-headless' 'screen' 'sudo' 'bash')
|
2016-02-29 12:35:38 -08:00
|
|
|
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')
|
2015-09-20 14:23:34 -07:00
|
|
|
options=(!strip)
|
|
|
|
install=${pkgname}.install
|
2015-07-03 10:16:00 -07:00
|
|
|
backup=('etc/conf.d/minecraft')
|
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-02-29 12:35:38 -08:00
|
|
|
md5sums=('ff68834eee875bcf367422c67673207c'
|
2016-03-05 01:08:55 -08:00
|
|
|
'b786935d6517d46fe0944377daba32b8'
|
2016-01-30 04:07:29 -08:00
|
|
|
'fef6fadd0739ae03ff71ba61025be207'
|
2016-03-05 01:08:55 -08:00
|
|
|
'afb84ad0316af0aca421b36eaa2bbd90'
|
2016-02-29 12:35:38 -08:00
|
|
|
'54438e0c47cc5083e0a4376688b46092'
|
2016-03-05 01:08:55 -08:00
|
|
|
'f0916bc22215b5dfabb5566e4850bcb8')
|
2016-02-29 13:19:09 -08:00
|
|
|
|
|
|
|
_game="minecraft"
|
|
|
|
_server_root="/srv/minecraft"
|
2015-07-03 10:16:00 -07:00
|
|
|
|
|
|
|
package() {
|
2016-02-29 13:19:09 -08:00
|
|
|
install -Dm644 minecraftd.conf "${pkgdir}/etc/conf.d/${_game}"
|
|
|
|
install -Dm755 minecraftd.sh "${pkgdir}/usr/bin/${_game}d"
|
|
|
|
install -Dm644 minecraftd.service "${pkgdir}/usr/lib/systemd/system/${_game}d.service"
|
|
|
|
install -Dm644 minecraftd-backup.service "${pkgdir}/usr/lib/systemd/system/${_game}d-backup.service"
|
|
|
|
install -Dm644 minecraftd-backup.timer "${pkgdir}/usr/lib/systemd/system/${_game}d-backup.timer"
|
2016-03-01 04:28:15 -08:00
|
|
|
install -Dm644 minecraft_server.${pkgver}.jar "${pkgdir}${_server_root}/minecraft_server.${pkgver}.jar"
|
|
|
|
ln -s "minecraft_server.${pkgver}.jar" "${pkgdir}${_server_root}/minecraft_server.jar"
|
2015-07-03 10:16:00 -07:00
|
|
|
|
2016-01-23 03:45:46 -08:00
|
|
|
# Link the log files
|
2015-12-13 06:32:38 -08:00
|
|
|
mkdir -p "${pkgdir}/var/log/"
|
2016-02-29 13:19:09 -08:00
|
|
|
ln -s "${_server_root}/logs" "${pkgdir}/var/log/${_game}"
|
2016-01-23 03:45:46 -08:00
|
|
|
|
|
|
|
# Give the group write permissions and set user or group ID on execution
|
2016-02-29 13:19:09 -08:00
|
|
|
chmod g+ws "${pkgdir}${_server_root}"
|
2015-07-03 10:16:00 -07:00
|
|
|
}
|