lua-luadbi: add 5.4 support, properly version

This commit is contained in:
q66 2020-07-01 04:14:05 +02:00
parent 9820bd7f0e
commit cdc82f0d0f
5 changed files with 42 additions and 15 deletions

1
srcpkgs/lua-luadbi Symbolic link
View File

@ -0,0 +1 @@
lua54-luadbi

View File

@ -1 +1 @@
lua-luadbi
lua54-luadbi

View File

@ -1 +1 @@
lua-luadbi
lua54-luadbi

1
srcpkgs/lua53-luadbi Symbolic link
View File

@ -0,0 +1 @@
lua54-luadbi

View File

@ -1,17 +1,18 @@
# Template file for 'lua-luadbi'
pkgname=lua-luadbi
# Template file for 'lua54-luadbi'
pkgname=lua54-luadbi
version=0.5
revision=2
makedepends="lua-devel lua51-devel lua52-devel sqlite-devel postgresql-libs-devel libmysqlclient-devel"
revision=3
wrksrc="luadbi-${version}"
create_wrksrc="yes"
makedepends="lua51-devel lua52-devel lua53-devel lua54-devel sqlite-devel
postgresql-libs-devel libmysqlclient-devel"
_desc="Lua database interface library"
short_desc="${_desc} - Lua 5.3"
short_desc="${_desc} (5.4.x)"
maintainer="John Regan <john@jrjrtech.com>"
license="MIT"
homepage="https://code.google.com/archive/p/luadbi/"
distfiles="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/luadbi/luadbi.$version.tar.gz"
wrksrc="${pkgname#lua-}-${version}"
checksum=49116458dd80052536bf5d7e2b2a1f5a0fa42a671ce77f1cb7355ef7faeb331e
create_wrksrc="yes"
post_extract() {
cd ${wrksrc}
@ -19,6 +20,7 @@ post_extract() {
mv * lua51 || true
cp -a lua51 lua52
cp -a lua51 lua53
cp -a lua51 lua54
}
_common_cflags="-pedantic -Wall -O2 -shared -fpic -I${XBPS_CROSS_BASE}/usr/include/mysql -I${XBPS_CROSS_BASE}/usr/include/postgresql/server -I."
@ -37,6 +39,8 @@ do_build() {
cd ${wrksrc}/lua53
make CC="$CC" AR="$AR" RANLIB="$RANLIB" CFLAGS="${_common_cflags} -I${XBPS_CROSS_BASE}/usr/include/lua5.3" ${makejobs} free
cd ${wrksrc}/lua54
make CC="$CC" AR="$AR" RANLIB="$RANLIB" CFLAGS="${_common_cflags} -I${XBPS_CROSS_BASE}/usr/include/lua5.4" ${makejobs} free
}
do_install() {
@ -57,11 +61,26 @@ do_install() {
vinstall ${lib} 755 usr/lib/lua/5.3
done
vinstall DBI.lua 644 usr/share/lua/5.3/
cd ${wrksrc}/lua54
for lib in *.so; do
vinstall ${lib} 755 usr/lib/lua/5.4
done
vinstall DBI.lua 644 usr/share/lua/5.4/
vlicense COPYING
}
lua51-luadbi_package() {
short_desc="${_desc} (5.1.x)"
pkg_install() {
vmove usr/lib/lua/5.1
vmove usr/share/lua/5.1
vlicense ${wrksrc}/lua51/COPYING
}
}
lua52-luadbi_package() {
short_desc="${_desc} - Lua 5.2"
short_desc="${_desc} (5.2.x)"
pkg_install() {
vmove usr/lib/lua/5.2
vmove usr/share/lua/5.2
@ -69,11 +88,17 @@ lua52-luadbi_package() {
}
}
lua51-luadbi_package() {
short_desc="${_desc} - Lua 5.1"
lua53-luadbi_package() {
short_desc="${_desc} (5.3.x)"
pkg_install() {
vmove usr/lib/lua/5.1
vmove usr/share/lua/5.1
vlicense ${wrksrc}/lua51/COPYING
vmove usr/lib/lua/5.3
vmove usr/share/lua/5.3
vlicense ${wrksrc}/lua53/COPYING
}
}
lua-luadbi_package() {
depends="lua53-luadbi>=${version}_${revision}"
short_desc+="${_desc} (5.3.x) (transitional dummy package)"
build_style=meta
}