mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-03 15:51:33 +01:00
67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
# 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"
|