aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-feedparser
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-04-16 20:47:18 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-04-16 20:53:16 +0200
commit9c78c1b9f5f8efc6380b58dba8f46f5a14e5577c (patch)
tree4170c89c8d4ae6b97c70efe31c8ea5cc5ec5e250 /main/lua-feedparser
parent45acbe8f80c0d697250196ff230de8d7be276cf2 (diff)
downloadaports-9c78c1b9f5f8efc6380b58dba8f46f5a14e5577c.tar.bz2
aports-9c78c1b9f5f8efc6380b58dba8f46f5a14e5577c.tar.xz
main/lua-feedparser: modernize abuild, remove subpkgs, add rock_manifest
/usr/share/lua/common is now on default LUA_PATH in all Lua interpreters we package.
Diffstat (limited to 'main/lua-feedparser')
-rw-r--r--main/lua-feedparser/APKBUILD69
1 files changed, 18 insertions, 51 deletions
diff --git a/main/lua-feedparser/APKBUILD b/main/lua-feedparser/APKBUILD
index aa2c4f1ede..1f768f2e32 100644
--- a/main/lua-feedparser/APKBUILD
+++ b/main/lua-feedparser/APKBUILD
@@ -1,67 +1,34 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-_luaversions="5.1 5.2 5.3"
pkgname=lua-feedparser
-_name=feedparser
+_rockname=feedparser
pkgver=0.71
-pkgrel=0
+pkgrel=1
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"
+depends="lua lua-expat"
+provides="$pkgname-common=$pkgver-r$pkgrel" # for backward compatibility
+replaces="$pkgname-common" # for backward compatibility
+source="$pkgname-$pkgver.tar.gz::https://github.com/slact/$pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
-for _i in $_luaversions; do
- makedepends="$makedepends lua${_i}-dev"
- subpackages="$subpackages lua${_i}-$_name:_split${_i/./}"
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel" # for backward compatibility
done
-source="lua-feedparser-$pkgver.tar.gz::https://github.com/slact/lua-feedparser/archive/$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
-}
+ local lmod_dir="$pkgdir/usr/share/lua/common"
+ local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-3"
-common() {
- depends=
- mkdir -p "$subpkgdir"
- mv "$pkgdir"/usr "$subpkgdir"/
-}
+ cd "$builddir"
-_split() {
- pkgdesc="$pkgdesc for Lua $1"
- depends="lua$1-expat lua-feedparser-common"
- install_if="lua$1 $pkgname=$pkgver-r$pkgrel"
- 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/
-}
+ mkdir -p "$lmod_dir"
+ make LUA_DIR="$lmod_dir" install
-for _i in $_luaversions; do
- eval "_split${_i/./}() { _split $_i; }"
-done
+ mkdir -p "$rockdir"
+ echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
+}
-md5sums="a34ffbcfe3fc6a7d62ccb9e162d1dc85 lua-feedparser-0.71.tar.gz"
-sha256sums="053abade5004b057ca10e4adec0f8fc6f299faf3f668ae999c3b6c55784f29f9 lua-feedparser-0.71.tar.gz"
sha512sums="8a65947b5472321fc162ec325c31e4d92e52e6cba6952c01c9941a7596403ed495ee464bfc32f5fdda3c58d33fae3a3b38882f7f22ecc16360c6603cd7ab4d4d lua-feedparser-0.71.tar.gz"