Subject: [alpine-aports] [PATCH] community/minetest: cleanup

From: Sascha Paunovic <[email-masked]>
Date: Thu, 7 Jun 2018 18:24:06 +0200

also remove -DDISABLE_LUAJIT, it does nothing
---
 community/minetest/APKBUILD | 61 +++++++++++++++----------------------
 1 file changed, 24 insertions(+), 37 deletions(-)

diff --git a/community/minetest/APKBUILD b/community/minetest/APKBUILD
index 385e86aae7..ff698d6eb4 100644
--- a/community/minetest/APKBUILD
+++ b/community/minetest/APKBUILD
@@ -15,80 +15,67 @@ pkggroups="minetest"
 makedepends="sqlite-dev bzip2-dev libressl-dev irrlicht-dev cmake libvorbis-dev
 	libjpeg-turbo-dev libpng-dev openal-soft-dev libogg-dev mesa-dev
 	sqlite-dev luajit-dev hiredis-dev curl-dev"
-source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/minetest/${pkgname}/tar.gz/${pkgver}
+source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/minetest/$pkgname/tar.gz/$pkgver
 	minetest-server.confd
 	minetest-server.initd
 	"
 subpackages="$pkgname-doc $pkgname-common::noarch $pkgname-server"
 
-_builddir="${srcdir}"/${pkgname}-${pkgver}
-
-prepare() {
-	local pf
-	cd "${_builddir}"
-	for pf in $source; do
-		case $pf in
-		*.patch) msg $pf; patch -p1 -i "$srcdir"/${pf} || return 1;;
-		esac
-	done
-}
+builddir="$srcdir"/$pkgname-$pkgver
 
 build() {
-	mkdir "${_builddir}"/.build_client
-	cd "${_builddir}"/.build_client
+	mkdir "$builddir"/.build_client
+	cd "$builddir"/.build_client
 	cmake -DCUSTOM_BINDIR=/usr/bin \
 		-DCMAKE_INSTALL_PREFIX=/usr \
-		-DCUSTOM_DOCDIR="/usr/share/doc/${pkgname}" \
-		-DCUSTOM_SHAREDIR="/usr/share/${pkgname}" \
-		-DDISABLE_LUAJIT=0 \
+		-DCUSTOM_DOCDIR="/usr/share/doc/$pkgname" \
+		-DCUSTOM_SHAREDIR="/usr/share/$pkgname" \
 		-DBUILD_CLIENT=1 \
 		-DBUILD_SERVER=0 \
 		-DENABLE_REDIS=0 \
 		-DENABLE_CURL=1 \
 		-DRUN_IN_PLACE=0 \
 		..
-	make || return 1
-	mkdir "${_builddir}"/.build_server
-	cd "${_builddir}"/.build_server
+	make
+	mkdir "$builddir"/.build_server
+	cd "$builddir"/.build_server
 	cmake -DCUSTOM_BINDIR=/usr/bin \
 		-DCMAKE_INSTALL_PREFIX=/usr \
 		-DCUSTOM_DOCDIR="/usr/share/doc/minetest" \
 		-DCUSTOM_SHAREDIR="/usr/share/minetest" \
-		-DDISABLE_LUAJIT=1 \
 		-DBUILD_CLIENT=0 \
 		-DBUILD_SERVER=1 \
 		-DENABLE_REDIS=1 \
 		-DENABLE_CURL=1 \
 		-DRUN_IN_PLACE=0 \
 		..
-	make || return 1
+	make
 }
 
 common() {
-	install -o minetest -g minetest -d "$subpkgdir"/var/lib/minetest \
-		|| return 1
-	mkdir -p "${subpkgdir}/usr/share/minetest"
-	mv "${pkgdir}/usr/share/minetest/builtin" \
-		"${subpkgdir}/usr/share/minetest" || return 1
-	mv "${pkgdir}/usr/share/minetest/games" \
-		"${subpkgdir}/usr/share/minetest" || return 1
+	install -o minetest -g minetest -d "$subpkgdir"/var/lib/minetest
+	mkdir -p "$subpkgdir/usr/share/minetest"
+	mv "$pkgdir/usr/share/minetest/builtin" \
+		"$subpkgdir/usr/share/minetest"
+	mv "$pkgdir/usr/share/minetest/games" \
+		"$subpkgdir/usr/share/minetest"
 }
 
 package() {
-	cd "${_builddir}"/.build_client
-	make DESTDIR="${pkgdir}" install || return 1
+	cd "$builddir"/.build_client
+	make DESTDIR="$pkgdir" install
 }
 
 server(){
-	mkdir -p "${subpkgdir}/usr/bin"
-	cd "${_builddir}"
+	mkdir -p "$subpkgdir/usr/bin"
+	cd "$builddir"
 	install -m644 -D $pkgname.conf.example \
-		"$subpkgdir"/etc/$pkgname/$pkgname.conf || return 1
+		"$subpkgdir"/etc/$pkgname/$pkgname.conf
 	install -D -m755 "$srcdir"/minetest-server.initd \
-		"$subpkgdir"/etc/init.d/minetest-server || return 1
+		"$subpkgdir"/etc/init.d/minetest-server
 	install -D -m644 "$srcdir"/minetest-server.confd \
-		"$subpkgdir"/etc/conf.d/minetest-server || return 1
-	cp bin/minetestserver ${subpkgdir}/usr/bin
+		"$subpkgdir"/etc/conf.d/minetest-server
+	cp bin/minetestserver $subpkgdir/usr/bin
 }
 
 sha512sums="3015f5a03be37c5395b55b6dc9f883f9270b19f709a47250f36bc7b1ce6d04a0e89e4366d86da33bbebbfb64f04ff008aec66c96930d7314991a21160265bafe  minetest-0.4.17.tar.gz
-- 
2.17.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---