[packages/sqliteodbc] - updated to 0.996 - updated misc patch - split into sqliteodbc/sqlite3odbc/[future] sqlite4odbc pac
qboosh
qboosh at pld-linux.org
Tue Feb 25 16:10:56 CET 2014
commit 24ccaefb0cfbcbb3a85cee6fb5cf110b99da6fed
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 25 16:13:22 2014 +0100
- updated to 0.996
- updated misc patch
- split into sqliteodbc/sqlite3odbc/[future] sqlite4odbc packages
sqliteodbc-misc.patch | 97 +++++++---------------
sqliteodbc.spec | 222 +++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 206 insertions(+), 113 deletions(-)
---
diff --git a/sqliteodbc.spec b/sqliteodbc.spec
index f8e824c..33527c1 100644
--- a/sqliteodbc.spec
+++ b/sqliteodbc.spec
@@ -1,31 +1,103 @@
-Summary: ODBC driver for SQLite
-Summary(pl.UTF-8): Sterownik ODBC dla SQLite
+# TODO: sqlite4 (when released/available in PLD)
+# NOTE: it looks for libsqlite.la, libsqlite3.la, libodbcinst.la/libiodbcinst.la in %{_libdir},
+# so these libtool files must be present to build this package without patching
+#
+# Conditional build:
+%bcond_with iodbc # use iODBC instead of unixODBC
+%bcond_without sqlite2 # SQLite 2.x driver
+%bcond_without sqlite3 # SQLite 3.x driver
+%bcond_with sqlite4 # SQLite 4.x driver
+#
+Summary: ODBC driver for SQLite 2.x
+Summary(pl.UTF-8): Sterownik ODBC dla SQLite 2.x
Name: sqliteodbc
-Version: 0.64
-Release: 0.1
+Version: 0.996
+Release: 1
License: BSD
Group: Libraries
Source0: http://www.ch-werner.de/sqliteodbc/%{name}-%{version}.tar.gz
-# Source0-md5: f2ebdac541838e6db0e897fd98c5f34e
+# Source0-md5: e115d07fbc17fa956aa6277c00d78e98
Patch0: %{name}-misc.patch
URL: http://www.ch-werner.de/sqliteodbc/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
-BuildRequires: sqlite-devel
-BuildRequires: sqlite3-devel
+%{?with_iodbc:BuildRequires: libiodbc-devel}
+%{?with_sqlite3:BuildRequires: libxml2-devel >= 2}
+%{?with_sqlite2:BuildRequires: sqlite-devel >= 2.8.0}
+%{?with_sqlite3:BuildRequires: sqlite3-devel >= 3}
+%{?with_sqlite4:BuildRequires: sqlite4-devel >= 4}
+%{!?with_iodbc:BuildRequires: unixODBC-devel}
+%{?with_sqlite3:BuildRequires: zlib-devel}
Requires(post): mktemp
+Requires(post): /usr/bin/odbcinst
+Requires: sqlite >= 2.8.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+# human-readable ODBC variant name
+%define ODBCvar %{?with_iodbc:iODBC}%{!?with_iodbc:unixODBC}
+
%description
-ODBC driver for SQLite interfacing SQLite 2.x and/or 3.x using
-unixODBC or iODBC. See http://www.sqlite.org/ for a description of
-SQLite, http://www.unixodbc.org/ for a description of unixODBC.
+SQLiteODBC is an ODBC driver for SQLite interfacing SQLite 2.x and/or
+3.x using unixODBC or iODBC. See <http://www.sqlite.org/> for a
+description of SQLite, <http://www.unixodbc.org/> for a description of
+unixODBC.
+
+This package contains SQLite 2.x driver for %{ODBCvar}.
%description -l pl.UTF-8
-Sterownik ODBC dla SQLite współpracujący z SQLite 2.x i/lub 3.x przy
-użyciu unixODBC lub iODBC. Opis SQLite można znaleźć pod adresem
-<http://www.sqlite.org/, a unixODBC pod http://www.unixodbc.org/>.
+SQLiteODBC to sterownik ODBC dla SQLite współpracujący z SQLite 2.x
+i/lub 3.x wykorzystujący unixODBC lub iODBC. Opis SQLite można znaleźć
+pod adresem <http://www.sqlite.org/>, a unixODBC pod
+<http://www.unixodbc.org/>.
+
+Ten pakiet zawiera sterownik SQLite 2.x dla %{ODBCvar}.
+
+%package -n sqlite3odbc
+Summary: ODBC driver for SQLite 3.x
+Summary(pl.UTF-8): Sterownik ODBC dla SQLite 3.x
+Group: Libraries
+Requires(post): mktemp
+Requires(post): /usr/bin/odbcinst
+
+%description -n sqlite3odbc
+SQLiteODBC is an ODBC driver for SQLite interfacing SQLite 2.x and/or
+3.x using unixODBC or iODBC. See <http://www.sqlite.org/> for a
+description of SQLite, <http://www.unixodbc.org/> for a description of
+unixODBC.
+
+This package contains SQLite 3.x driver for %{ODBCvar}.
+
+%description -n sqlite3odbc -l pl.UTF-8
+SQLiteODBC to sterownik ODBC dla SQLite współpracujący z SQLite 2.x
+i/lub 3.x wykorzystujący unixODBC lub iODBC. Opis SQLite można znaleźć
+pod adresem <http://www.sqlite.org/>, a unixODBC pod
+<http://www.unixodbc.org/>.
+
+Ten pakiet zawiera sterownik SQLite 3.x dla %{ODBCvar}.
+
+%package -n sqlite4odbc
+Summary: ODBC driver for SQLite 4.x
+Summary(pl.UTF-8): Sterownik ODBC dla SQLite 4.x
+Group: Libraries
+Requires(post): mktemp
+Requires(post): /usr/bin/odbcinst
+
+%description -n sqlite4odbc
+SQLiteODBC is an ODBC driver for SQLite interfacing SQLite 2.x, 3.x
+and/or 4.x using unixODBC or iODBC. See <http://www.sqlite.org/> for a
+description of SQLite, <http://www.unixodbc.org/> for a description of
+unixODBC.
+
+This package contains SQLite 4.x driver for %{ODBCvar}.
+
+%description -n sqlite4odbc -l pl.UTF-8
+SQLiteODBC to sterownik ODBC dla SQLite współpracujący z SQLite 2.x,
+3.x i/lub 4.x wykorzystujący unixODBC lub iODBC. Opis SQLite można
+znaleźć pod adresem <http://www.sqlite.org/>, a unixODBC pod
+<http://www.unixodbc.org/>.
+
+Ten pakiet zawiera sterownik SQLite 4.x dla %{ODBCvar}.
%prep
%setup -q
@@ -35,7 +107,8 @@ użyciu unixODBC lub iODBC. Opis SQLite można znaleźć pod adresem
%{__libtoolize}
%{__aclocal}
%{__autoconf}
-%configure
+%configure \
+ --disable-static
%{__make}
%install
@@ -44,69 +117,124 @@ rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-#rm -f $RPM_BUILD_ROOT%{_libdir}/libsqliteodbc*.{a,la}
-#rm -f $RPM_BUILD_ROOT%{_libdir}/libsqlite3odbc*.{a,la}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
%clean
rm -rf $RPM_BUILD_ROOT
%post
-if [ -x /usr/bin/odbcinst ] ; then
- INST=`mktemp /tmp/sqliteinstXXXXXX`
- if [ -r %{_libdir}/libsqliteodbc.so ] ; then
- cat > $INST << 'EOD'
+INST=`mktemp /tmp/sqliteinstXXXXXX`
+cat > $INST << 'EOD'
[SQLITE]
Description=SQLite ODBC 2.X
Driver=%{_libdir}/libsqliteodbc.so
Setup=%{_libdir}/libsqliteodbc.so
FileUsage=1
EOD
- /usr/bin/odbcinst -q -d -n SQLITE | grep '^\[SQLITE\]' >/dev/null || {
- /usr/bin/odbcinst -i -d -n SQLITE -f $INST || true
- }
- cat > $INST << 'EOD'
+/usr/bin/odbcinst -q -d -n SQLITE | grep '^\[SQLITE\]' >/dev/null || {
+ /usr/bin/odbcinst -i -d -n SQLITE -f $INST || true
+}
+cat > $INST << 'EOD'
[SQLite Datasource]
Driver=SQLITE
EOD
- /usr/bin/odbcinst -q -s -n "SQLite Datasource" | \
- grep '^\[SQLite Datasource\]' >/dev/null || {
- /usr/bin/odbcinst -i -l -s -n "SQLite Datasource" -f $INST || true
- }
- fi
- if [ -r %{_libdir}/libsqlite3odbc.so ] ; then
- cat > $INST << 'EOD'
+/usr/bin/odbcinst -q -s -n "SQLite Datasource" | grep '^\[SQLite Datasource\]' >/dev/null || {
+ /usr/bin/odbcinst -i -l -s -n "SQLite Datasource" -f $INST || true
+}
+rm -f $INST
+
+%preun
+if [ "$1" = "0" ] ; then
+ test -x /usr/bin/odbcinst && {
+ /usr/bin/odbcinst -u -d -n SQLITE || true
+ /usr/bin/odbcinst -u -l -s -n "SQLite Datasource" || true
+ }
+fi
+
+%post -n sqlite3odbc
+cat > $INST << 'EOD'
[SQLITE3]
Description=SQLite ODBC 3.X
Driver=%{_libdir}/libsqlite3odbc.so
Setup=%{_libdir}/libsqlite3odbc.so
FileUsage=1
EOD
- /usr/bin/odbcinst -q -d -n SQLITE3 | grep '^\[SQLITE3\]' >/dev/null || {
- /usr/bin/odbcinst -i -d -n SQLITE3 -f $INST || true
- }
- cat > $INST << 'EOD'
+/usr/bin/odbcinst -q -d -n SQLITE3 | grep '^\[SQLITE3\]' >/dev/null || {
+ /usr/bin/odbcinst -i -d -n SQLITE3 -f $INST || true
+}
+cat > $INST << 'EOD'
[SQLite3 Datasource]
Driver=SQLITE3
EOD
- /usr/bin/odbcinst -q -s -n "SQLite3 Datasource" | \
- grep '^\[SQLite3 Datasource\]' >/dev/null || {
- /usr/bin/odbcinst -i -l -s -n "SQLite3 Datasource" -f $INST || true
- }
- fi
- rm -f $INST
-fi
+/usr/bin/odbcinst -q -s -n "SQLite3 Datasource" | grep '^\[SQLite3 Datasource\]' >/dev/null || {
+ /usr/bin/odbcinst -i -l -s -n "SQLite3 Datasource" -f $INST || true
+}
+rm -f $INST
-%preun
+%preun -n sqlite3odbc
if [ "$1" = "0" ] ; then
test -x /usr/bin/odbcinst && {
- /usr/bin/odbcinst -u -d -n SQLITE || true
- /usr/bin/odbcinst -u -l -s -n "SQLite Datasource" || true
/usr/bin/odbcinst -u -d -n SQLITE3 || true
/usr/bin/odbcinst -u -l -s -n "SQLite3 Datasource" || true
}
fi
+%post -n sqlite4odbc
+cat > $INST << 'EOD'
+[SQLITE4]
+Description=SQLite ODBC 4.X
+Driver=%{_libdir}/libsqlite4odbc.so
+Setup=%{_libdir}/libsqlite4odbc.so
+FileUsage=1
+EOD
+/usr/bin/odbcinst -q -d -n SQLITE4 | grep '^\[SQLITE4\]' >/dev/null || {
+ /usr/bin/odbcinst -i -d -n SQLITE4 -f $INST || true
+}
+cat > $INST << 'EOD'
+[SQLite4 Datasource]
+Driver=SQLITE4
+EOD
+/usr/bin/odbcinst -q -s -n "SQLite4 Datasource" | grep '^\[SQLite4 Datasource\]' >/dev/null || {
+ /usr/bin/odbcinst -i -l -s -n "SQLite4 Datasource" -f $INST || true
+}
+rm -f $INST
+
+%preun -n sqlite4odbc
+if [ "$1" = "0" ] ; then
+ test -x /usr/bin/odbcinst && {
+ /usr/bin/odbcinst -u -d -n SQLITE4 || true
+ /usr/bin/odbcinst -u -l -s -n "SQLite4 Datasource" || true
+ }
+fi
+
+%if %{with sqlite2}
%files
%defattr(644,root,root,755)
-%doc README license.terms ChangeLog
-%attr(755,root,root) %{_libdir}/libsqlite*.so*
+%doc ChangeLog README license.terms
+%attr(755,root,root) %{_libdir}/libsqliteodbc-%{version}.so
+%attr(755,root,root) %{_libdir}/libsqliteodbc.so
+%endif
+
+%if %{with sqlite3}
+%files -n sqlite3odbc
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsqlite3odbc-%{version}.so
+%attr(755,root,root) %{_libdir}/libsqlite3odbc.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_blobtoxy-%{version}.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_blobtoxy.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_csvtable-%{version}.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_csvtable.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_impexp-%{version}.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_impexp.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_xpath-%{version}.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_xpath.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_zipfile-%{version}.so
+%attr(755,root,root) %{_libdir}/libsqlite3_mod_zipfile.so
+%endif
+
+%if %{with sqlite4}
+%files -n sqlite4odbc
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsqlite4odbc-%{version}.so
+%attr(755,root,root) %{_libdir}/libsqlite4odbc.so
+%endif
diff --git a/sqliteodbc-misc.patch b/sqliteodbc-misc.patch
index 177fd65..9ea1e81 100644
--- a/sqliteodbc-misc.patch
+++ b/sqliteodbc-misc.patch
@@ -1,67 +1,32 @@
-diff -Nurb sqliteodbc-0.64.orig/configure.in sqliteodbc-0.64.new/configure.in
---- sqliteodbc-0.64.orig/configure.in 2004-07-08 09:30:56.000000000 +0200
-+++ sqliteodbc-0.64.new/configure.in 2005-02-16 20:46:30.240025840 +0100
-@@ -78,7 +78,7 @@
- AC_MSG_WARN(SQLite library too old, need 2.8.0 or later)
- else
- LIB_TARGETS="$LIB_TARGETS libsqliteodbc.la"
-- INST_TARGETS="$INST_TARGETS install-2"
-+ INST_TARGETS="$INST_TARGETS install-1 install-2"
- fi
-
- ##########
-diff -Nurb sqliteodbc-0.64.orig/Makefile.in sqliteodbc-0.64.new/Makefile.in
---- sqliteodbc-0.64.orig/Makefile.in 2004-07-08 09:34:26.000000000 +0200
-+++ sqliteodbc-0.64.new/Makefile.in 2005-02-16 20:52:25.899957312 +0100
-@@ -1,6 +1,10 @@
- # Makefile template for SQLite ODBC Driver
-
- prefix = @prefix@
-+bindir = @bindir@
-+libdir = @libdir@
-+includedir = @includedir@
-+DESTDIR =
- CC = @CC@
- INSTALL = @INSTALL@
- LIBTOOL = ./libtool
-@@ -22,28 +26,32 @@
- all: @LIB_TARGETS@
-
- libsqliteodbc.la: sqliteodbc.lo
-- $(LIBTOOL) $(CC) $(CFLAGS) -o libsqliteodbc.la \
-- sqliteodbc.lo -rpath $(prefix)/lib $(SQLITE_LIB) \
-+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libsqliteodbc.la \
-+ sqliteodbc.lo -rpath $(libdir) $(SQLITE_LIB) \
- $(ODBC_LIB) -release $(VER_INFO)
-
- libsqlite3odbc.la: sqlite3odbc.lo
-- $(LIBTOOL) $(CC) $(CFLAGS) -o libsqlite3odbc.la \
-- sqlite3odbc.lo -rpath $(prefix)/lib $(SQLITE3_LIB) \
-+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libsqlite3odbc.la \
-+ sqlite3odbc.lo -rpath $(libdir) $(SQLITE3_LIB) \
- $(ODBC_LIB) -release $(VER_INFO)
-
- sqliteodbc.lo: sqliteodbc.c sqliteodbc.h
-- $(LIBTOOL) $(CC) $(CFLAGS) -c -I$(SQLITE_INC) $(ODBC_FLAGS) \
-+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -I$(SQLITE_INC) $(ODBC_FLAGS) \
- $(SQLITE_FLAGS) sqliteodbc.c
-
- sqlite3odbc.lo: sqlite3odbc.c sqlite3odbc.h
-- $(LIBTOOL) $(CC) $(CFLAGS) -c -I$(SQLITE3_INC) $(ODBC_FLAGS) \
-+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -I$(SQLITE3_INC) $(ODBC_FLAGS) \
- $(SQLITE3_FLAGS) sqlite3odbc.c
-+install-1:
-+ install -d $(DESTDIR)$(libdir)
-
- install-2: libsqliteodbc.la
-- $(LIBTOOL) $(INSTALL) libsqliteodbc.la $(prefix)/lib
-+ $(LIBTOOL) --mode=install $(INSTALL) libsqliteodbc.la $(DESTDIR)$(libdir)
-+ $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
-
- install-3: libsqlite3odbc.la
-- $(LIBTOOL) $(INSTALL) libsqlite3odbc.la $(prefix)/lib
-+ $(LIBTOOL) --mode=install $(INSTALL) libsqlite3odbc.la $(DESTDIR)$(libdir)
-+ $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
-
- install: @INST_TARGETS@
+--- sqliteodbc-0.996/Makefile.in.orig 2014-02-25 12:26:51.932493643 +0100
++++ sqliteodbc-0.996/Makefile.in 2014-02-25 15:07:30.478755818 +0100
+@@ -134,7 +134,10 @@
+ -I$(SQLITE3_INC) \
+ $(SQLITE3_FLAGS) $(XML2_FLAGS) xpath.c
+
+-install-2: libsqliteodbc.la
++$(DESTDIR)$(drvdir):
++ install -d $(DESTDIR)$(drvdir)
++
++install-2: libsqliteodbc.la $(DESTDIR)$(drvdir)
+ $(LIBTOOL) --mode=install $(INSTALL) \
+ libsqliteodbc.la $(DESTDIR)$(drvdir)
+
+@@ -150,7 +153,7 @@
+ $(RM) $(DESTDIR)$(drvdir)/libsqliteodbc.la
+
+ install-3: libsqlite3odbc.la @EXT_BLOBTOXY@ @EXT_IMPEXP@ \
+- @EXT_CSVTABLE@ @EXT_ZIPFILE@ @EXT_XPATH@
++ @EXT_CSVTABLE@ @EXT_ZIPFILE@ @EXT_XPATH@ $(DESTDIR)$(drvdir)
+ $(LIBTOOL) --mode=install $(INSTALL) \
+ libsqlite3odbc.la $(DESTDIR)$(drvdir)
+ test -z "@EXT_BLOBTOXY@" || \
+@@ -196,7 +199,7 @@
+ sh drvdsnuninst.sh SQLITE3 "SQLite3 Datasource"
+
+
+-install-4: libsqlite4odbc.la
++install-4: libsqlite4odbc.la $(DESTDIR)$(drvdir)
+ $(LIBTOOL) --mode=install $(INSTALL) \
+ libsqlite4odbc.la $(DESTDIR)$(drvdir)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/sqliteodbc.git/commitdiff/24ccaefb0cfbcbb3a85cee6fb5cf110b99da6fed
More information about the pld-cvs-commit
mailing list