From 11b2f9ba157934bd5e1c6396f3d5a35e2bb7fe9d Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 1 Jul 2020 18:11:48 +0200 Subject: [PATCH] lua52-MessagePack: add support for other versions --- srcpkgs/lua51-MessagePack | 1 + srcpkgs/lua52-MessagePack | 1 + srcpkgs/lua52-MessagePack/template | 21 ----------- srcpkgs/lua53-MessagePack | 1 + srcpkgs/lua54-MessagePack/template | 56 ++++++++++++++++++++++++++++++ 5 files changed, 59 insertions(+), 21 deletions(-) create mode 120000 srcpkgs/lua51-MessagePack create mode 120000 srcpkgs/lua52-MessagePack delete mode 100644 srcpkgs/lua52-MessagePack/template create mode 120000 srcpkgs/lua53-MessagePack create mode 100644 srcpkgs/lua54-MessagePack/template diff --git a/srcpkgs/lua51-MessagePack b/srcpkgs/lua51-MessagePack new file mode 120000 index 0000000000..990ceab3ba --- /dev/null +++ b/srcpkgs/lua51-MessagePack @@ -0,0 +1 @@ +lua54-MessagePack \ No newline at end of file diff --git a/srcpkgs/lua52-MessagePack b/srcpkgs/lua52-MessagePack new file mode 120000 index 0000000000..990ceab3ba --- /dev/null +++ b/srcpkgs/lua52-MessagePack @@ -0,0 +1 @@ +lua54-MessagePack \ No newline at end of file diff --git a/srcpkgs/lua52-MessagePack/template b/srcpkgs/lua52-MessagePack/template deleted file mode 100644 index 9e8b775e1d..0000000000 --- a/srcpkgs/lua52-MessagePack/template +++ /dev/null @@ -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) " -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 -} diff --git a/srcpkgs/lua53-MessagePack b/srcpkgs/lua53-MessagePack new file mode 120000 index 0000000000..990ceab3ba --- /dev/null +++ b/srcpkgs/lua53-MessagePack @@ -0,0 +1 @@ +lua54-MessagePack \ No newline at end of file diff --git a/srcpkgs/lua54-MessagePack/template b/srcpkgs/lua54-MessagePack/template new file mode 100644 index 0000000000..6383677d8c --- /dev/null +++ b/srcpkgs/lua54-MessagePack/template @@ -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) " +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 + } +}