From e7a576183f71670d2ca4a0aab77a241719c70441 Mon Sep 17 00:00:00 2001 From: John Regan Date: Sun, 10 Jan 2016 13:54:51 -0600 Subject: [PATCH] New package: lua-luadbi-0.5 --- srcpkgs/lua-luadbi/template | 79 +++++++++++++++++++++++++++++++++++++ srcpkgs/lua51-luadbi | 1 + srcpkgs/lua52-luadbi | 1 + 3 files changed, 81 insertions(+) create mode 100644 srcpkgs/lua-luadbi/template create mode 120000 srcpkgs/lua51-luadbi create mode 120000 srcpkgs/lua52-luadbi diff --git a/srcpkgs/lua-luadbi/template b/srcpkgs/lua-luadbi/template new file mode 100644 index 00000000000..5547804487d --- /dev/null +++ b/srcpkgs/lua-luadbi/template @@ -0,0 +1,79 @@ +# Template file for 'lua-luadbi' +pkgname=lua-luadbi +version=0.5 +revision=1 +makedepends="lua-devel lua51-devel lua52-devel sqlite-devel postgresql-libs-devel libmysqlclient-devel" +_desc="Lua database interface library" +short_desc="${_desc} - Lua 5.3" +maintainer="John Regan " +license="MIT" +homepage="http://luadbi.googlecode.com/" +distfiles="${homepage}files/luadbi.$version.tar.gz" +wrksrc="${pkgname#lua-}-${version}" +checksum=49116458dd80052536bf5d7e2b2a1f5a0fa42a671ce77f1cb7355ef7faeb331e +create_wrksrc="yes" + +post_extract() { + cd ${wrksrc} + mkdir -p lua51 + mv * lua51 || true + cp -a lua51 lua52 + cp -a lua51 lua53 +} + +_common_cflags="-pedantic -Wall -O2 -shared -fpic -I${XBPS_CROSS_BASE}/usr/include/mysql -I${XBPS_CROSS_BASE}/usr/include/postgresql/server -I." + +if [[ -n "${CROSS_BUILD}" ]]; then + _common_cflags+=" -I${XBPS_CROSS_BASE}/usr/include" +fi + +do_build() { + cd ${wrksrc}/lua51 + make CC="$CC" AR="$AR" RANLIB="$RANLIB" CFLAGS="${_common_cflags} -I${XBPS_CROSS_BASE}/usr/include/lua5.1" ${makejobs} free + + cd ${wrksrc}/lua52 + make CC="$CC" AR="$AR" RANLIB="$RANLIB" CFLAGS="${_common_cflags} -I${XBPS_CROSS_BASE}/usr/include/lua5.2" ${makejobs} free + + cd ${wrksrc}/lua53 + make CC="$CC" AR="$AR" RANLIB="$RANLIB" CFLAGS="${_common_cflags} -I${XBPS_CROSS_BASE}/usr/include/lua5.3" ${makejobs} free + +} + +do_install() { + cd ${wrksrc}/lua51 + for lib in *.so; do + vinstall ${lib} 755 usr/lib/lua/5.1 + done + vinstall DBI.lua 644 usr/share/lua/5.1/ + + cd ${wrksrc}/lua52 + for lib in *.so; do + vinstall ${lib} 755 usr/lib/lua/5.2 + done + vinstall DBI.lua 644 usr/share/lua/5.2/ + + cd ${wrksrc}/lua53 + for lib in *.so; do + vinstall ${lib} 755 usr/lib/lua/5.3 + done + vinstall DBI.lua 644 usr/share/lua/5.3/ + vlicense COPYING +} + +lua52-luadbi_package() { + short_desc="${_desc} - Lua 5.2" + pkg_install() { + vmove usr/lib/lua/5.2 + vmove usr/share/lua/5.2 + vlicense ${wrksrc}/lua52/COPYING + } +} + +lua51-luadbi_package() { + short_desc="${_desc} - Lua 5.1" + pkg_install() { + vmove usr/lib/lua/5.1 + vmove usr/share/lua/5.1 + vlicense ${wrksrc}/lua51/COPYING + } +} diff --git a/srcpkgs/lua51-luadbi b/srcpkgs/lua51-luadbi new file mode 120000 index 00000000000..7804b6f228e --- /dev/null +++ b/srcpkgs/lua51-luadbi @@ -0,0 +1 @@ +lua-luadbi \ No newline at end of file diff --git a/srcpkgs/lua52-luadbi b/srcpkgs/lua52-luadbi new file mode 120000 index 00000000000..7804b6f228e --- /dev/null +++ b/srcpkgs/lua52-luadbi @@ -0,0 +1 @@ +lua-luadbi \ No newline at end of file