aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-05-17 21:22:43 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-05-17 21:23:38 +0200
commit31b47e3f9bfbb9c1e438a8161ec9021131c7244e (patch)
tree8914f597dbe125f354ccee5cc07f19659a411ebb
parent8d68ae9f7bc109093b92fe871add46bd8f70e131 (diff)
downloadaports-31b47e3f9bfbb9c1e438a8161ec9021131c7244e.tar.bz2
aports-31b47e3f9bfbb9c1e438a8161ec9021131c7244e.tar.xz
main/luajit: modernize abuild and add basic check()
-rw-r--r--main/luajit/APKBUILD32
1 files changed, 20 insertions, 12 deletions
diff --git a/main/luajit/APKBUILD b/main/luajit/APKBUILD
index eb32b7b090..3fe5b17c50 100644
--- a/main/luajit/APKBUILD
+++ b/main/luajit/APKBUILD
@@ -1,9 +1,9 @@
# Maintainer: Cameron Banta <cbanta@gmail.com>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
-
pkgname=luajit
+_pkgname=LuaJIT
pkgver=2.1.0_beta3
-_realver=${pkgver/_/-}
+_pkgver=${pkgver/_/-}
pkgrel=0
pkgdesc='Just-in-time compiler and replacement for Lua 5.1'
url='http://luajit.org'
@@ -11,28 +11,36 @@ arch="all !s390x"
license="MIT"
makedepends="$depends_dev paxmark"
subpackages="$pkgname-dev $pkgname-doc"
-source="http://luajit.org/download/LuaJIT-$_realver.tar.gz
- enable-support-for-ppc64le.patch"
-
-builddir=$srcdir/LuaJIT-$_realver
+source="http://luajit.org/download/$_pkgname-$_pkgver.tar.gz
+ enable-support-for-ppc64le.patch"
+builddir="$srcdir/$_pkgname-$_pkgver"
build() {
cd "$builddir"
- make amalg PREFIX=/usr || return 1
+
+ make amalg PREFIX=/usr
+}
+
+check() {
+ cd "$builddir"
+
+ ./src/luajit -v
+ ./src/luajit -e 'print("Hello, world!")'
}
package() {
cd "$builddir"
- make install DESTDIR="$pkgdir" PREFIX=/usr || return 1
+
+ make install DESTDIR="$pkgdir" PREFIX=/usr
local paxflags="-m"
[ "$CARCH" = "x86" ] && paxflags="-msp"
- paxmark "$paxflags" "$pkgdir"/usr/bin/luajit-$_realver || return 1
+ paxmark $paxflags "$pkgdir"/usr/bin/luajit-$_pkgver
- cd "$pkgdir"/usr/bin && ln -s luajit-$_realver luajit || return 1
+ ln -s luajit-$_pkgver "$pkgdir"/usr/bin/luajit
- install -Dm644 "$builddir"/COPYRIGHT \
- $pkgdir/usr/share/licenses/$pkgname/COPYRIGHT
+ install -Dm644 COPYRIGHT \
+ "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
}
sha512sums="c44e967a0f671ed32b55aee810bc8b3b63737a2d7363b8984ae1949b24f98dbb3f9be7c1e10239fdeb96a3e3c836f606342cbd61838cf9bcadb077443eb5bc12 LuaJIT-2.1.0-beta3.tar.gz