From 7f8e737b595beabaa3836ad472b6cb2cc185e5fc Mon Sep 17 00:00:00 2001 From: Denis Revin Date: Mon, 29 Aug 2016 14:03:39 +0400 Subject: [PATCH] New package: lua-cjson-2.1.0 Closes: #4684 [via git-merge-pr] --- srcpkgs/lua-cjson/template | 64 ++++++++++++++++++++++++++++++++++++++ srcpkgs/lua51-cjson | 1 + srcpkgs/lua52-cjson | 1 + 3 files changed, 66 insertions(+) create mode 100644 srcpkgs/lua-cjson/template create mode 120000 srcpkgs/lua51-cjson create mode 120000 srcpkgs/lua52-cjson 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