summaryrefslogtreecommitdiff
path: root/databases/lua-lsqlite3
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-07-09 15:27:56 +0000
committernia <nia@pkgsrc.org>2020-07-09 15:27:56 +0000
commitedcfc1de1bd6894c9c3a196a6a6c575ba4843313 (patch)
treeefc9c1ed0c52a74068473d5a1dc7ce6400d8f68f /databases/lua-lsqlite3
parentbfb371f75421c527a844bccdedd99ee8df61f800 (diff)
downloadpkgsrc-edcfc1de1bd6894c9c3a196a6a6c575ba4843313.tar.gz
databases: Add lua-lsqlite3
lsqlite3 is a thin wrapper around the public domain SQLite3 database engine. The lsqlite3 module supports the creation and manipulation of SQLite3 databases. After a require('lsqlite3') the exported functions are called with prefix sqlite3. However, most sqlite3 functions are called via an object-oriented interface to either database or SQL statement objects.
Diffstat (limited to 'databases/lua-lsqlite3')
-rw-r--r--databases/lua-lsqlite3/DESCR8
-rw-r--r--databases/lua-lsqlite3/Makefile40
-rw-r--r--databases/lua-lsqlite3/PLIST12
-rw-r--r--databases/lua-lsqlite3/distinfo6
-rw-r--r--databases/lua-lsqlite3/files/Makefile12
5 files changed, 78 insertions, 0 deletions
diff --git a/databases/lua-lsqlite3/DESCR b/databases/lua-lsqlite3/DESCR
new file mode 100644
index 00000000000..f69a982d5a3
--- /dev/null
+++ b/databases/lua-lsqlite3/DESCR
@@ -0,0 +1,8 @@
+lsqlite3 is a thin wrapper around the public domain SQLite3 database engine.
+
+The lsqlite3 module supports the creation and manipulation of SQLite3
+databases.
+
+After a require('lsqlite3') the exported functions are called with prefix
+sqlite3. However, most sqlite3 functions are called via an object-oriented
+interface to either database or SQL statement objects.
diff --git a/databases/lua-lsqlite3/Makefile b/databases/lua-lsqlite3/Makefile
new file mode 100644
index 00000000000..306f03407e8
--- /dev/null
+++ b/databases/lua-lsqlite3/Makefile
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile,v 1.1 2020/07/09 15:27:56 nia Exp $
+
+DISTNAME= lsqlite3_fsl09y
+PKGNAME= ${LUA_PKGPREFIX}-lsqlite3-0.9.5
+CATEGORIES= databases lua
+MASTER_SITES= http://lua.sqlite.org/index.cgi/zip/
+EXTRACT_SUFX= .zip
+
+MAINTAINER= nia@NetBSD.org
+HOMEPAGE= http://lua.sqlite.org/index.cgi/index
+COMMENT= Binding for Lua to the SQLite3 database library
+LICENSE= mit
+
+INSTALLATION_DIRS+= ${LUA_CDIR} ${LUA_LDIR}
+INSTALLATION_DIRS+= ${LUA_DOCDIR}/examples
+
+pre-build:
+ # Don't use the internal copy of sqlite3
+ ${RM} -f ${WRKSRC}/sqlite3.h
+ # Copy our makefile into place.
+ ${CP} -f ${FILESDIR}/Makefile ${WRKSRC}/Makefile
+
+pre-install:
+ # For compatibility with the statically linked variant.
+ ${PRINTF} '%s\n' 'return require("lsqlite3")' > ${WRKSRC}/lsqlite3complete.lua
+
+do-install:
+ ${INSTALL_LIB} ${WRKSRC}/lsqlite3.so \
+ ${DESTDIR}${PREFIX}/${LUA_CDIR}/lsqlite3.so
+ ${INSTALL_LIB} ${WRKSRC}/lsqlite3complete.lua \
+ ${DESTDIR}${PREFIX}/${LUA_LDIR}/lsqlite3complete.lua
+ ${INSTALL_DATA} ${WRKSRC}/examples/*.lua \
+ ${DESTDIR}${PREFIX}/${LUA_DOCDIR}/examples
+
+do-test:
+ cd ${WRKSRC}/test && LUA_CPATH=${WRKSRC}/?.so ${LUA_INTERPRETER} test.lua
+
+.include "../../lang/lua/module.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/databases/lua-lsqlite3/PLIST b/databases/lua-lsqlite3/PLIST
new file mode 100644
index 00000000000..d11a2329d64
--- /dev/null
+++ b/databases/lua-lsqlite3/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1 2020/07/09 15:27:56 nia Exp $
+${LUA_CDIR}/lsqlite3.so
+${LUA_DOCDIR}/examples/aggregate.lua
+${LUA_DOCDIR}/examples/function.lua
+${LUA_DOCDIR}/examples/hooks_advanced.lua
+${LUA_DOCDIR}/examples/order.lua
+${LUA_DOCDIR}/examples/simple.lua
+${LUA_DOCDIR}/examples/smart.lua
+${LUA_DOCDIR}/examples/statement.lua
+${LUA_DOCDIR}/examples/tracing.lua
+${LUA_DOCDIR}/examples/update_hook.lua
+${LUA_LDIR}/lsqlite3complete.lua
diff --git a/databases/lua-lsqlite3/distinfo b/databases/lua-lsqlite3/distinfo
new file mode 100644
index 00000000000..5ead687d12d
--- /dev/null
+++ b/databases/lua-lsqlite3/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2020/07/09 15:27:56 nia Exp $
+
+SHA1 (lsqlite3_fsl09y.zip) = a87a288417b5ef9d7a951d9552b6685319c7f57f
+RMD160 (lsqlite3_fsl09y.zip) = 25ef4c8d249ce0d416e0e5ca123dae6f18f0052c
+SHA512 (lsqlite3_fsl09y.zip) = c978e31d3062c4f99662b6971156c61e9a08a9ab3e18122cf94d2beb63f2ab1921e936ad81f5d33aabbc25b589318656cb4903841b69752e54275254c408de88
+Size (lsqlite3_fsl09y.zip) = 2123295 bytes
diff --git a/databases/lua-lsqlite3/files/Makefile b/databases/lua-lsqlite3/files/Makefile
new file mode 100644
index 00000000000..7ba89717d1c
--- /dev/null
+++ b/databases/lua-lsqlite3/files/Makefile
@@ -0,0 +1,12 @@
+# $NetBSD: Makefile,v 1.1 2020/07/09 15:27:56 nia Exp $
+
+CFLAGS+= -fPIC -Wall
+LDFLAGS+= -shared
+
+all: lsqlite3.so
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+
+lsqlite3.so: lsqlite3.o
+ $(CC) $(LDFLAGS) -lsqlite3 -o $@ lsqlite3.o