aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-06-04 19:26:22 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-06-04 19:26:22 +0000
commit2cda2edda689ea4708bfe93949a242b3138bdf06 (patch)
tree30ca53f098cc5985f6203cff66e9c464d26cb4b7 /main
parent4d327d7b77c69203039f26f94db0a199fc18465e (diff)
downloadaports-2cda2edda689ea4708bfe93949a242b3138bdf06.tar.bz2
aports-2cda2edda689ea4708bfe93949a242b3138bdf06.tar.xz
main/lua-lyaml: moved from testing
Diffstat (limited to 'main')
-rw-r--r--main/lua-lyaml/APKBUILD88
1 files changed, 88 insertions, 0 deletions
diff --git a/main/lua-lyaml/APKBUILD b/main/lua-lyaml/APKBUILD
new file mode 100644
index 0000000000..a61021775b
--- /dev/null
+++ b/main/lua-lyaml/APKBUILD
@@ -0,0 +1,88 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+
+_luaversions="5.1 5.2 5.3"
+_name=lyaml
+pkgname=lua-$_name
+pkgver=5.1.4
+pkgrel=0
+pkgdesc="LibYAML binding for Lua"
+url="https://github.com/gvvaughan/lyaml"
+arch="all"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="$depends_dev yaml-dev"
+subpackages=""
+for _i in $_luaversions; do
+ makedepends="$makedepends lua$_i-dev"
+ subpackages="$subpackages lua$_i-$_name:_${_i/./}"
+done
+
+install=""
+replaces="lua-yaml"
+source="lyaml-$pkgver.tar.gz::https://github.com/gvvaughan/lyaml/archive/release-v$pkgver.tar.gz"
+
+_builddir="$srcdir"/lyaml-release-v$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ for _i in $_luaversions; do
+ mkdir build-$_i
+ done
+}
+
+build() {
+ cd "$_builddir"
+ for _i in $_luaversions; do
+ cd build-$_i && \
+ LUA=lua$_i \
+ LUA_INCLUDE="$(pkg-config --cflags lua$_i)" \
+ ../configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+ cd ..
+ done
+}
+
+package() {
+ for _i in $_luaversions; do
+ cd "$_builddir"/build-$_i
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/lua/*/*.la || return 1
+ done
+}
+
+_split() {
+ local d= _ver=$1
+ depends=
+ install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
+ for d in usr/lib/lua usr/share/lua; do
+ if [ -d "$pkgdir"/$d/$_ver ]; then
+ mkdir -p "$subpkgdir"/$d/$_ver
+ mv "$pkgdir"/$d/$_ver/* "$subpkgdir"/$d/$_ver/ \
+ || return 1
+ rmdir "$pkgdir"/$d/$_ver 2>/dev/null || true
+ fi
+ done
+}
+
+for _i in $_luaversions; do
+ eval "_${_i/./}() { _split $_i lyaml; }"
+done
+
+
+md5sums="52e44331e2af7797b340920c8fd3b942 lyaml-5.1.4.tar.gz"
+sha256sums="7893744d32facf8c98a8b570f5b783ee7a213c09a9f049b9f6254c767c471837 lyaml-5.1.4.tar.gz"
+sha512sums="2fafe985f3a23f88d2a1e2bd4d5ff080a99266ac795bc0cae3ea50d545624d4c7f9b9041912a250876898be2800a4a308425442ad7c60172c4d28a036a859d4e lyaml-5.1.4.tar.gz"