aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-09-22 10:01:44 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-09-22 10:01:44 +0000
commit69ec2b2bf39a07244325537dc3e9120a951b725d (patch)
tree6d58bf3e043cd7dee7d0ec64b605e210627beffa /main
parent3b14d35436bf2990a3f98332dfe3e018407caa52 (diff)
downloadaports-69ec2b2bf39a07244325537dc3e9120a951b725d.tar.bz2
aports-69ec2b2bf39a07244325537dc3e9120a951b725d.tar.xz
main/lua-lustache: move from testing
Diffstat (limited to 'main')
-rw-r--r--main/lua-lustache/APKBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/main/lua-lustache/APKBUILD b/main/lua-lustache/APKBUILD
new file mode 100644
index 0000000000..4a6cef9c0b
--- /dev/null
+++ b/main/lua-lustache/APKBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-lustache
+pkgver=1.3
+pkgrel=1
+pkgdesc="Logic-less {{mustache}} templates with Lua"
+url="http://olivinelabs.com/lustache/"
+arch="noarch"
+license="MIT"
+depends="lua5.1-lustache lua5.2-lustache"
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="lua5.1-lustache:_lua51 lua5.2-lustache:_lua52"
+source="lua-lustache-$pkgver.tar.gz::https://github.com/Olivine-Labs/lustache/archive/v$pkgver.tar.gz"
+
+_builddir="$srcdir"/lustache-$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
+}
+
+build() {
+ cd "$_builddir"
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/share/lua/5.2/lustache \
+ "$pkgdir"/usr/share/lua/5.1
+
+ install -m644 src/lustache/*.lua \
+ "$pkgdir"/usr/share/lua/5.2/lustache/ || return 1
+ install -mg66 src/lustache.lua \
+ "$pkgdir"/usr/share/lua/5.2/
+
+ for i in lustache lustache.lua; do
+ ln -s ../5.2/$i "$pkgdir"/usr/share/lua/5.1/$i || return 1
+ done
+}
+
+_split() {
+ pkgdesc="Logic-less {{mustache}} templates with Lua $1"
+ depends=
+ mkdir -p "$subpkgdir"/usr/share/lua/
+ mv "$pkgdir"/usr/share/lua/$1 "$subpkgdir"/usr/share/lua/ || return 1
+}
+
+_lua51() { _split 5.1; depends="lua5.2-lustache";}
+_lua52() { _split 5.2; }
+
+md5sums="4ac0cd6dfda1e5f3ba44375b560da58b lua-lustache-1.3.tar.gz"
+sha256sums="e694b9bc58fb5e6cebf7840137a5b5ecafcc27a75c33a5da5b0cf6fef1a6906d lua-lustache-1.3.tar.gz"
+sha512sums="c98a18476150faa330ae99401da227f84af7c1e6c5a5f37653ba0a9b92e3d878b67f47c8163d5b90fc2e731a0786e45ce41fbdaaf977c4370e77a3f2cf3b1ec9 lua-lustache-1.3.tar.gz"