diff options
Diffstat (limited to 'main/lua-cmsgpack/APKBUILD')
-rw-r--r-- | main/lua-cmsgpack/APKBUILD | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/main/lua-cmsgpack/APKBUILD b/main/lua-cmsgpack/APKBUILD new file mode 100644 index 0000000000..e45d66a38e --- /dev/null +++ b/main/lua-cmsgpack/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: Francesco Colista <francesco.colista@gmail.com> +# Maintainer: Francesco Colista <francesco.colista@gmail.com> +pkgname=lua-cmsgpack +pkgver=0.3.0 +pkgrel=0 +pkgdesc="MessagePack C implementation for Lua" +url="https://github.com/antirez/lua-cmsgpack" +arch="all" +license="Two-clause BSD" +depends="" +depends_dev="" +makedepends="lua-dev" +install="" +subpackages="" +source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.bz2" +_giturl="https://github.com/antirez/lua-cmsgpack.git" +_upload=dev.alpinelinux.org:/archive/$pkgname/ +_builddir="$srcdir"/$pkgname-$pkgver + +snapshot() { + local _pkg=$pkgname-$pkgver.tar.bz2 + mkdir -p "$srcdir" + cd "$srcdir" + rm -rf "$pkgname" + git clone --depth=1 --bare $_giturl || return 1 + local _tag=$(git --git-dir ${_giturl##*/} tag| head -1) + git --git-dir ${_giturl##*/} archive \ + --prefix=$pkgname-$pkgver/ --format=tar \ + $_tag | bzip2 > $_pkg || return 1 + msg "New snapshot: $_pkg" + if [ -n "$_upload" ]; then + msg "Uploading to $_upload" + scp $_pkg $_upload && abump $pkgname-$pkgver || return 1 + fi +} + +build() { + cd "$_builddir" + ${CC:-gcc} $CFLAGS -fPIC $(pkg-config --cflags lua) -o cmsgpack.so -shared $LFDLAGS $(pkg-config --libs lua) lua_cmsgpack.c +} + +package() { + cd "$_builddir" + local dir=$( pkg-config --variable INSTALL_CMOD lua) + install -D cmsgpack.so "$pkgdir"/$dir/cmsgpack.so +} + +md5sums="c7224cc06a6b03edce287bce797de851 lua-cmsgpack-0.3.0.tar.bz2" |