mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
main/luajit: modernize abuild and add basic check()
This commit is contained in:
parent
8d68ae9f7b
commit
31b47e3f9b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user