2016-08-29 10:03:39 +00:00
|
|
|
# Template file for 'lua-cjson'
|
|
|
|
pkgname=lua-cjson
|
|
|
|
version=2.1.0
|
|
|
|
revision=1
|
2017-05-08 17:04:55 +00:00
|
|
|
create_wrksrc=yes
|
2016-08-29 10:03:39 +00:00
|
|
|
hostmakedepends="lua lua51 lua52"
|
|
|
|
makedepends="lua-devel lua51-devel lua52-devel"
|
|
|
|
depends="lua>=5.3"
|
2017-05-08 17:04:55 +00:00
|
|
|
short_desc="JSON support for Lua"
|
2016-08-29 10:03:39 +00:00
|
|
|
maintainer="Denis Revin <denis.revin@gmail.com>"
|
|
|
|
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() {
|
2017-05-08 17:04:55 +00:00
|
|
|
mv "lua-cjson-${version}" lua51
|
2016-08-29 10:03:39 +00:00
|
|
|
cp -a lua51 lua52
|
|
|
|
cp -a lua51 lua53
|
|
|
|
}
|
|
|
|
do_build() {
|
2017-05-08 17:04:55 +00:00
|
|
|
for x in lua51 lua52 lua53; do
|
|
|
|
make -C "$x" \
|
|
|
|
CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
|
|
|
|
LUA_VERSION="5.${x#lua5}" USE_INTERNAL_FPCONV=1 \
|
|
|
|
LUA_INCLUDE_DIR="${XBPS_CROSS_BASE}/usr/include/lua5.${x#lua5}"
|
|
|
|
done
|
2016-08-29 10:03:39 +00:00
|
|
|
}
|
|
|
|
do_install() {
|
2017-05-08 17:04:55 +00:00
|
|
|
for x in lua51 lua52 lua53; do
|
|
|
|
vinstall "$x/cjson.so" 755 "usr/lib/lua/5.${x#lua5}"
|
|
|
|
done
|
|
|
|
vlicense lua53/LICENSE
|
2016-08-29 10:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
lua51-cjson_package() {
|
|
|
|
depends="lua51"
|
2017-05-08 17:04:55 +00:00
|
|
|
short_desc+=" (5.1)"
|
2016-08-29 10:03:39 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/lua/5.1
|
|
|
|
vlicense ${wrksrc}/lua51/LICENSE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
lua52-cjson_package() {
|
|
|
|
depends="lua52"
|
2017-05-08 17:04:55 +00:00
|
|
|
short_desc+=" (5.2)"
|
2016-08-29 10:03:39 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/lua/5.2
|
|
|
|
vlicense ${wrksrc}/lua52/LICENSE
|
|
|
|
}
|
|
|
|
}
|