diff --git a/srcpkgs/lua51-vstruct b/srcpkgs/lua51-vstruct new file mode 120000 index 00000000000..f8ca1222a00 --- /dev/null +++ b/srcpkgs/lua51-vstruct @@ -0,0 +1 @@ +lua54-vstruct \ No newline at end of file diff --git a/srcpkgs/lua52-vstruct b/srcpkgs/lua52-vstruct new file mode 120000 index 00000000000..f8ca1222a00 --- /dev/null +++ b/srcpkgs/lua52-vstruct @@ -0,0 +1 @@ +lua54-vstruct \ No newline at end of file diff --git a/srcpkgs/lua53-vstruct b/srcpkgs/lua53-vstruct new file mode 120000 index 00000000000..f8ca1222a00 --- /dev/null +++ b/srcpkgs/lua53-vstruct @@ -0,0 +1 @@ +lua54-vstruct \ No newline at end of file diff --git a/srcpkgs/lua54-vstruct/template b/srcpkgs/lua54-vstruct/template new file mode 100644 index 00000000000..a1dae28be2f --- /dev/null +++ b/srcpkgs/lua54-vstruct/template @@ -0,0 +1,55 @@ +# Template file for 'lua54-vstruct' +pkgname=lua54-vstruct +version=2.2.0 +revision=1 +build_style=meta +hostmakedepends="luarocks-lua54" +depends="lua54" +short_desc="Lua library to manipulate binary data" +maintainer="Luciogi " +license="MIT" +homepage="https://github.com/ToxicFrog/vstruct" +distfiles="https://github.com/ToxicFrog/vstruct/archive/refs/tags/v${version}.tar.gz" +checksum=54ade004665b62b2253d403f3e468631caa486a45a2b873818e55097e7b679bf + +_lua_versions="lua5.1 lua5.2 lua5.3 lua5.4" +for _lua_version in $_lua_versions; do + hostmakedepends+=" ${_lua_version/./}" + makedepends+=" ${_lua_version/./}-devel" +done + +_rockname=${pkgname#lua54-} +_rocksrel=1 +_package() { + luarocks --lua-version="$1" --tree="${PKGDESTDIR}/usr/" \ + make --deps-mode=none --no-manifest "${_rockname}-${version}-${_rocksrel}.rockspec" +} + +do_install() { + _package 5.4 + vlicense COPYING +} + +lua53-vstruct_package() { + depends="lua53" + pkg_install() { + _package 5.3 + vlicense COPYING + } +} + +lua52-vstruct_package() { + depends="lua52" + pkg_install() { + _package 5.2 + vlicense COPYING + } +} + +lua51-vstruct_package() { + depends="lua51" + pkg_install() { + _package 5.1 + vlicense COPYING + } +}