diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-04 21:56:47 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-04 21:58:02 +0100 |
commit | bd96d89cebb998a9b2b56effeb68f93bdf389849 (patch) | |
tree | 9e39d39c4eca4237e62b316af8914247a0e06112 /community/lua-mpack | |
parent | 35ecd8c55f5e06173302af88b192fa332126353e (diff) | |
download | aports-bd96d89cebb998a9b2b56effeb68f93bdf389849.tar.bz2 aports-bd96d89cebb998a9b2b56effeb68f93bdf389849.tar.xz |
community/lua-mpack: move from testing and claim maintainership
Diffstat (limited to 'community/lua-mpack')
-rw-r--r-- | community/lua-mpack/APKBUILD | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/community/lua-mpack/APKBUILD b/community/lua-mpack/APKBUILD new file mode 100644 index 0000000000..e2670ce4b8 --- /dev/null +++ b/community/lua-mpack/APKBUILD @@ -0,0 +1,60 @@ +# Contributor: Daniel Sabogal <dsabogalcc@gmail.com> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=lua-mpack +_pkgname=libmpack +pkgver=1.0.3 +pkgrel=0 +pkgdesc="Libmpack bindings for Lua" +url="https://github.com/tarruda/libmpack" +arch="noarch" +license="MIT" +depends="" +makedepends="" +subpackages="" +source="$_pkgname-$pkgver.tar.gz::https://github.com/tarruda/$_pkgname/archive/$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$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:all" +done + +prepare() { + default_prepare || return 1 + + local lver; for lver in $_luaversions; do + cp -r "$builddir" "$builddir-$lver" || return 1 + done +} + +build() { + local lver; for lver in $_luaversions; do + msg "Building for Lua $lver..." + make -C "$builddir-$lver"/binding/lua \ + CFLAGS="$CFLAGS" \ + USE_SYSTEM_LUA=yes \ + LUA_INCLUDE="$(pkg-config --cflags lua$lver)" \ + LUA_LIB="$(pkg-config --libs lua$lver)" || return 1 + done +} + +package() { + mkdir -p "$pkgdir" +} + +_subpackage() { + local lver="${subpkgname:3:3}" + pkgdesc="$pkgdesc $lver" + install_if="$pkgname=$pkgver-r$pkgrel lua$lver" + + make -C "$builddir-$lver"/binding/lua \ + USE_SYSTEM_LUA=yes \ + LUA_CMOD_INSTALLDIR="$(pkg-config --variable=INSTALL_CMOD lua$lver)" \ + DESTDIR="$subpkgdir" \ + install +} + +md5sums="7d855d6f989686fae713c10f202f5a1b libmpack-1.0.3.tar.gz" +sha256sums="65eb21cfa9313204ac5296e3b305d752b8422c724b6375caecc6385f0a6d6e22 libmpack-1.0.3.tar.gz" +sha512sums="3024d2830d83a7572a648ee6074467e2096dc6af7c92aaf3c6531e4c25c1c57d9853a60f5b2d1f50039ceeb80bae83f8fdc7241fa48f789cb636bba32fc2a9ba libmpack-1.0.3.tar.gz" |