1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-11-21 16:25:00 -05:00

Remove old minetest-server no longer needed

This commit is contained in:
Travis Burtrum 2017-08-27 14:20:24 -04:00
parent 6bf15b21eb
commit a2f6158e95
5 changed files with 6 additions and 94 deletions

6
ppa
View File

@ -117,6 +117,12 @@ build() {
fi fi
} }
rebuild_db() {
cd "$pkg_dir"
repose -f -z $repo_name
sign_packages $repo_name.db $repo_name.files
}
build_deps() { build_deps() {
cd "$src_dir" cd "$src_dir"
if [ "$#" -gt 0 ]; then if [ "$#" -gt 0 ]; then

View File

@ -1,26 +0,0 @@
From 6ed67ee56d0d2d5a0ab58b99eacde018025cd605 Mon Sep 17 00:00:00 2001
From: moparisthebest <admin@moparisthebest.com>
Date: Sun, 5 Feb 2017 00:26:07 -0500
Subject: [PATCH] Add support for unix socket connection to redis
---
src/database-redis.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/database-redis.cpp b/src/database-redis.cpp
index 3bcedad9..ed94de63 100644
--- a/src/database-redis.cpp
+++ b/src/database-redis.cpp
@@ -44,7 +44,8 @@ Database_Redis::Database_Redis(Settings &conf)
}
const char *addr = tmp.c_str();
int port = conf.exists("redis_port") ? conf.getU16("redis_port") : 6379;
- ctx = redisConnect(addr, port);
+ std::size_t unixSocket = tmp.find('/');
+ ctx = unixSocket != std::string::npos ? redisConnectUnix(addr) : redisConnect(addr, port);
if (!ctx) {
throw DatabaseException("Cannot allocate redis context");
} else if (ctx->err) {
--
2.11.1

View File

@ -1,50 +0,0 @@
# $Id$
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Konsta Kokkinen <kray@tsundere.fi>
pkgname='minetest-server'
pkgver=0.4.15
pkgrel=1
arch=('i686' 'x86_64')
url='http://minetest.net/'
license=('GPL')
pkgdesc='Server of infinite-world block sandbox game'
depends=('minetest-common' 'leveldb' 'curl' 'sqlite' 'hiredis' 'luajit')
install=minetest-server.install
makedepends=('sqlite' 'freetype2' 'leveldb' 'openal' 'libvorbis' 'curl' 'irrlicht'
'hicolor-icon-theme' 'cmake' 'hiredis' 'luajit')
source=($pkgname-$pkgver.tar.gz::https://github.com/minetest/minetest/archive/$pkgver.tar.gz
$pkgname-data-$pkgver.tar.gz::https://github.com/minetest/minetest_game/archive/$pkgver.tar.gz
0001-Add-support-for-unix-socket-connection-to-redis.patch
minetest@.service)
md5sums=('ff06c4d29bd152b173d346957e715ba1'
'514fa9bc2b6d1afff2a2524ad8152c7b'
'43a7d80f6d0658c4e1f7415e1fe40d6a'
'ec193b09eb85f2518aaa17506ad06c57')
prepare() {
cd minetest-$pkgver
patch -Np1 -i "${srcdir}/0001-Add-support-for-unix-socket-connection-to-redis.patch"
}
build() {
cd minetest-$pkgver
cmake . \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_CLIENT=0 \
-DBUILD_SERVER=1 \
-DENABLE_LEVELDB=1 \
-DENABLE_REDIS=1
make
}
package() {
cd minetest-$pkgver
make DESTDIR="$pkgdir" install
install -d "$pkgdir"/etc/minetest
install -Dm644 ../minetest@.service \
"$pkgdir"/usr/lib/systemd/system/minetest@.service
rm -rf "$pkgdir"/usr/share/{minetest,appdata,applications,icons,doc}
rm "$pkgdir"/usr/share/man/man6/minetest.6
}

View File

@ -1,8 +0,0 @@
post_install() {
getent group minetest &>/dev/null || groupadd --system minetest
getent passwd minetest &>/dev/null || \
useradd --system -g minetest -s /bin/false -d /var/lib/minetest minetest
[[ ! -d var/lib/minetest ]] && install -d var/lib/minetest
chown minetest:minetest var/lib/minetest
}

View File

@ -1,10 +0,0 @@
[Unit]
Description=Minetest multiplayer server w/ %i.conf server config
After=syslog.target network.target
[Service]
User=minetest
ExecStart=/usr/bin/minetestserver --config /etc/minetest/%i.conf --map-dir /var/lib/minetest/%i/
[Install]
WantedBy=multi-user.target