diff --git a/libraries_include_path.patch b/libraries_include_path.patch new file mode 100644 index 0000000000000000000000000000000000000000..1828b103593be93f7bafc6a363b77a3ca6ad70b1 --- /dev/null +++ b/libraries_include_path.patch @@ -0,0 +1,33 @@ +--- mariadb-connector-odbc-3.0.6-ga-src/ma_odbc.h 2018-07-31 13:39:02.000000000 +0200 ++++ mariadb-connector-odbc-3.0.6-ga-src/ma_odbc.h_patched 2018-08-01 16:10:09.962798000 +0200 +@@ -29,7 +29,7 @@ + + #include + +-#include ++#include + + #include + +@@ -37,7 +37,7 @@ + #include + #include + +-#include ++#include + #include + #include + #include + +--- mariadb-connector-odbc-3.1.10-ga-src/ma_conv_charset.h.old 2020-10-26 11:37:51.314034870 +0100 ++++ mariadb-connector-odbc-3.1.10-ga-src/ma_conv_charset.h 2020-10-26 11:38:05.860205545 +0100 +@@ -23,7 +23,7 @@ + #ifndef _MA_CONV_CHARSET_H_ + #define _MA_CONV_CHARSET_H_ + +-#include "mariadb_ctype.h" ++#include + + size_t MADB_ConvertString(const char *from __attribute__((unused)), + size_t *from_len __attribute__((unused)), + \ No newline at end of file diff --git a/mariadb-connector-odbc-3.1.11-ga-src.tar.gz b/mariadb-connector-odbc-3.1.11-ga-src.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b7b817a569c46de7dc729911c4d4afd6595849ba Binary files /dev/null and b/mariadb-connector-odbc-3.1.11-ga-src.tar.gz differ diff --git a/mariadb-connector-odbc.spec b/mariadb-connector-odbc.spec new file mode 100644 index 0000000000000000000000000000000000000000..71a824e29d44f01c413827a0d021949253ed9bb1 --- /dev/null +++ b/mariadb-connector-odbc.spec @@ -0,0 +1,50 @@ +Name: mariadb-connector-odbc +Version: 3.1.11 +Release: 1 +Summary: The MariaDB Native Client library (ODBC driver) +License: LGPLv2+ +Source0: mariadb-connector-odbc-%{version}/%{name}-%{version}-ga-src.tar.gz +Url: https://mariadb.org/en/ +# Online documentation can be found at: https://mariadb.com/kb/en/library/mariadb-connector-odbc/ + +BuildRequires: cmake unixODBC-devel gcc-c++ +BuildRequires: mariadb-connector-c-devel >= 3.0.6 + +Patch1: libraries_include_path.patch + +%description +MariaDB Connector/ODBC is a standardized, LGPL licensed database driver using +the industry standard Open Database Connectivity (ODBC) API. It supports ODBC +Standard 3.5, can be used as a drop-in replacement for MySQL Connector/ODBC, +and it supports both Unicode and ANSI modes. + +%prep +%setup -q -n %{name}-%{version}-ga-src +%patch1 -p1 + +%build +%cmake . \ + -DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \ + -DMARIADB_LINK_DYNAMIC="%{_libdir}/libmariadb.so" \ +\ + -DINSTALL_LAYOUT=RPM \ + -DINSTALL_LIBDIR="%{_lib}" \ + -DINSTALL_LIB_SUFFIX="%{_lib}" \ + -DINSTALL_DOCDIR="%{_defaultdocdir}/%{name}" \ + -DINSTALL_LICENSEDIR="%{_defaultlicensedir}/%{name}" \ + +%cmake --build . + +%install +%make_install + +%files +%license COPYING +%doc README + +# This is unixODBC plugin. It resides directly in %%{_libdir} to be consistent with the rest of unixODBC plugins. Since it is plugin, it doesn´t need to be versioned. +%{_libdir}/libmaodbc.so + +%changelog +* Wed Mar 3 2021 Zheng Zhenyu - 3.1.11-1 +- Initial Commit diff --git a/mariadb-connector-odbc.yaml b/mariadb-connector-odbc.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a847ffcde0de93661843df2536eadbaa2f9ec0cc --- /dev/null +++ b/mariadb-connector-odbc.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://github.com/mariadb-corporation/mariadb-connector-odbc +tag_prefix: "" +seperator: "."