Due to the latest version of CMAKE CLI behavior had changed, so we need to refactor our spec accordlly. (cherry picked from commit 1afe08ed62f672fea75b0319a11e9b10a60867d8)
53 lines
1.7 KiB
RPMSpec
53 lines
1.7 KiB
RPMSpec
Name: mariadb-connector-odbc
|
||
Version: 3.1.11
|
||
Release: 2
|
||
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 make 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 23 2022 bzhaoop <bzhaojyathousandy@gmail.com> - 3.1.11-2
|
||
- Fix for fitting the new version Cmake.
|
||
|
||
* Wed Mar 3 2021 Zheng Zhenyu <zheng.zhenyu@outlook.com> - 3.1.11-1
|
||
- Initial Commit
|