[packages/libsoci] - updated to 3.2.3 (note: new sonames) - removed outdated gcc43,flags patches - added firebird,odbc,
qboosh
qboosh at pld-linux.org
Sun Dec 17 15:56:52 CET 2017
commit 5623fa4d3135c4c280d34741dafb6a29d125e06e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Dec 17 15:58:12 2017 +0100
- updated to 3.2.3 (note: new sonames)
- removed outdated gcc43,flags patches
- added firebird,odbc,sqlite3 packages
- allow building oracle backend using instantclient
libsoci-flags.patch | 11 --
libsoci-gcc43.patch | 62 ----------
libsoci.spec | 328 +++++++++++++++++++++++++++++++++++++++++++++-------
3 files changed, 289 insertions(+), 112 deletions(-)
---
diff --git a/libsoci.spec b/libsoci.spec
index dcb4fa2..b24bd78 100644
--- a/libsoci.spec
+++ b/libsoci.spec
@@ -1,25 +1,33 @@
+# TODO: db2
#
# Conditional build:
-%bcond_with oracle # build Oracle backend
-%bcond_without mysql # don't build MySQL backend
-%bcond_without postgresql # don't build PostgreSQL backend
+%bcond_without firebird # Firebird backend
+%bcond_without mysql # MySQL backend
+%bcond_without odbc # ODBC backend
+%bcond_with oci # Oracle backend
+%bcond_without pgsql # PostgreSQL backend
+%bcond_without sqlite3 # SQLite3 backend
+%bcond_without instantclient # Oracle backend build against oracle-instantclient package
#
Summary: The C++ Database Access Library
Summary(pl.UTF-8): Biblioteka obsługi baz danych dla C++
Name: libsoci
-Version: 3.0.0
-Release: 4
+Version: 3.2.3
+Release: 1
License: Boost Software License
Group: Libraries
-Source0: http://dl.sourceforge.net/soci/soci-%{version}.tar.gz
-# Source0-md5: 1bf7dd244764e53557c1ecc01fdfac96
-Patch0: %{name}-gcc43.patch
-Patch1: %{name}-flags.patch
+Source0: http://downloads.sourceforge.net/soci/soci-%{version}.tar.gz
+# Source0-md5: acfbccf176cd20e06833a8037a2d3699
URL: http://soci.sourceforge.net/
+%{?with_firebird:BuildRequires: Firebird-devel}
+BuildRequires: boost-devel
+BuildRequires: cmake >= 2.8.0
BuildRequires: libstdc++-devel
%{?with_mysql:BuildRequires: mysql-devel}
-%{?with_postgresql:BuildRequires: postgresql-devel}
-BuildRequires: tcl
+%{?with_oci:%{?with_instantclient:BuildRequires: oracle-instantclient-devel >= 10}}
+%{?with_pgsql:BuildRequires: postgresql-devel >= 7}
+%{?with_sqlite3:BuildRequires: sqlite3-devel >= 3}
+%{?with_odbc:BuildRequires: unixODBC-devel}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -53,6 +61,45 @@ Static soci library.
%description static -l pl.UTF-8
Statyczna biblioteka soci.
+%package firebird
+Summary: Firebird backend for soci
+Summary(pl.UTF-8): Backend Firebird-a dla soci
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description firebird
+This package contains library with the Firebird binding for soci.
+
+%description firebird -l pl.UTF-8
+Ten pakiet zawiera bibliotekę do połączenia bazy Firebird z soci.
+
+%package firebird-devel
+Summary: Header files for soci Firebird backend
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki soci Firebird
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-firebird = %{version}-%{release}
+
+%description firebird-devel
+Header files for soci Firebird backend.
+
+%description firebird-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki soci Firebird.
+
+%package firebird-static
+Summary: Firebird backend for soci (static version)
+Summary(pl.UTF-8): Backend Firebird-a dla soci (wersja statyczna)
+Group: Development/Libraries
+Requires: %{name}-firebird-devel = %{version}-%{release}
+
+%description firebird-static
+This package contains static library with the Firebird binding for
+soci.
+
+%description firebird-static -l pl.UTF-8
+Ten pakiet zawiera statyczną bibliotekę do połączenia bazy Firebird z
+soci.
+
%package mysql
Summary: MySQL backend for soci
Summary(pl.UTF-8): Backend MySQL-a dla soci
@@ -65,11 +112,24 @@ This package contains library with the MySQL binding for soci.
%description mysql -l pl.UTF-8
Ten pakiet zawiera bibliotekę do połączenia bazy MySQL z soci.
+%package mysql-devel
+Summary: Header files for soci MySQL backend
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki soci MySQL
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-mysql = %{version}-%{release}
+
+%description mysql-devel
+Header files for soci MySQL backend.
+
+%description mysql-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki soci MySQL.
+
%package mysql-static
Summary: MySQL backend for soci (static version)
Summary(pl.UTF-8): Backend MySQL-a dla soci (wersja statyczna)
Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-mysql-devel = %{version}-%{release}
%description mysql-static
This package contains static library with the MySQL binding for soci.
@@ -78,6 +138,44 @@ This package contains static library with the MySQL binding for soci.
Ten pakiet zawiera statyczną bibliotekę do połączenia bazy MySQL z
soci.
+%package odbc
+Summary: ODBC backend for soci
+Summary(pl.UTF-8): Backend ODBC-a dla soci
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description odbc
+This package contains library with the ODBC binding for soci.
+
+%description odbc -l pl.UTF-8
+Ten pakiet zawiera bibliotekę do połączenia bazy ODBC z soci.
+
+%package odbc-devel
+Summary: Header files for soci ODBC backend
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki soci ODBC
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-odbc = %{version}-%{release}
+
+%description odbc-devel
+Header files for soci ODBC backend.
+
+%description odbc-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki soci ODBC.
+
+%package odbc-static
+Summary: ODBC backend for soci (static version)
+Summary(pl.UTF-8): Backend ODBC-a dla soci (wersja statyczna)
+Group: Development/Libraries
+Requires: %{name}-odbc-devel = %{version}-%{release}
+
+%description odbc-static
+This package contains static library with the ODBC binding for soci.
+
+%description odbc-static -l pl.UTF-8
+Ten pakiet zawiera statyczną bibliotekę do połączenia bazy ODBC z
+soci.
+
%package oracle
Summary: Oracle backend for soci
Summary(pl.UTF-8): Backend Oracla dla soci
@@ -90,11 +188,24 @@ This package contains library with the Oracle binding for soci.
%description oracle -l pl.UTF-8
Ten pakiet zawiera bibliotekę do połączenia bazy Oracle z soci.
+%package oracle-devel
+Summary: Header files for soci Oracle backend
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki soci Oracle
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-oracle = %{version}-%{release}
+
+%description oracle-devel
+Header files for soci Oracle backend.
+
+%description oracle-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki soci Oracle.
+
%package oracle-static
Summary: Oracle backend for soci (static version)
Summary(pl.UTF-8): Backend Oracla dla soci (wersja statyczna)
Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-oracle-devel = %{version}-%{release}
%description oracle-static
This package contains static library with the Oracle binding for soci.
@@ -115,41 +226,97 @@ This package contains library with the PostgreSQL binding for soci.
%description postgresql -l pl.UTF-8
Ten pakiet zawiera bibliotekę do połączenia bazy PostgreSQL z soci.
+%package postgresql-devel
+Summary: Header files for soci PostgreSQL backend
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki soci PostgreSQL
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-posgresql = %{version}-%{release}
+
+%description postgresql-devel
+Header files for soci PostgreSQL backend.
+
+%description postgresql-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki soci PostgreSQL.
+
%package postgresql-static
Summary: PostgreSQL backend for soci (static version)
Summary(pl.UTF-8): Backend PostgreSQL-a dla soci (wersja statyczna)
Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-postgresql-devel = %{version}-%{release}
%description postgresql-static
This package contains static library with the PostgreSQL binding for
soci.
%description postgresql-static -l pl.UTF-8
-Ten pakiet zawiera statyczną bibliotekę do połączenia bazy PostgreSQL z
+Ten pakiet zawiera statyczną bibliotekę do połączenia bazy PostgreSQL
+z soci.
+
+%package sqlite3
+Summary: SQLite3 backend for soci
+Summary(pl.UTF-8): Backend SQLite3-a dla soci
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description sqlite3
+This package contains library with the SQLite3 binding for soci.
+
+%description sqlite3 -l pl.UTF-8
+Ten pakiet zawiera bibliotekę do połączenia bazy SQLite3 z soci.
+
+%package sqlite3-devel
+Summary: Header files for soci SQLite3 backend
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki soci SQLite3
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-sqlite3 = %{version}-%{release}
+
+%description sqlite3-devel
+Header files for soci SQLite3 backend.
+
+%description sqlite3-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki soci SQLite3.
+
+%package sqlite3-static
+Summary: SQLite3 backend for soci (static version)
+Summary(pl.UTF-8): Backend SQLite3-a dla soci (wersja statyczna)
+Group: Development/Libraries
+Requires: %{name}-sqlite3-devel = %{version}-%{release}
+
+%description sqlite3-static
+This package contains static library with the SQLite3 binding for
+soci.
+
+%description sqlite3-static -l pl.UTF-8
+Ten pakiet zawiera statyczną bibliotekę do połączenia bazy SQLite3 z
soci.
%prep
%setup -q -n soci-%{version}
-%patch0 -p1
-%patch1 -p1
%build
-%configure \
- --include-prefix=$RPM_BUILD_ROOT%{_includedir}/soci \
- --lib-prefix=$RPM_BUILD_ROOT%{_libdir} \
- --postgresql-include=%{_includedir} \
- --postgresql-lib=%{_libdir} \
- --mysql-include=%{_includedir}/mysql \
- --mysql-lib=%{_libdir}
-
-export CXXFLAGS="${CXXFLAGS:-%rpmcxxflags}"
+install -d build
+cd build
+%{?with_oci:%{?with_instantclient:export ORACLE_HOME=%{_libdir}}}
+%cmake .. \
+ -DLIBDIR:PATH=%{_lib} \
+ %{?with_instantclient:-DORACLE_INCLUDE_DIR=/usr/include/oracle/client} \
+ -DWITH_DB2=OFF \
+ %{!?with_firebird:-DWITH_FIREBIRD=OFF} \
+ %{!?with_mysql:-DWITH_MYSQL=OFF} \
+ %{!?with_odbc:-DWITH_ODBC=OFF} \
+ %{!?with_oci:-DWITH_ORACLE=OFF} \
+ %{!?with_pgsql:-DWITH_POSTGRESQL=OFF} \
+ %{!?with_sqlite3:-DWITH_SQLITE3=OFF}
+
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
@@ -157,55 +324,138 @@ rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%post firebird -p /sbin/ldconfig
+%postun firebird -p /sbin/ldconfig
+
%post mysql -p /sbin/ldconfig
%postun mysql -p /sbin/ldconfig
+%post odbc -p /sbin/ldconfig
+%postun odbc -p /sbin/ldconfig
+
%post oracle -p /sbin/ldconfig
%postun oracle -p /sbin/ldconfig
%post postgresql -p /sbin/ldconfig
%postun postgresql -p /sbin/ldconfig
+%post sqlite3 -p /sbin/ldconfig
+%postun sqlite3 -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
-%doc CHANGES LICENSE_1_0.txt README
-%attr(755,root,root) %{_libdir}/libsoci_core*.so
+%doc AUTHORS CHANGES LICENSE_1_0.txt README.md
+%attr(755,root,root) %{_libdir}/libsoci_core.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsoci_core.so.3.2
+%attr(755,root,root) %{_libdir}/libsoci_empty.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsoci_empty.so.3.2
%files devel
%defattr(644,root,root,755)
%doc doc/*
-%{_includedir}/soci
+%attr(755,root,root) %{_libdir}/libsoci_core.so
+%attr(755,root,root) %{_libdir}/libsoci_empty.so
+%dir %{_includedir}/soci
+%{_includedir}/soci/*.h
+%{_includedir}/soci/empty
%files static
%defattr(644,root,root,755)
-%{_libdir}/libsoci_core*.a
+%{_libdir}/libsoci_core.a
+%{_libdir}/libsoci_empty.a
+
+%if %{with firebird}
+%files firebird
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsoci_firebird.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsoci_firebird.so.3.2
+
+%files firebird-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsoci_firebird.so
+%{_includedir}/soci/firebird
+
+%files firebird-static
+%defattr(644,root,root,755)
+%{_libdir}/libsoci_firebird.a
+%endif
%if %{with mysql}
%files mysql
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libsoci_mysql*.so
+%attr(755,root,root) %{_libdir}/libsoci_mysql.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsoci_mysql.so.3.2
+
+%files mysql-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsoci_mysql.so
+%{_includedir}/soci/mysql
%files mysql-static
%defattr(644,root,root,755)
-%{_libdir}/libsoci_mysql*.a
+%{_libdir}/libsoci_mysql.a
+%endif
+
+%if %{with odbc}
+%files odbc
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsoci_odbc.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsoci_odbc.so.3.2
+
+%files odbc-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsoci_odbc.so
+%{_includedir}/soci/odbc
+
+%files odbc-static
+%defattr(644,root,root,755)
+%{_libdir}/libsoci_odbc.a
%endif
-%if %{with oracle}
+%if %{with oci}
%files oracle
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libsoci_oracle*.so
+%attr(755,root,root) %{_libdir}/libsoci_oracle.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsoci_oracle.so.3.2
+
+%files oracle-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsoci_oracle.so
+%{_includedir}/soci/oracle
%files oracle-static
%defattr(644,root,root,755)
-%{_libdir}/libsoci_oracle*.a
+%{_libdir}/libsoci_oracle.a
%endif
-%if %{with postgresql}
+%if %{with pgsql}
%files postgresql
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libsoci_postgresql*.so
+%attr(755,root,root) %{_libdir}/libsoci_postgresql.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsoci_postgresql.so.3.2
+
+%files postgresql-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsoci_postgresql.so
+%{_includedir}/soci/postgresql
%files postgresql-static
%defattr(644,root,root,755)
-%{_libdir}/libsoci_postgresql*.a
+%{_libdir}/libsoci_postgresql.a
+%endif
+
+%if %{with sqlite3}
+%files sqlite3
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsoci_sqlite3.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsoci_sqlite3.so.3.2
+
+%files sqlite3-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsoci_sqlite3.so
+%{_includedir}/soci/sqlite3
+
+%files sqlite3-static
+%defattr(644,root,root,755)
+%{_libdir}/libsoci_sqlite3.a
%endif
diff --git a/libsoci-flags.patch b/libsoci-flags.patch
deleted file mode 100644
index 0d74d9c..0000000
--- a/libsoci-flags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- soci-3.0.0/build/unix/build.tcl.org 2008-07-10 20:35:11.277876455 +0200
-+++ soci-3.0.0/build/unix/build.tcl 2008-07-10 20:37:20.908876102 +0200
-@@ -2,7 +2,7 @@
-
- # some common compilation settings if you need to change them:
-
--set CXXFLAGS "-Wall -pedantic -Wno-long-long -O2"
-+set CXXFLAGS $::env(CXXFLAGS)
- set CXXTESTFLAGS "-O2"
-
- if {$tcl_platform(os) == "Darwin"} {
diff --git a/libsoci-gcc43.patch b/libsoci-gcc43.patch
deleted file mode 100644
index 1a98689..0000000
--- a/libsoci-gcc43.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- soci-3.0.0/src/backends/mysql/common.h.org 2008-07-10 19:37:12.388879700 +0200
-+++ soci-3.0.0/src/backends/mysql/common.h 2008-07-10 19:37:22.405876279 +0200
-@@ -9,6 +9,7 @@
- #define SOCI_MYSQL_COMMON_H_INCLUDED
-
- #include <sstream>
-+#include <ctime>
- #include "soci-mysql.h"
-
- namespace soci
---- soci-3.0.0/src/backends/mysql/session.cpp.org 2008-07-10 19:44:41.317881830 +0200
-+++ soci-3.0.0/src/backends/mysql/session.cpp 2008-07-10 19:46:09.761878328 +0200
-@@ -10,6 +10,8 @@
- #include "soci-mysql.h"
- #include <cctype>
- #include <cerrno>
-+#include <climits>
-+#include <cstdlib>
- #include <ciso646>
-
-
---- soci-3.0.0/src/backends/mysql/standard-into-type.cpp.org 2008-07-10 19:48:28.296879993 +0200
-+++ soci-3.0.0/src/backends/mysql/standard-into-type.cpp 2008-07-10 19:49:06.593880673 +0200
-@@ -12,6 +12,7 @@
- #include "common.h"
- #include <ciso646>
- #include <cassert>
-+#include <cstring>
-
- #ifdef _MSC_VER
- #pragma warning(disable:4355)
---- soci-3.0.0/src/core/soci-simple.cpp~ 2008-07-01 09:42:25.000000000 +0200
-+++ soci-3.0.0/src/core/soci-simple.cpp 2011-05-17 09:15:12.366747904 +0200
-@@ -7,6 +7,8 @@
-
- #define SOCI_SOURCE
-
-+#include <cstdio>
-+
- #include "soci-simple.h"
- #include "soci.h"
-
---- soci-3.0.0/src/backends/mysql/standard-use-type.cpp~ 2008-05-15 15:58:38.000000000 +0200
-+++ soci-3.0.0/src/backends/mysql/standard-use-type.cpp 2011-05-17 09:17:43.470359903 +0200
-@@ -13,6 +13,7 @@
- #include <ciso646>
- #include <limits>
- #include <cstring>
-+#include <cstdio>
-
- #ifdef _MSC_VER
- #pragma warning(disable:4355)
---- soci-3.0.0/src/backends/mysql/vector-use-type.cpp~ 2008-05-15 15:58:38.000000000 +0200
-+++ soci-3.0.0/src/backends/mysql/vector-use-type.cpp 2011-05-17 09:19:24.358330530 +0200
-@@ -13,6 +13,7 @@
- #include <ciso646>
- #include <limits>
- #include <cstring>
-+#include <cstdio>
-
- #ifdef _MSC_VER
- #pragma warning(disable:4355)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libsoci.git/commitdiff/5623fa4d3135c4c280d34741dafb6a29d125e06e
More information about the pld-cvs-commit
mailing list