diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-12-28 12:26:28 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-12-28 15:04:08 +0000 |
commit | 69f2a224e3136547d2b941d9d00fc366e53f629e (patch) | |
tree | 8fe3705cfc9e9d8861d9b577e1852b4d7dc25f3a /main/lua-bit32 | |
parent | c464b220306815d1dbb133a32139005fd2dd831a (diff) | |
download | aports-69f2a224e3136547d2b941d9d00fc366e53f629e.tar.bz2 aports-69f2a224e3136547d2b941d9d00fc366e53f629e.tar.xz |
main/lua-bitlib: rename aport to lua-bit32
It seems lua-bitlib is confusing as the module to load is named bit32.
Also other distros (debian fedora) seem to name it lua-bit32 instead.
This aport is copied from duplicated aport in community
Diffstat (limited to 'main/lua-bit32')
-rw-r--r-- | main/lua-bit32/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/main/lua-bit32/APKBUILD b/main/lua-bit32/APKBUILD new file mode 100644 index 0000000000..db1481a273 --- /dev/null +++ b/main/lua-bit32/APKBUILD @@ -0,0 +1,54 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=lua-bit32 +pkgver=5.3.0 +pkgrel=1 +pkgdesc="A lua library providing bitwise operations" +url="https://github.com/keplerproject/lua-compat-5.2" +arch="all" +options="!check" +license="MIT" +source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/lua-compat-5.2/archive/bitlib-$pkgver.tar.gz" +builddir="$srcdir/lua-compat-5.2-bitlib-$pkgver" + +_luaversions="5.1 5.2 5.3" + +for _v in $_luaversions; do + makedepends="$makedepends lua$_v-dev luarocks$_v" + subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" +done + +build() { + cd "$builddir" + + local lver; for lver in $_luaversions; do + msg "Building for Lua $lver..." + + luarocks-$lver \ + CC="$CC" \ + CFLAGS="$CFLAGS -fPIC" \ + LUA_INCDIR="$(pkg-config --variable=includedir lua$lver)" \ + LUA_LIBDIR="$(pkg-config --variable=libdir lua$lver)" \ + make --tree=./build rockspecs/bit32-$pkgver-1.rockspec + 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" + local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/bit32/$pkgver-1" + + cd "$builddir" + install -D -m 755 build/lib/lua/$lver/bit32.so \ + "$subpkgdir"/usr/lib/lua/$lver/bit32.so + + mkdir -p "$rockdir" + echo 'rock_manifest = {}' > "$rockdir"/rock_manifest +} + +sha512sums="234807e201197bc27720864a328f5b63a9fe8bf88bf1fb64cd178532c0745a330b23455fcff0e50d365034f3e43af3c835de7f10a685275da66a7a1ca873e90a lua-bit32-5.3.0.tar.gz" |