From a2f6158e954b89feb7235c4a1d7cf2eb1c84ccbc Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Sun, 27 Aug 2017 14:20:24 -0400 Subject: [PATCH] Remove old minetest-server no longer needed --- ppa | 6 +++ ...-for-unix-socket-connection-to-redis.patch | 26 ---------- src/minetest-server/PKGBUILD | 50 ------------------- src/minetest-server/minetest-server.install | 8 --- src/minetest-server/minetest@.service | 10 ---- 5 files changed, 6 insertions(+), 94 deletions(-) delete mode 100644 src/minetest-server/0001-Add-support-for-unix-socket-connection-to-redis.patch delete mode 100644 src/minetest-server/PKGBUILD delete mode 100644 src/minetest-server/minetest-server.install delete mode 100644 src/minetest-server/minetest@.service diff --git a/ppa b/ppa index 304884f..7b017f6 100755 --- a/ppa +++ b/ppa @@ -117,6 +117,12 @@ build() { fi } +rebuild_db() { + cd "$pkg_dir" + repose -f -z $repo_name + sign_packages $repo_name.db $repo_name.files +} + build_deps() { cd "$src_dir" if [ "$#" -gt 0 ]; then diff --git a/src/minetest-server/0001-Add-support-for-unix-socket-connection-to-redis.patch b/src/minetest-server/0001-Add-support-for-unix-socket-connection-to-redis.patch deleted file mode 100644 index 0e8247d..0000000 --- a/src/minetest-server/0001-Add-support-for-unix-socket-connection-to-redis.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 6ed67ee56d0d2d5a0ab58b99eacde018025cd605 Mon Sep 17 00:00:00 2001 -From: moparisthebest -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 - diff --git a/src/minetest-server/PKGBUILD b/src/minetest-server/PKGBUILD deleted file mode 100644 index 3b5481c..0000000 --- a/src/minetest-server/PKGBUILD +++ /dev/null @@ -1,50 +0,0 @@ -# $Id$ -# Maintainer: Laurent Carlier -# Contributor: Konsta Kokkinen - -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 -} diff --git a/src/minetest-server/minetest-server.install b/src/minetest-server/minetest-server.install deleted file mode 100644 index 4348ac2..0000000 --- a/src/minetest-server/minetest-server.install +++ /dev/null @@ -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 -} diff --git a/src/minetest-server/minetest@.service b/src/minetest-server/minetest@.service deleted file mode 100644 index 64bf689..0000000 --- a/src/minetest-server/minetest@.service +++ /dev/null @@ -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