aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-bitop
diff options
context:
space:
mode:
authorLuca Weiss <luca@z3ntu.xyz>2019-07-13 23:18:58 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2019-07-22 10:00:20 +0000
commit8bddcb6c9d608064735ac941c08e3cfba8daba2d (patch)
tree25cff1d98ae4df0823613a296f10bb73c22a562f /community/lua-bitop
parent5740bcbd0a252cf0435e38353aeb2d9da0b97968 (diff)
downloadaports-8bddcb6c9d608064735ac941c08e3cfba8daba2d.tar.bz2
aports-8bddcb6c9d608064735ac941c08e3cfba8daba2d.tar.xz
community/lua-bitop: new aport
Diffstat (limited to 'community/lua-bitop')
-rw-r--r--community/lua-bitop/APKBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/community/lua-bitop/APKBUILD b/community/lua-bitop/APKBUILD
new file mode 100644
index 0000000000..525bbf54be
--- /dev/null
+++ b/community/lua-bitop/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor:
+# Maintainer:
+pkgname="lua-bitop"
+pkgver="1.0.2"
+pkgrel=0
+pkgdesc="Bitwise operations on numbers"
+url="https://bitop.luajit.org/"
+arch="all"
+license="MIT"
+source="https://bitop.luajit.org/download/LuaBitOp-$pkgver.tar.gz"
+builddir="$srcdir/LuaBitOp-$pkgver"
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ makedepends="$makedepends lua$_v-dev"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+done
+
+prepare() {
+ default_prepare
+
+ local lver; for lver in $_luaversions; do
+ cp -r "$builddir" "$builddir-$lver"
+ done
+}
+
+build() {
+ local lver; for lver in $_luaversions; do
+ msg "Building for Lua $lver..."
+ make -C "$builddir-$lver" LUA="lua$lver"
+ done
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_subpackage() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc (for Lua $lver)"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
+
+ cd "$builddir-$lver"
+ install -Dm 644 bit.so "$subpkgdir/usr/lib/lua/$lver/bit.so"
+}
+
+sha512sums="a652050ea5c6fbeb8a28b05e2bc4a3550c854cc45f7f42c8c1b0a81f5b76773cdf061e6a839cdb339614118169e578b6e3efa5a3efbe59a2f01874b2fa2b4f2e LuaBitOp-1.0.2.tar.gz"