Add rpm spec for mariadb-connector-odbc
This commit is contained in:
parent
e93bd735f4
commit
1d57da8ba3
33
libraries_include_path.patch
Normal file
33
libraries_include_path.patch
Normal file
@ -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 <stdlib.h>
|
||||||
|
|
||||||
|
-#include <mysql.h>
|
||||||
|
+#include <mysql/mysql.h>
|
||||||
|
|
||||||
|
#include <ma_legacy_helpers.h>
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@
|
||||||
|
#include <sqlext.h>
|
||||||
|
#include <odbcinst.h>
|
||||||
|
|
||||||
|
-#include <errmsg.h>
|
||||||
|
+#include <mysql/errmsg.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
--- 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 <mysql/mariadb_ctype.h>
|
||||||
|
|
||||||
|
size_t MADB_ConvertString(const char *from __attribute__((unused)),
|
||||||
|
size_t *from_len __attribute__((unused)),
|
||||||
|
|
||||||
BIN
mariadb-connector-odbc-3.1.11-ga-src.tar.gz
Normal file
BIN
mariadb-connector-odbc-3.1.11-ga-src.tar.gz
Normal file
Binary file not shown.
50
mariadb-connector-odbc.spec
Normal file
50
mariadb-connector-odbc.spec
Normal file
@ -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 <zheng.zhenyu@outlook.com> - 3.1.11-1
|
||||||
|
- Initial Commit
|
||||||
4
mariadb-connector-odbc.yaml
Normal file
4
mariadb-connector-odbc.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: git
|
||||||
|
src_repo: https://github.com/mariadb-corporation/mariadb-connector-odbc
|
||||||
|
tag_prefix: ""
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user