aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-cmsgpack
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-06-06 09:03:46 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-06-06 09:03:46 +0000
commit106e5a0e548c7f02acb97f7c8f34f6b5039676dd (patch)
tree8ab29009a620185b4fd0033ef7efa5719536d3d8 /main/lua-cmsgpack
parent5ff951fb24d3e282132abb5f077040411f447f49 (diff)
downloadaports-106e5a0e548c7f02acb97f7c8f34f6b5039676dd.tar.bz2
aports-106e5a0e548c7f02acb97f7c8f34f6b5039676dd.tar.xz
main/lua-cmsgpack: moved from testing
Diffstat (limited to 'main/lua-cmsgpack')
-rw-r--r--main/lua-cmsgpack/APKBUILD48
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"