diff --git a/srcpkgs/lua-cjson/template b/srcpkgs/lua-cjson/template new file mode 100644 index 00000000000..b9617715c44 --- /dev/null +++ b/srcpkgs/lua-cjson/template @@ -0,0 +1,64 @@ +# Template file for 'lua-cjson' +pkgname=lua-cjson +version=2.1.0 +revision=1 +build_style=gnu-makefile +hostmakedepends="lua lua51 lua52" +makedepends="lua-devel lua51-devel lua52-devel" +depends="lua>=5.3" +_desc="JSON support for Lua" +short_desc="${_desc} (5.3)" +maintainer="Denis Revin " +license="MIT" +homepage="http://www.kyne.com.au/~mark/software/lua-cjson.php" +distfiles="http://www.kyne.com.au/~mark/software/download/${pkgname}-${version}.tar.gz" +checksum=51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778 + +post_extract() { + mkdir -p lua51 + mv * lua51 || true + cp -a lua51 lua52 + cp -a lua51 lua53 +} + +do_build() { + cd ${wrksrc}/lua51 + make + + cd ${wrksrc}/lua52 + make + + cd ${wrksrc}/lua53 + make +} + +do_install() { + cd ${wrksrc}/lua51 + vinstall cjson.so 755 usr/lib/lua/5.1 + + cd ${wrksrc}/lua52 + vinstall cjson.so 755 usr/lib/lua/5.2 + + cd ${wrksrc}/lua53 + vinstall cjson.so 755 usr/lib/lua/5.3 + vlicense LICENSE +} + +lua51-cjson_package() { + depends="lua51" + short_desc="${_desc} (5.1)" + pkg_install() { + vmove usr/lib/lua/5.1 + vlicense ${wrksrc}/lua51/LICENSE + } +} + +lua52-cjson_package() { + depends="lua52" + short_desc="${_desc} (5.2)" + pkg_install() { + vmove usr/lib/lua/5.2 + vlicense ${wrksrc}/lua52/LICENSE + } +} + diff --git a/srcpkgs/lua51-cjson b/srcpkgs/lua51-cjson new file mode 120000 index 00000000000..b379c087453 --- /dev/null +++ b/srcpkgs/lua51-cjson @@ -0,0 +1 @@ +lua-cjson \ No newline at end of file diff --git a/srcpkgs/lua52-cjson b/srcpkgs/lua52-cjson new file mode 120000 index 00000000000..b379c087453 --- /dev/null +++ b/srcpkgs/lua52-cjson @@ -0,0 +1 @@ +lua-cjson \ No newline at end of file