blob: af714b1c483829b5237fc49c575d0a8e29c42524 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Maintainer: Brian Elder <gth747m@gmail.com>
pkgname=forge-server
pkgdesc="Forge is a free, open-source modding API all of your favourite mods use!"
url="https://minecraftforge.net"
pkgver=50.1.0
pkgrel=2
_minecraftver=1.20.6
_licensever=1.20.x
_srvpath="/opt"
arch=("any")
license=("custom")
depends=("jdk-openjdk")
optdepends=("tar: needed in order to create world backups")
provides=("forge-server=${forge_major}.${forge_minor}.${forge_patch}")
backup=("opt/forge-server/banned-ips.json"
"opt/forge-server/banned-players.json"
"opt/forge-server/config"
"opt/forge-server/eula.txt"
"opt/forge-server/logs"
"opt/forge-server/mods"
"opt/forge-server/ops.json"
"opt/forge-server/server.properties"
"opt/forge-server/usercache.json"
"opt/forge-server/user_jvm_args.txt"
"opt/forge-server/whitelist.json"
"opt/forge-server/world")
install="forge-server.install"
source=("https://raw.githubusercontent.com/MinecraftForge/MinecraftForge/${_licensever}/LICENSE.txt"
"https://maven.minecraftforge.net/net/minecraftforge/forge/${_minecraftver}-${pkgver}/forge-${_minecraftver}-${pkgver}-installer.jar"
"forge-server.service"
"eula.txt")
noextract=("forge-${_minecraftver}-${pkgver}-installer.jar")
sha512sums=("ecee0462a1cad389def4cd1ce1f24f7b5cf0bb1552f45db0482ac0fa7badc54a251adb735977a1dce3412a09716ce44b0ddf81c37dcfad3a5ac5d8e3516be3c8"
"121d76215673741bedf685a497471e53cfc4da75a3dd810a80c0ad6c4304b5b6e9c343fa28e60ebea66b7084d29c44927e5277389b476ed61fd5d012981751bb"
"6e4e7f4d9486ece03e812d3373220d93d1934f1f3bcc86f4075cde6fb0ee76fb6ff7a2d3c19f884602ee89a6b46934bd1f90334c577e560de0d065a5c7449a05"
"68205ffc60327c67a5ebe778598c3350d64b48aad9dacf52fcde435a535a074ba2056db30dff1b18e3c8e38510acd6ececa298b13cd4c4203636560fa4cf70cb")
prepare() {
mkdir -p forge-server || exit
}
build() {
java -jar "./forge-${_minecraftver}-${pkgver}-installer.jar" --installServer ./forge-server
}
package() {
install -d "${pkgdir}/${_srvpath}/${pkgname}"
install -Dm444 "LICENSE.txt" "${pkgdir}/${_srvpath}/${pkgname}"
install -Dm644 "eula.txt" "${pkgdir}/${_srvpath}/${pkgname}"
cp -r "./${pkgname}" "${pkgdir}/${_srvpath}"
ln -s "forge-${_minecraftver}-${pkgver}-shim.jar" "${pkgdir}/${_srvpath}/${pkgname}/forge-server.jar"
install -Dm644 "${srcdir}/forge-server.service" "${pkgdir}/usr/lib/systemd/system/forge-server.service"
}
|