diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-11-25 10:12:15 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-11-25 10:12:15 +0100 |
commit | 4f5e1f546534c952585120e1b690aed0c4ec949d (patch) | |
tree | be174d7a53b93657feb1bec7fb4a3adc5edcce73 /testing | |
parent | f507d7d947f5890b3cf205325fdf4ba030e1ac54 (diff) | |
download | aports-4f5e1f546534c952585120e1b690aed0c4ec949d.tar.bz2 aports-4f5e1f546534c952585120e1b690aed0c4ec949d.tar.xz |
testing/lua-feedparser: new aport
A decent RSS and Atom XML feed parser
https://github.com/slact/lua-feedparser
Diffstat (limited to 'testing')
-rw-r--r-- | testing/lua-feedparser/APKBUILD | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/testing/lua-feedparser/APKBUILD b/testing/lua-feedparser/APKBUILD new file mode 100644 index 0000000000..451f6ae76d --- /dev/null +++ b/testing/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" |