diff --git a/srcpkgs/lua51-unbound b/srcpkgs/lua51-unbound new file mode 120000 index 00000000000..e7bb715780e --- /dev/null +++ b/srcpkgs/lua51-unbound @@ -0,0 +1 @@ +lua54-unbound \ No newline at end of file diff --git a/srcpkgs/lua52-unbound b/srcpkgs/lua52-unbound new file mode 120000 index 00000000000..e7bb715780e --- /dev/null +++ b/srcpkgs/lua52-unbound @@ -0,0 +1 @@ +lua54-unbound \ No newline at end of file diff --git a/srcpkgs/lua53-unbound b/srcpkgs/lua53-unbound new file mode 120000 index 00000000000..e7bb715780e --- /dev/null +++ b/srcpkgs/lua53-unbound @@ -0,0 +1 @@ +lua54-unbound \ No newline at end of file diff --git a/srcpkgs/lua54-unbound/template b/srcpkgs/lua54-unbound/template new file mode 100644 index 00000000000..f8b1f3853dd --- /dev/null +++ b/srcpkgs/lua54-unbound/template @@ -0,0 +1,74 @@ +# Template file for 'lua54-unbound' +pkgname=lua54-unbound +version=1.0.0 +revision=1 +hostmakedepends="pkg-config" +makedepends="unbound-devel" +depends="lua54" +_desc="Binding to libunbound for Lua" +short_desc="${_desc} (5.4.x)" +maintainer="Luca Matei Pintilie <luca@lucamatei.com>" +license="MIT" +homepage="https://www.zash.se/luaunbound.html" +distfiles="https://code.zash.se/dl/luaunbound/luaunbound-${version}.tar.gz" +checksum=6de45aa64c21cf0ecbccb734b7c1eda8873a6135bbe142fbf353f772a90750d3 + +_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 + +post_extract() { + mkdir -p lua51 + mv * lua51 || true + cp -a lua51 lua52 + cp -a lua51 lua53 + cp -a lua51 lua54 +} + +do_build() { + for _lua_version in $_lua_versions; do + cd "${wrksrc}/${_lua_version/./}" + make \ + LD="$CC" \ + CC="$CC" \ + LUA_PC="${_lua_version}" \ + ${makejobs} + done +} + +do_install() { + for _lua_version in $_lua_versions; do + cd "${wrksrc}/${_lua_version/./}" + vinstall lunbound.so 755 usr/lib/lua/${_lua_version#lua}/ + done + vlicense LICENSE +} + +lua51-unbound_package() { + depends="lua51" + short_desc="${_desc} (5.1.x)" + pkg_install() { + vmove usr/lib/lua/5.1 + vlicense ${wrksrc}/lua51/LICENSE + } +} + +lua52-unbound_package() { + depends="lua52" + short_desc="${_desc} (5.2.x)" + pkg_install() { + vmove usr/lib/lua/5.2 + vlicense ${wrksrc}/lua52/LICENSE + } +} + +lua53-unbound_package() { + depends="lua53" + short_desc="${_desc} (5.3.x)" + pkg_install() { + vmove usr/lib/lua/5.3 + vlicense ${wrksrc}/lua53/LICENSE + } +} diff --git a/srcpkgs/lua54-unbound/update b/srcpkgs/lua54-unbound/update new file mode 100644 index 00000000000..f8c8a1c04d6 --- /dev/null +++ b/srcpkgs/lua54-unbound/update @@ -0,0 +1 @@ +pkgname=luaunbound