This commit is contained in:
LordMZTE 2022-12-22 15:41:24 +01:00
commit a7abc01b8f
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
6 changed files with 132 additions and 0 deletions

39
.SRCINFO Normal file
View File

@ -0,0 +1,39 @@
pkgbase = ddnet
pkgdesc = A Teeworlds modification with a unique cooperative gameplay. LordMZTE's build options.
pkgver = 16.6
pkgrel = 1
url = https://ddnet.org
arch = x86_64
license = custom:BSD
license = CCPL:by-nc-sa
checkdepends = gmock
makedepends = rust
makedepends = cmake
makedepends = ninja
makedepends = python
makedepends = vulkan-headers
makedepends = glslang
makedepends = spirv-tools
depends = freetype2
depends = opusfile
depends = curl
depends = glew
depends = wavpack
depends = ffmpeg
depends = libnotify
depends = miniupnpc
depends = sqlite
depends = mariadb-libs
depends = vulkan-icd-loader
optdepends = ddnet-maps-git: All the maps used on the official DDNet Servers.
backup = usr/share/ddnet/data/autoexec_server.cfg
source = https://ddnet.org/downloads/DDNet-16.6.tar.xz
source = ddnet-server.service
source = ddnet-sysusers.conf
source = ddnet-tmpfiles.conf
sha256sums = c48eb310acdc40e6f2c3d2c1db1b1bbd1b468729aee9b1e810a93721bdb1597c
sha256sums = 9377a9d7c87abae166c8fa98cd79a61c74482f80f80bc930ae043349e9a84965
sha256sums = 70034f237270b38bf312238a26cfd322e212ca5714bfea4ae91e80c639ce8738
sha256sums = 043452f4de3c86d903973009bb3e59b3492a6669b86d0b1410e59a1476a87369
pkgname = ddnet

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
# ignore everything ...
*
# ... except itself
!.gitignore
# ... except changes in package
!PKGBUILD
!.SRCINFO
# ... except possible source files
!*.patch
!*.diff
!*.desktop
!*.png
!LICENSE
!*.service
!*.conf
# ... except files from PKGBUILD fields
!*.changelog
!*.install

54
PKGBUILD Normal file
View File

@ -0,0 +1,54 @@
# Maintainer: Rafael Fontenelle <rafaelff@gnome.org>
# Maintainer: Edgar Luque <git@edgarluque.com>
# Maintainer: LordMZTE <lord@mzte.de>
pkgname=ddnet
pkgver=16.6
pkgrel=1
pkgdesc="A Teeworlds modification with a unique cooperative gameplay. LordMZTE's build options."
arch=('x86_64')
url="https://ddnet.org"
license=('custom:BSD' 'CCPL:by-nc-sa')
depends=('freetype2' 'opusfile' 'curl' 'glew' 'wavpack' 'ffmpeg' 'libnotify' 'miniupnpc' 'sqlite' 'mariadb-libs' 'vulkan-icd-loader')
makedepends=('rust' 'cmake' 'ninja' 'python' 'vulkan-headers' 'glslang' 'spirv-tools')
checkdepends=('gmock')
optdepends=('ddnet-maps-git: All the maps used on the official DDNet Servers.')
backup=('usr/share/ddnet/data/autoexec_server.cfg')
source=("https://ddnet.org/downloads/DDNet-$pkgver.tar.xz"
"ddnet-server.service" "ddnet-sysusers.conf" "ddnet-tmpfiles.conf")
sha256sums=('c48eb310acdc40e6f2c3d2c1db1b1bbd1b468729aee9b1e810a93721bdb1597c'
'9377a9d7c87abae166c8fa98cd79a61c74482f80f80bc930ae043349e9a84965'
'70034f237270b38bf312238a26cfd322e212ca5714bfea4ae91e80c639ce8738'
'043452f4de3c86d903973009bb3e59b3492a6669b86d0b1410e59a1476a87369')
build() {
mkdir -p build
cd build
cmake ../DDNet-$pkgver \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DAUTOUPDATE=OFF \
-DVIDEORECORDER=ON \
-DUPNP=ON \
-DMYSQL=ON \
-DTEST_MYSQL=OFF \
-GNinja
ninja
}
# Net.Ipv4AndIpv6Work fails when building in clean chroot, hence disabled
check() {
export GTEST_FILTER='-Net.Ipv4AndIpv6Work'
ninja run_tests -C build
}
package() {
DESTDIR="$pkgdir" ninja install -C build
install -vDm644 DDNet-$pkgver/license.txt "$pkgdir/usr/share/licenses/$pkgname/license.txt"
install -vDm644 "$srcdir/ddnet-server.service" "$pkgdir/usr/lib/systemd/system/ddnet-server.service"
install -vDm644 "$srcdir/ddnet-sysusers.conf" "$pkgdir/usr/lib/sysusers.d/ddnet.conf"
install -vDm644 "$srcdir/ddnet-tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/ddnet.conf"
sed -i "$pkgdir/usr/share/ddnet/data/autoexec_server.cfg" \
-e '/sv_test_cmds/s/1/0/' \
-e 's/myServerconfig.cfg/autoexec_server_maps.cfg/'
}

13
ddnet-server.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description = DDNet Server
After = network-online.target
Wants = network-online.target
[Service]
ExecStart = /usr/bin/DDNet-Server
WorkingDirectory = /var/lib/ddnet
User = ddnet
Group = ddnet
[Install]
WantedBy = multi-user.target

2
ddnet-sysusers.conf Normal file
View File

@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
u ddnet - "DDNet user" /var/lib/ddnet

2
ddnet-tmpfiles.conf Normal file
View File

@ -0,0 +1,2 @@
#Type Path Mode User Group Age Argument
d /var/lib/ddnet 0755 ddnet ddnet