[packages/libsqlora8] - updated to 2.3.3 - added format patch - allow build with oracle-instantclient

qboosh qboosh at pld-linux.org
Mon Dec 18 21:12:13 CET 2017


commit 551d69023ed320c6f55a74ac1eef6efcbf4b1dac
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Dec 18 21:13:33 2017 +0100

    - updated to 2.3.3
    - added format patch
    - allow build with oracle-instantclient

 libsqlora8-format.patch | 11 ++++++++++
 libsqlora8.spec         | 57 ++++++++++++++++++++++++++++++++-----------------
 2 files changed, 48 insertions(+), 20 deletions(-)
---
diff --git a/libsqlora8.spec b/libsqlora8.spec
index c6e1fa0..9868ac5 100644
--- a/libsqlora8.spec
+++ b/libsqlora8.spec
@@ -1,15 +1,19 @@
+#
+# Conditional build:
+%bcond_without	instantclient	# build against Oracle instantclient
+
 Summary:	Library to access Oracle databases
 Summary(pl.UTF-8):	Biblioteka dostępu do baz danych Oracle
 Name:		libsqlora8
-Version:	2.2.11
+Version:	2.3.3
 Release:	1
-License:	free
-Vendor:		Kai Poitschke
+License:	MIT
 Group:		Libraries
 Source0:	http://www.poitschke.de/libsqlora8/%{name}-%{version}.tar.gz
-# Source0-md5:	683f97278a64f4187e0302388102c06f
+# Source0-md5:	1fcb146f795bddad6baf2916b322c168
+Patch0:		%{name}-format.patch
 URL:		http://www.poitschke.de/libsqlora8/
-BuildRequires:	automake
+%{?with_instantclient:BuildRequires:	oracle-instantclient-devel >= 8}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -46,23 +50,35 @@ Statyczna biblioteka libsqlora8.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure \
 	--enable-sqlora1 \
-	--with-oraclehome=$ORACLE_HOME
-%{__make}
+%if %{with instantclient}
+	ORACLE_CPPFLAGS="-I/usr/include/oracle/client" \
+	--with-oraclehome=/usr \
+	--with-oraversion=10.0 \
+%else
+	--with-oraclehome=$ORACLE_HOME \
+%endif
+	--with-threads=posix
+
+%{__make} -j1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_aclocaldir},%{_bindir},%{_libdir},%{_includedir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include/%{name}-config.h $RPM_BUILD_ROOT%{_includedir}
+# nothing arch-dependent (assuming same OS)
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/include/%{name}-config.h $RPM_BUILD_ROOT%{_includedir}
 
-rm -f doc/html/Makefile*
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libsqlora8.la
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/packages/libsqlora8
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -72,20 +88,21 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc ChangeLog NEWS NEWS-2.2
-%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
+%doc COPYING ChangeLog NEWS NEWS-2.2
+%attr(755,root,root) %{_libdir}/libsqlora8-2.3.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsqlora8-2.3.so.0
 
 %files devel
 %defattr(644,root,root,755)
-%doc doc/html
-%attr(755,root,root) %{_bindir}/*
-#%attr(755,root,root) %{_bindir}/%{name}-config
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
+%doc doc/html/*.{css,html,png}
+%attr(755,root,root) %{_bindir}/libsqlora8-config
+%attr(755,root,root) %{_libdir}/libsqlora8.so
+%{_includedir}/libsqlora8-config.h
 %{_includedir}/sqlora.h
-%{_includedir}/%{name}-config.h
-%{_aclocaldir}/*.m4
+%{_pkgconfigdir}/libsqlora8.pc
+%{_aclocaldir}/aclibsqlora8.m4
+%{_aclocaldir}/acoracle.m4
 
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libsqlora8.a
diff --git a/libsqlora8-format.patch b/libsqlora8-format.patch
new file mode 100644
index 0000000..efc3c28
--- /dev/null
+++ b/libsqlora8-format.patch
@@ -0,0 +1,11 @@
+--- libsqlora8-2.3.3/sqlora.c.orig	2005-06-10 16:15:11.000000000 +0200
++++ libsqlora8-2.3.3/sqlora.c	2017-12-18 20:32:07.138748977 +0100
+@@ -4126,7 +4126,7 @@
+   if (real_sth >= dbp->stmtv_size || FALSE == dbp->stmtv[ real_sth ].used) {
+     
+     sprintf(dbp->errmsg, "Invalid sth %u passed to %s\n", real_sth, func_name);
+-    TRACE(1, fprintf( _get_trace_fp(dbp), dbp->errmsg););
++    TRACE(1, fprintf( _get_trace_fp(dbp), "%s", dbp->errmsg););
+       /* make sure we release all locks */ 
+     UNLOCK_ALL; 
+     return( NULL );
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libsqlora8.git/commitdiff/551d69023ed320c6f55a74ac1eef6efcbf4b1dac



More information about the pld-cvs-commit mailing list