🎉 Added ror-server PKGBUILD

This commit is contained in:
Edgar 2021-10-23 16:37:28 +02:00
parent 9aae808291
commit a4511b2178
No known key found for this signature in database
GPG Key ID: 17D930BB616061A5
2 changed files with 44 additions and 0 deletions

26
ror-server/PKGBUILD Normal file
View File

@ -0,0 +1,26 @@
# Maintainer: Edgar <Edgar{at}AnotherFoxGuy.com>
pkgname=rorserver
pkgver=2021.04
pkgrel=1
pkgdesc="Dedicated server software for Rigs of Rods"
arch=(i686 x86_64)
url="https://github.com/RigsOfRods/ror-server"
license=('GPL2')
makedepends=('git' 'cmake')
source=("git://github.com/RigsOfRods/ror-server.git")
md5sums=('SKIP')
install="rorserver.install"
build() {
cd "$srcdir/ror-server"
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DRORSERVER_WITH_ANGELSCRIPT=ON
make -j$(nproc)
}
package() {
cd "$srcdir/ror-server"
make DESTDIR="${pkgdir}" install
}

View File

@ -0,0 +1,18 @@
#!/bin/bash
post_install() {
# create user
useradd -s /bin/false rorserver
# create installation directories
mkdir -p /etc/rorserver
mkdir -p /var/log/rorserver
mkdir -p /var/run/rorserver
chown rorserver:rorserver -R /etc/rorserver
chown rorserver:rorserver -R /var/log/rorserver
chown rorserver:rorserver -R /var/run/rorserver
echo "example configuration added: /etc/rorserver/simple.cfg.example please configure this file to your likings and rename it to simple.cfg"
echo "after you have configured your server, you can start it with: \"/etc/init.d/rorserver start\""
}