2016-05-01 10:48:39 -07:00
|
|
|
# Maintainer: Gordian Edenhofer <gordian.edenhofer@gmail.com>
|
2015-09-20 14:23:34 -07:00
|
|
|
# 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
|
2017-09-18 04:57:52 -07:00
|
|
|
pkgver=1.12.2
|
2018-06-11 02:23:53 -07:00
|
|
|
pkgrel=2
|
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')
|
2017-01-07 05:52:33 -08:00
|
|
|
url="https://minecraft.net/"
|
2015-07-03 10:16:00 -07:00
|
|
|
license=('custom')
|
2017-06-14 07:54:47 -07:00
|
|
|
depends=('java-runtime-headless=8' 'screen' 'sudo' 'bash' 'awk' 'sed')
|
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')
|
|
|
|
backup=('etc/conf.d/minecraft')
|
2016-04-03 03:54:13 -07:00
|
|
|
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")
|
2017-09-18 04:57:52 -07:00
|
|
|
sha512sums=('327196bfb833160ae6fb7d12b7d372d031bc0ffbac3455481c1635b01e00f0d5502d4698fbc4f8e7ee59cc3902d56c41261c45d1f1c8f3972e192631f504a0fc'
|
2016-12-20 09:22:53 -08:00
|
|
|
'c8f96bafb0ba3fd8946ac791b09e75cae54dc1a8e02822f91ca70a77a8ba45b253a83c4db30f9cfbf0658a2608b38e6de3d00f1d832ef676f329a78e69eab3e7'
|
|
|
|
'19ee3646bfbace353b65c0373594edb654de11c9671f29cebad3b31109f29f94ade1d529d9f409b0989c376bef9b451585b22a1e0ac4295fcc92d9565f808418'
|
2018-06-11 02:23:53 -07:00
|
|
|
'0c7d8a0c862490967dc392a425d06e8ac008241c29ba1427af0fa6834e25979c62378445c3384dff8af7fdf1ed612cc70ca10e5244723aa2ceb76594ab17dd8f'
|
2016-12-29 05:11:44 -08:00
|
|
|
'73132ec613e05c8ed7ebe4eda2395f1ea0733ffe94ba7e203e06246d5852139bbfb7a9073b2b01891282339a2f85676699cd889cde79d6317066e27fd65b1d67'
|
2017-07-24 10:33:17 -07:00
|
|
|
'b83b93a25d312825363eb85dec4b04379e9a3b2caf9faaf6f4958966900ecd2d2d5d8c5ecc25fca711da1dbf162129720bed419492ef8bf9dbb1649a5bdb1656')
|
2016-02-29 13:19:09 -08:00
|
|
|
|
|
|
|
_game="minecraft"
|
|
|
|
_server_root="/srv/minecraft"
|
2015-07-03 10:16:00 -07:00
|
|
|
|
|
|
|
package() {
|
2016-04-03 03:54:13 -07:00
|
|
|
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
|
|
|
|
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-06-24 11:03:08 -07:00
|
|
|
install -dm2755 "${pkgdir}/${_server_root}/logs"
|
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
|
|
|
}
|