mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 05:17:07 +02:00
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.
This commit is contained in:
parent
45acbe8f80
commit
9c78c1b9f5
@ -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"
|
||||
|
||||
cd "$builddir"
|
||||
|
||||
mkdir -p "$lmod_dir"
|
||||
make LUA_DIR="$lmod_dir" install
|
||||
|
||||
mkdir -p "$rockdir"
|
||||
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
|
||||
}
|
||||
|
||||
common() {
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"
|
||||
mv "$pkgdir"/usr "$subpkgdir"/
|
||||
}
|
||||
|
||||
_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/
|
||||
}
|
||||
|
||||
for _i in $_luaversions; do
|
||||
eval "_split${_i/./}() { _split $_i; }"
|
||||
done
|
||||
|
||||
md5sums="a34ffbcfe3fc6a7d62ccb9e162d1dc85 lua-feedparser-0.71.tar.gz"
|
||||
sha256sums="053abade5004b057ca10e4adec0f8fc6f299faf3f668ae999c3b6c55784f29f9 lua-feedparser-0.71.tar.gz"
|
||||
sha512sums="8a65947b5472321fc162ec325c31e4d92e52e6cba6952c01c9941a7596403ed495ee464bfc32f5fdda3c58d33fae3a3b38882f7f22ecc16360c6603cd7ab4d4d lua-feedparser-0.71.tar.gz"
|
||||
|
Loading…
Reference in New Issue
Block a user