aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-feedparser
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-11-25 09:49:55 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-11-25 09:49:55 +0000
commit3b213ba9ff180a556e435874e7abafecf12c8f92 (patch)
tree6e5873e6dfe666739068cc673b71193c17314b06 /main/lua-feedparser
parentbc3dae09ee0e39957a8e708f83c0a5e38c75a128 (diff)
downloadaports-3b213ba9ff180a556e435874e7abafecf12c8f92.tar.bz2
aports-3b213ba9ff180a556e435874e7abafecf12c8f92.tar.xz
main/lua-feedparser: move from testing
Diffstat (limited to 'main/lua-feedparser')
-rw-r--r--main/lua-feedparser/APKBUILD66
1 files changed, 66 insertions, 0 deletions
diff --git a/main/lua-feedparser/APKBUILD b/main/lua-feedparser/APKBUILD
new file mode 100644
index 0000000000..451f6ae76d
--- /dev/null
+++ b/main/lua-feedparser/APKBUILD
@@ -0,0 +1,66 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+_luaversions="5.1 5.2"
+pkgname=lua-feedparser
+_name=feedparser
+pkgver=0.7
+pkgrel=0
+pkgdesc="A decent RSS and Atom XML feed parser"
+url="https://github.com/slact/lua-feedparser"
+arch="noarch"
+license="BSD"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-common"
+
+for _i in $_luaversions; do
+ makedepends="$makedepends lua${_i}-dev"
+ subpackages="$subpackages lua${_i}-$_name:_split${_i/./}"
+ depends="$depends lua${_i}-$_name"
+done
+
+source="http://dev.alpinelinux.org/archive/lua-feedparser/lua-feedparser-$pkgver.tar.gz"
+
+_builddir="$srcdir"/lua-feedparser-$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"
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/share/lua/common
+ make LUA_DIR="$pkgdir"/usr/share/lua/common install || return 1
+}
+
+common() {
+ mkdir -p "$subpkgdir"
+ mv "$pkgdir"/usr "$subpkgdir"/
+}
+
+_split() {
+ pkgdesc="$pkgdesc for Lua $1"
+ depends="lua$1-expat lua-feedparser-common"
+ mkdir -p "$subpkgdir"/usr/share/lua/$1
+ ln -s ../common/feedparser "$subpkgdir"/usr/share/lua/$1/
+ ln -s ../common/feedparser.lua "$subpkgdir"/usr/share/lua/$1/
+}
+
+for _i in $_luaversions; do
+ eval "_split${_i/./}() { _split $_i; }"
+done
+
+md5sums="0bd8d7711c8144df7a77a0c8e9a53d30 lua-feedparser-0.7.tar.gz"
+sha256sums="c6a6f8123a680ad8a32122777eb3396bf9b26c6167086253827e7e24fcf90cd0 lua-feedparser-0.7.tar.gz"
+sha512sums="dc901c5a17ddb6f3d0eccbf9c85a04e18491ef9ebbab9eec8440100fb7b2058d1f6bc568fa9a4ce2644a9e475410e8c21276f4a19a8f9f7ab68c4aff878e2195 lua-feedparser-0.7.tar.gz"