diff --git a/testing/monopd/APKBUILD b/testing/monopd/APKBUILD new file mode 100644 index 00000000000..4ad4a5fb244 --- /dev/null +++ b/testing/monopd/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Thomas Kienlen +# Maintainer: Thomas Kienlen +pkgname=monopd +pkgver=0.10.4 +pkgrel=0 +pkgdesc="Atlantik game network server" +url="http://gtkatlantic.gradator.net/" +arch="all" +license="GPL-2.0-only" +makedepends=" + autoconf + automake + muparser-dev + utfcpp + " +source=" + https://cgit.tuxfamily.org/gtkatlantic/atlanticd.git/snapshot/monopd-$pkgver.tar.gz + utfcpp-fix-paths.patch + monopd.initd + " +install="monopd.pre-install" +subpackages="$pkgname-openrc" + +build() { + ./autogen.sh \ + --prefix=/usr \ + --sysconfdir=/etc \ + --build=$CBUILD --host=$CHOST + + make +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install + + install -D -m 755 "$srcdir/monopd.initd" "$pkgdir/etc/init.d/monopd" +} + +sha512sums=" +7be7773f585f136de72c8bafb1d7c9c47609e4ffe5ce3b2320a94d806263ab84b24e8dfa2cb3e8a02fe4b9633b48075f824d989fc8021c765cb26522d34d937f monopd-0.10.4.tar.gz +9bca7913e6752133369c17fedf52edfdc2ff9ad3a5e52b201871c150105187e1b56984cb7b889da74d4c7fd633753a3d8f4470efe984bf5401526c9fa91c7ca3 utfcpp-fix-paths.patch +c4c480654f6b1ed4cb3f233313094696dba82dade6411fe60873091d30ca4533b7c0d185aa33330ac46178923c9dc2354740bd249f014ebb082f2f8da9d0de23 monopd.initd +" diff --git a/testing/monopd/monopd.initd b/testing/monopd/monopd.initd new file mode 100644 index 00000000000..9bf45fefdd2 --- /dev/null +++ b/testing/monopd/monopd.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run + +supervisor=supervise-daemon +command=/usr/bin/monopd +command_user="monopd:monopd" +output_log=/var/log/$RC_SVCNAME.log + +depend() { + need net +} + +start_pre() { + checkpath --directory --owner $command_user --mode 0775 \ + /var/cache/$RC_SVCNAME + checkpath --file --owner $command_user --mode 0644 \ + /var/log/$RC_SVCNAME.log +} diff --git a/testing/monopd/monopd.pre-install b/testing/monopd/monopd.pre-install new file mode 100755 index 00000000000..b411eb7ff83 --- /dev/null +++ b/testing/monopd/monopd.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +addgroup -S monopd 2>/dev/null +adduser -S -D -H -h /dev/null -s /sbin/nologin -g monopd monopd 2>/dev/null +exit 0 diff --git a/testing/monopd/utfcpp-fix-paths.patch b/testing/monopd/utfcpp-fix-paths.patch new file mode 100644 index 00000000000..9180f11747a --- /dev/null +++ b/testing/monopd/utfcpp-fix-paths.patch @@ -0,0 +1,35 @@ +Fixes utf8cpp files paths + +--- a/configure.ac.orig 2025-01-07 22:10:12.991524862 +0100 ++++ b/configure.ac 2025-01-07 22:10:21.504672933 +0100 +@@ -17,7 +17,7 @@ AC_PROG_CXX + # Checks for header files. + AC_CHECK_HEADER([cmath], [], [AC_MSG_ERROR([Your STL doesn't come with cmath, upgrade your libstdc++.])]) + AC_CHECK_HEADER([muParser.h], [], [AC_MSG_ERROR([Please install libmuparser >= 2.0.0 from http://muparser.beltoforion.de/])]) +-AC_CHECK_HEADER([utf8.h], [], [AC_MSG_ERROR([Please install UTF8-CPP library from http://utfcpp.sourceforge.net/])]) ++AC_CHECK_HEADER([utf8cpp/utf8.h], [], [AC_MSG_ERROR([Please install UTF8-CPP library from http://utfcpp.sourceforge.net/])]) + + # Checks for typedefs, structures, and compiler characteristics. + +--- a/src/server.cpp.orig 2025-01-07 22:10:29.541164708 +0100 ++++ b/src/server.cpp 2025-01-07 22:10:35.551033920 +0100 +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + + #include + +--- a/src/game.cpp.orig 2025-01-07 22:10:50.170715763 +0100 ++++ b/src/game.cpp 2025-01-07 22:10:54.343958275 +0100 +@@ -31,7 +31,7 @@ + #include + #include + +-#include ++#include + + #include "auction.h" + #include "card.h"