lua52-MessagePack: add support for other versions

This commit is contained in:
q66 2020-07-01 18:11:48 +02:00
parent 24edcb35a3
commit 11b2f9ba15
5 changed files with 59 additions and 21 deletions

1
srcpkgs/lua51-MessagePack Symbolic link
View file

@ -0,0 +1 @@
lua54-MessagePack

1
srcpkgs/lua52-MessagePack Symbolic link
View file

@ -0,0 +1 @@
lua54-MessagePack

View file

@ -1,21 +0,0 @@
# Template file for 'lua52-MessagePack'
pkgname=lua52-MessagePack
version=0.5.2
revision=1
archs=noarch
wrksrc="${pkgname/52/}-${version}"
hostmakedepends="lua52"
makedepends="lua52"
depends="lua52>=5.2"
short_desc="Pure Lua implementation of msgpack.org"
maintainer="Tj Vanderpoel (bougyman) <tj@rubyists.com>"
license="MIT"
homepage="https://framagit.org/fperrad/lua-MessagePack"
distfiles="${homepage}/-/archive/${version}/${wrksrc}.tar.gz"
checksum=e8285b1c574fca279e7ec8c09b49073ef48a13c4a12d8db920ca50be34b07394
replaces="lua-MessagePack>=0"
do_install() {
make PREFIX=/usr DESTDIR="${DESTDIR}" LUAVER=5.2 install
vlicense COPYRIGHT LICENSE
}

1
srcpkgs/lua53-MessagePack Symbolic link
View file

@ -0,0 +1 @@
lua54-MessagePack

View file

@ -0,0 +1,56 @@
# Template file for 'lua54-MessagePack'
pkgname=lua54-MessagePack
version=0.5.2
revision=2
archs=noarch
wrksrc="lua-MessagePack-${version}"
depends="lua54"
_desc="Pure Lua implementation of msgpack.org"
short_desc="${_desc} (5.4.x)"
maintainer="Tj Vanderpoel (bougyman) <tj@rubyists.com>"
license="MIT"
homepage="https://framagit.org/fperrad/lua-MessagePack"
distfiles="${homepage}/-/archive/${version}/${wrksrc}.tar.gz"
checksum=e8285b1c574fca279e7ec8c09b49073ef48a13c4a12d8db920ca50be34b07394
replaces="lua-MessagePack>=0"
do_install() {
# Once the 5.3 version is confirmed to work completely with 5.4,
# adjust so that we install the 5.3 version for 5.4 as well
for luaver in 5.1 5.2 5.3 5.4; do
vmkdir usr/share/lua/${luaver}
if [ "$luaver" = "5.3" ]; then
vinstall src5.3/MessagePack.lua 644 usr/share/lua/${luaver}
else
vinstall src/MessagePack.lua 644 usr/share/lua/${luaver}
fi
done
vlicense COPYRIGHT LICENSE
}
lua51-MessagePack_package() {
depends="lua51"
short_desc="${_desc} (5.1.x)"
pkg_install() {
vlicense "${wrksrc}/COPYRIGHT" LICENSE
vmove usr/share/lua/5.1
}
}
lua52-MessagePack_package() {
depends="lua52"
short_desc="${_desc} (5.2.x)"
pkg_install() {
vlicense "${wrksrc}/COPYRIGHT" LICENSE
vmove usr/share/lua/5.2
}
}
lua53-MessagePack_package() {
depends="lua53"
short_desc="${_desc} (5.3.x)"
pkg_install() {
vlicense "${wrksrc}/COPYRIGHT" LICENSE
vmove usr/share/lua/5.3
}
}