aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-feedparser/APKBUILD
blob: e058599139e3d87c99ef1bb7e5565081ea70b454 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-feedparser
_rockname=feedparser
pkgver=0.71
pkgrel=2
pkgdesc="A decent RSS and Atom XML feed parser"
url="https://github.com/slact/lua-feedparser"
arch="noarch"
license="BSD-3-Clause"
depends="lua lua-expat"
checkdepends="luajit"
source="$pkgname-$pkgver.tar.gz::https://github.com/slact/lua-feedparser/archive/$pkgver.tar.gz"

provides="$pkgname-common=$pkgver-r$pkgrel"  # for backward compatibility
replaces="$pkgname-common"  # for backward compatibility

_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
	checkdepends="$checkdepends lua$_v"
	provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel"  # for backward compatibility
done

check() {
	local lver; for lver in $_luaversions jit; do
		msg "Testing on Lua $lver"
		make test LUA_BIN=lua$lver
	done
}

package() {
	local lmod_dir="$pkgdir/usr/share/lua/common"
	local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-3"

	mkdir -p "$lmod_dir"
	make LUA_DIR="$lmod_dir" install

	mkdir -p "$rockdir"
	echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}

sha512sums="8a65947b5472321fc162ec325c31e4d92e52e6cba6952c01c9941a7596403ed495ee464bfc32f5fdda3c58d33fae3a3b38882f7f22ecc16360c6603cd7ab4d4d  lua-feedparser-0.71.tar.gz"