summaryrefslogtreecommitdiff
path: root/libraries/sqliteodbc
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/sqliteodbc')
-rw-r--r--libraries/sqliteodbc/README13
-rw-r--r--libraries/sqliteodbc/README.SLACKWARE46
-rw-r--r--libraries/sqliteodbc/fix-destdir-install.patch60
-rw-r--r--libraries/sqliteodbc/slack-desc19
-rw-r--r--libraries/sqliteodbc/sqliteodbc.SlackBuild113
-rw-r--r--libraries/sqliteodbc/sqliteodbc.info10
6 files changed, 261 insertions, 0 deletions
diff --git a/libraries/sqliteodbc/README b/libraries/sqliteodbc/README
new file mode 100644
index 0000000000..173fc54fe5
--- /dev/null
+++ b/libraries/sqliteodbc/README
@@ -0,0 +1,13 @@
+The SQLite Database Engine provides a lightweight C library to access
+database files using a large subset of SQL92 without the overhead of
+RDBMS server processes. In order to use that functionality as a
+desktop database, the SQLite library is wrapped into an ODBC driver.
+
+To install the library documentation pass DOC=yes to the slackbuild as
+
+ DOC=yes ./sqliteodbc.SlackBuild
+
+unixODBC is an optional dependency and can be used in place of
+libiodbc in Slackware.
+
+See README.SLACKWARE for post-install information.
diff --git a/libraries/sqliteodbc/README.SLACKWARE b/libraries/sqliteodbc/README.SLACKWARE
new file mode 100644
index 0000000000..c7e3755681
--- /dev/null
+++ b/libraries/sqliteodbc/README.SLACKWARE
@@ -0,0 +1,46 @@
+To setup a SQLite data source using libiodbc do the following steps:
+
+1. Add the driver to /etc/odbcinst.ini:
+
+ [ODBC Drivers]
+ SQLite3=Installed
+
+ [SQLite3]
+ Description=SQLite3 ODBC Driver
+ Driver=/usr/lib/libsqlite3odbc.so
+ Setup=/usr/lib/libsqlite3odbc.so
+ Threading=2
+
+2. Add a DSN to your private ~/.odbc.ini or the system /etc/odbc.ini
+ file:
+
+ [ODBC Data Sources]
+ mysqlitedb=SQLite3
+
+ [mysqlitedb]
+ Driver=/usr/lib/libsqliteodbc.so
+ Description=My SQLite test database
+ Database=/home/johndoe/databases/mytest.db
+ # optional lock timeout in milliseconds
+ Timeout=2000
+
+
+Alternatively, to setup a SQLite data source using unixODBC:
+
+1. Add the driver to /etc/odbcinst.ini:
+
+ [SQLite3]
+ Description=SQLite3 ODBC Driver
+ Driver=/usr/lib/libsqlite3odbc.so
+ Setup=/usr/lib/libsqlite3odbc.so
+ Threading=2
+
+2. Add a DSN to your private ~/.odbc.ini or the system /etc/odbc.ini
+ file:
+
+ [mysqlitedb]
+ Description=My SQLite test database
+ Driver=SQLite3
+ Database=/home/johndoe/databases/mytest.db
+ # optional lock timeout in milliseconds
+ Timeout=2000
diff --git a/libraries/sqliteodbc/fix-destdir-install.patch b/libraries/sqliteodbc/fix-destdir-install.patch
new file mode 100644
index 0000000000..373997c04f
--- /dev/null
+++ b/libraries/sqliteodbc/fix-destdir-install.patch
@@ -0,0 +1,60 @@
+Index: sqliteodbc-0.9996/Makefile.in
+===================================================================
+--- sqliteodbc-0.9996.orig/Makefile.in
++++ sqliteodbc-0.9996/Makefile.in
+@@ -5,7 +5,7 @@ exec_prefix = @exec_prefix@
+ libdir = @libdir@
+ drvdir = $(libdir)@DRVDIR@
+ CC = @CC@
+-INSTALL = @INSTALL@
++INSTALL = ./install-sh
+ LIBTOOL = ./libtool
+ CFLAGS= @CFLAGS@ -DDRIVER_VER_INFO=\"@VER_INFO@\" @SQLITE3_A10N_FLAGS@
+ SQLITE_INC = @SQLITE_INC@
+@@ -138,7 +138,7 @@ xpath.lo: xpath.c
+
+ install-2: libsqliteodbc.la
+ $(LIBTOOL) --mode=install $(INSTALL) \
+- libsqliteodbc.la $(DESTDIR)$(drvdir)
++ libsqliteodbc.la $(DESTDIR)$(drvdir)/libsqliteodbc.la
+
+ drvinst-2: install-2
+ sh drvdsninst.sh SQLITE "SQLite Datasource" \
+@@ -154,22 +154,22 @@ uninstall-2:
+ install-3: libsqlite3odbc.la @EXT_BLOBTOXY@ @EXT_IMPEXP@ \
+ @EXT_CSVTABLE@ @EXT_ZIPFILE@ @EXT_XPATH@
+ $(LIBTOOL) --mode=install $(INSTALL) \
+- libsqlite3odbc.la $(DESTDIR)$(drvdir)
++ libsqlite3odbc.la $(DESTDIR)$(drvdir)/libsqlite3odbc.la
+ test -z "@EXT_BLOBTOXY@" || \
+ $(LIBTOOL) --mode=install $(INSTALL) \
+- @EXT_BLOBTOXY@ $(DESTDIR)$(drvdir)
++ @EXT_BLOBTOXY@ $(DESTDIR)$(drvdir)/@EXT_BLOBTOXY@
+ test -z "@EXT_IMPEXP@" || \
+ $(LIBTOOL) --mode=install $(INSTALL) \
+- @EXT_IMPEXP@ $(DESTDIR)$(drvdir)
++ @EXT_IMPEXP@ $(DESTDIR)$(drvdir)/@EXT_IMPEXP@
+ test -z "@EXT_CSVTABLE@" || \
+ $(LIBTOOL) --mode=install $(INSTALL) \
+- @EXT_CSVTABLE@ $(DESTDIR)$(drvdir)
++ @EXT_CSVTABLE@ $(DESTDIR)$(drvdir)/@EXT_CSVTABLE@
+ test -z "@EXT_ZIPFILE@" || \
+ $(LIBTOOL) --mode=install $(INSTALL) \
+- @EXT_ZIPFILE@ $(DESTDIR)$(drvdir)
++ @EXT_ZIPFILE@ $(DESTDIR)$(drvdir)/@EXT_ZIPFILE@
+ test -z "@EXT_XPATH@" || \
+ $(LIBTOOL) --mode=install $(INSTALL) \
+- @EXT_XPATH@ $(DESTDIR)$(drvdir)
++ @EXT_XPATH@ $(DESTDIR)$(drvdir)/@EXT_XPATH@
+
+ uninstall-3:
+ $(LIBTOOL) --mode=uninstall \
+@@ -200,7 +200,7 @@ drvuninst-3: uninstall-3
+
+ install-4: libsqlite4odbc.la
+ $(LIBTOOL) --mode=install $(INSTALL) \
+- libsqlite4odbc.la $(DESTDIR)$(drvdir)
++ libsqlite4odbc.la $(DESTDIR)$(drvdir)/libsqlite4odbc.la
+
+ uninstall-4:
+ $(LIBTOOL) --mode=uninstall \
diff --git a/libraries/sqliteodbc/slack-desc b/libraries/sqliteodbc/slack-desc
new file mode 100644
index 0000000000..e218b3e319
--- /dev/null
+++ b/libraries/sqliteodbc/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+sqliteodbc: sqliteodbc (SQLite ODBC Driver)
+sqliteodbc:
+sqliteodbc: The SQLite Database Engine provides a lightweight C library to access
+sqliteodbc: database files using a large subset of SQL92 without the overhead of
+sqliteodbc: RDBMS server processes. In order to use that functionality as a
+sqliteodbc: desktop database, the SQLite library is wrapped into an ODBC driver.
+sqliteodbc:
+sqliteodbc: Homepage: http://www.ch-werner.de/sqliteodbc/
+sqliteodbc:
+sqliteodbc:
+sqliteodbc:
diff --git a/libraries/sqliteodbc/sqliteodbc.SlackBuild b/libraries/sqliteodbc/sqliteodbc.SlackBuild
new file mode 100644
index 0000000000..c0162bfaed
--- /dev/null
+++ b/libraries/sqliteodbc/sqliteodbc.SlackBuild
@@ -0,0 +1,113 @@
+#!/bin/sh
+
+# Slackware build script for sqliteodbc
+
+# Copyright 2018 Jason Graham <jgraham@compukix.net>, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=sqliteodbc
+VERSION=${VERSION:-0.9996}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+DOC=${DOC:-no}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+
+patch -p1 < $CWD/fix-destdir-install.patch
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --includedir=/usr/include \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+
+cp -a \
+ ChangeLog README VERSION license.terms \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+
+gzip -9 $PKG/usr/doc/$PRGNAM-$VERSION/ChangeLog
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+if [ "${DOC}" = "yes" ]; then
+ make doxy
+ cp -a html $PKG/usr/doc/$PRGNAM-$VERSION/
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/libraries/sqliteodbc/sqliteodbc.info b/libraries/sqliteodbc/sqliteodbc.info
new file mode 100644
index 0000000000..555fefaa05
--- /dev/null
+++ b/libraries/sqliteodbc/sqliteodbc.info
@@ -0,0 +1,10 @@
+PRGNAM="sqliteodbc"
+VERSION="0.9996"
+HOMEPAGE="http://www.ch-werner.de/sqliteodbc/"
+DOWNLOAD="http://www.ch-werner.de/sqliteodbc/sqliteodbc-0.9996.tar.gz"
+MD5SUM="703e298a7232e49be1ddf26769c71211"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Jason Graham"
+EMAIL="jgraha8@gmail.com"