--- /dev/null
+--- 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 );
+#
+# 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
%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
%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