470b18
Summary: The MariaDB Native Client library (C driver)
470b18
Name: mariadb-connector-c
470b18
Version: 2.0.0
470b18
Release: 2%{?dist}
470b18
470b18
License: LGPLv2+
470b18
Group: Applications/Databases
470b18
Source: https://downloads.mariadb.org/f/client-native-2.0.0/src/mariadb_client-%{version}-src.tar.gz
470b18
Url: https://mariadb.org/en/
470b18
BuildRequires: zlib-devel cmake
470b18
470b18
#Patch0: fixes libdir paths on 64 bit systems
470b18
Patch0: mariadb-connector-c-2.0.0-libdirectories.patch
470b18
470b18
%description
470b18
The MariaDB Native Client library (C driver) is used to connect applications
470b18
developed in C/C++ to MariaDB and MySQL databases.
470b18
470b18
%package devel
470b18
Summary: Development files for mariadb-connector-c.
470b18
Group: Development/Libraries 
470b18
Requires: mariadb-connector-c = %{version}-%{release}
470b18
BuildRequires: xmlto
470b18
470b18
%description devel
470b18
Development files for mariadb-connector-c.
470b18
470b18
%prep
470b18
%setup -q -n mariadb_client-%{version}-src
470b18
%patch0 -p2 -b .libdirectories
470b18
470b18
%build
470b18
%cmake . -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DWITH_EXTERNAL_ZLIB=ON 
470b18
470b18
make %{?_smp_mflags}
470b18
470b18
pushd docs
470b18
%cmake .
470b18
make %{?_smp_mflags}
5665b1
sed -ri "s/#idm[0-9]+//g" html/*
470b18
popd
470b18
470b18
%install
470b18
make install DESTDIR=$RPM_BUILD_ROOT
470b18
470b18
rm /$RPM_BUILD_ROOT%{_libdir}/mariadb/libmariadbclient.a 
470b18
rm /$RPM_BUILD_ROOT%{_libdir}/mariadb/libmysqlclient.a
470b18
470b18
rm /$RPM_BUILD_ROOT%{_includedir}/mariadb/Makefile.am 
470b18
rm -r /$RPM_BUILD_ROOT%{_includedir}/mariadb/CMakeFiles 
470b18
rm /$RPM_BUILD_ROOT%{_includedir}/mariadb/mysql_version.h.in 
470b18
rm /$RPM_BUILD_ROOT%{_includedir}/mariadb/Makefile 
470b18
rm /$RPM_BUILD_ROOT%{_includedir}/mariadb/CMakeLists.txt 
470b18
rm /$RPM_BUILD_ROOT%{_includedir}/mariadb/my_config.h.in 
470b18
rm /$RPM_BUILD_ROOT%{_includedir}/mariadb/cmake_install.cmake
470b18
470b18
%files
470b18
%defattr(-,root,root,-)
470b18
%{_libdir}/mariadb/libmariadb.so.2
470b18
%doc README COPYING.LIB
470b18
470b18
%files  devel
470b18
%defattr(-,root,root,-)
470b18
%{_bindir}/*
470b18
%{_libdir}/mariadb/libmariadb.so
470b18
%{_libdir}/mariadb/libmysqlclient_r.so
470b18
%{_libdir}/mariadb/libmysqlclient.so
470b18
%{_libdir}/mariadb/libmysql.so
470b18
470b18
%{_includedir}/mariadb
470b18
%doc docs/html
470b18
470b18
%changelog
5665b1
* Wed Sep 24 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
5665b1
- Fixed html IDs in documentation
5665b1
470b18
* Tue Aug 26 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
470b18
- Initial version for 2.0.0
470b18