aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-lpeg/APKBUILD
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-08-26 11:10:07 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2016-08-26 11:10:07 +0200
commita39e19f96447a409ae6f6c1c63d3c16feb1a3991 (patch)
tree148fdebc95bfd8788f91996703d2094c1b8df4da /testing/lua-lpeg/APKBUILD
parentc5240dc4d2a5efc26b94c943d87848e51ba2794b (diff)
downloadaports-a39e19f96447a409ae6f6c1c63d3c16feb1a3991.tar.bz2
aports-a39e19f96447a409ae6f6c1c63d3c16feb1a3991.tar.xz
unmaintained/[multiple] move back packages to testing
move back packages that are depends of other packages in testing
Diffstat (limited to 'testing/lua-lpeg/APKBUILD')
-rw-r--r--testing/lua-lpeg/APKBUILD70
1 files changed, 70 insertions, 0 deletions
diff --git a/testing/lua-lpeg/APKBUILD b/testing/lua-lpeg/APKBUILD
new file mode 100644
index 0000000000..1f603b0ae3
--- /dev/null
+++ b/testing/lua-lpeg/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=lua-lpeg
+pkgver=0.12.2
+_lua_versions="5.1 5.2 5.3"
+pkgrel=0
+pkgdesc="Pattern-matching library for Lua"
+url="http://www.inf.puc-rio.br/~roberto/lpeg"
+arch="all"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-$pkgver.tar.gz"
+for _v in $_lua_versions; do
+ makedepends="$makedepends lua$_v-dev"
+ subpackages="$subpackages lua$_v-lpeg:split_${_v/./_}"
+done
+
+_builddir="$srcdir"/lpeg-$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
+
+ sed 's/^CFLAGS =/CFLAGS +=/' -i makefile || return 1
+ sed 's/^COPT =/# COPT =/' -i makefile || return 1
+
+ for _ver in $_lua_versions; do
+ cp -r "$_builddir" "$srcdir"/$pkgname-$_ver || return 1
+ done
+}
+
+build() {
+ for _ver in $_lua_versions; do
+ cd "$srcdir"/$pkgname-$_ver
+ make LUADIR=/usr/include/lua$_ver || return 1
+ done
+}
+
+package() {
+ arch="noarch"
+ mkdir -p "$pkgdir"
+}
+
+_split() {
+ local _ver="$1"
+ pkgdesc="Pattern-matching library for Lua $_ver"
+ install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
+ cd "$srcdir"/$pkgname-$_ver || return 1
+ install -Dm755 lpeg.so \
+ "$subpkgdir"/usr/lib/lua/$_ver/lpeg.so || return 1
+ install -Dm644 re.lua \
+ "$subpkgdir"/usr/share/lua/$_ver/re.lua || return 1
+}
+
+for _v in $_lua_versions; do
+ eval "split_${_v/./_}() { _split $_v; }"
+done
+
+md5sums="fabb614eb46e370d4f6b8fd82d17ca7e lpeg-0.12.2.tar.gz"
+sha256sums="6aad270b91d1b1c6fd75f68e162329a04a644e50e917d55f46cc8384b7120004 lpeg-0.12.2.tar.gz"
+sha512sums="81505674473d83e2c777d470cd6ba4eead48ecc32e58e52bc192ca7a167f882e722c5a0cae62937fb3f5f71d6216de1ba4ea3d932e72265028f293d778df5e9e lpeg-0.12.2.tar.gz"