diff options
author | Francesco Colista <francesco.colista@gmail.com> | 2012-12-13 16:18:48 +0000 |
---|---|---|
committer | Francesco Colista <francesco.colista@gmail.com> | 2012-12-13 16:18:48 +0000 |
commit | 7c47137785b12d37b4c91a84d78d83dc18ce44f7 (patch) | |
tree | ac2aa42dea839b38bce0a114452c4ce279947153 | |
parent | bd099333e5df452055077ddb01f23a3543e7e592 (diff) | |
download | aports-7c47137785b12d37b4c91a84d78d83dc18ce44f7.tar.bz2 aports-7c47137785b12d37b4c91a84d78d83dc18ce44f7.tar.xz |
testing/lua-cmsgpack: new aport
-rw-r--r-- | testing/lua-cmsgpack/APKBUILD | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/testing/lua-cmsgpack/APKBUILD b/testing/lua-cmsgpack/APKBUILD new file mode 100644 index 000000000..e45d66a38 --- /dev/null +++ b/testing/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" |