%define major 7 %define libname %mklibname mysqlcppconn %{major} %define develname %mklibname mysqlcppconn -d Summary: A MySQL database connector for C++ Name: mysql-connector-c++ Version: 1.1.5 Release: %mkrel 1 Group: System/Libraries License: GPL URL: http://dev.mysql.com/downloads/connector/cpp/ Source0: http://cdn.mysql.com/Downloads/Connector-C++/%{name}-%{version}.tar.gz ## patches from arch-linux Patch0: mysql_cxx_linkage.patch Patch1: mariadb_api.patch Patch2: FindMySQL_cmake.patch BuildRequires: cmake BuildRequires: mysql-devel BuildRequires: boost-devel %description MySQL Connector/C++ is a MySQL database connector for C++ development. The MySQL driver for C++ can be used to connect to MySQL from C++ applications. The driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its full functionality is not available when connecting to MySQL 5.0. You cannot connect to MySQL 4.1 or earlier. Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) offers the following advantages for C++ users: * Convenience of pure C++ - no C function calls * Support of a well designed API - JDBC 4.0 * Support of a commonly known and well documented API - JDBC 4.0 * Support of the object oriented programming paradigma * Shorter development times %package -n %{libname} Summary: The shared mysql-connector-cpp library Group: System/Libraries Provides: %{name} = %{version}-%{release} %description -n %{libname} MySQL Connector/C++ is a MySQL database connector for C++ development. The MySQL driver for C++ can be used to connect to MySQL from C++ applications. The driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its full functionality is not available when connecting to MySQL 5.0. You cannot connect to MySQL 4.1 or earlier. Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) offers the following advantages for C++ users: * Convenience of pure C++ - no C function calls * Support of a well designed API - JDBC 4.0 * Support of a commonly known and well documented API - JDBC 4.0 * Support of the object oriented programming paradigma * Shorter development times %package -n %{develname} Summary: Development library and header files for development with mysql-connector-cpp Group: Development/C++ Requires: %{libname} = %{version} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} MySQL Connector/C++ is a MySQL database connector for C++ development. The MySQL driver for C++ can be used to connect to MySQL from C++ applications. The driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its full functionality is not available when connecting to MySQL 5.0. You cannot connect to MySQL 4.1 or earlier. Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) offers the following advantages for C++ users: * Convenience of pure C++ - no C function calls * Support of a well designed API - JDBC 4.0 * Support of a commonly known and well documented API - JDBC 4.0 * Support of the object oriented programming paradigma * Shorter development times %prep %setup -q %patch0 -p1 -b .linkage %patch1 -p1 -b .mariadb %patch2 -p1 -b .FindMySQL_cmake %{__chmod} -x examples/*.cpp examples/*.txt # Save examples to keep directory clean (for doc) %{__mkdir} _doc_examples %{__cp} -pr examples _doc_examples %build %{cmake} \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DMYSQLCPPCONN_BUILD_EXAMPLES=OFF \ -DMYSQL_LIB=%{_libdir}/libmysqlclient.so %{make} %install cp build/cppconn/config.h cppconn/config.h %makeinstall_std -C build rm -fr %{buildroot}%_prefix/COPYING rm -fr %{buildroot}%_prefix/INSTALL rm -fr %{buildroot}%_prefix/README rm -fr %{buildroot}%_prefix/ANNOUNCEMENT rm -fr %{buildroot}%_prefix/Licenses_for_Third-Party_Components.txt rm -f %{buildroot}%{_libdir}/libmysqlcppconn-static.a %files -n %{libname} %{_libdir}/*.so.%{major}* %files -n %{develname} %doc README ANNOUNCEMENT COPYING CHANGES examples %dir %{_includedir}/cppconn %{_includedir}/*.h %{_includedir}/cppconn/*.h %{_libdir}/*.so %changelog * Fri Feb 20 2015 spuhler <spuhler> 1.1.5-1.mga5 + Revision: 816158 - added FindMySQL_cmake.patch to make it find mysql.h - removed %%{__sed} -i -e 's/lib$/%%{_lib}/' driver/CMakeLists.txt * added it into the cmake options * used macros in the cmak options - upgrade to ver. 1.1.5 - added patches from archlinux - update to vers. 1.1.3 * this increase the major from 6 to 7 - added discriptions from Opensuse * Wed Oct 15 2014 umeabot <umeabot> 1.1.1-7.mga5 + Revision: 746473 - Second Mageia 5 Mass Rebuild * Sat Sep 27 2014 tv <tv> 1.1.1-6.mga5 + Revision: 727437 - rebuild for missing pythoneggs deps * Tue Sep 16 2014 umeabot <umeabot> 1.1.1-5.mga5 + Revision: 682723 - Mageia 5 Mass Rebuild * Sat Oct 19 2013 umeabot <umeabot> 1.1.1-4.mga4 + Revision: 529561 - Mageia 4 Mass Rebuild * Wed Jul 10 2013 fwang <fwang> 1.1.1-3.mga4 + Revision: 452471 - rebuild for new boost * Sat Jan 12 2013 umeabot <umeabot> 1.1.1-2.mga3 + Revision: 360579 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Thu Oct 18 2012 fwang <fwang> 1.1.1-1.mga3 + Revision: 307860 - update file list - new version 1.1.1 * Thu Mar 24 2011 dmorgan <dmorgan> 1.1.0-0.7.bzr916.mga1 + Revision: 77077 - Rebuild against new mysql * Mon Feb 28 2011 dmorgan <dmorgan> 1.1.0-0.6.bzr916.mga1 + Revision: 61364 - Workaround install pb - New snapshot Fix file list - Remove patch0, this is not the good way to fix - Remove old patches Add patch to _start_ to fix build - Add boost-devel as builrequire - Update to 1.1.0 snapshot * Tue Feb 22 2011 dmorgan <dmorgan> 1.0.5-7.mga1 + Revision: 56414 - Remove mdv macros - imported package mysql-connector-c++ * Mon Dec 06 2010 Oden Eriksson <oeriksson@mandriva.com> 1.0.5-7mdv2011.0 + Revision: 612974 - the mass rebuild of 2010.1 packages * Tue Apr 20 2010 Funda Wang <fwang@mandriva.org> 1.0.5-6mdv2010.1 + Revision: 536927 - specify libdir - use cmake standard macro * Thu Feb 18 2010 Oden Eriksson <oeriksson@mandriva.com> 1.0.5-1mdv2010.1 + Revision: 507862 - import mysql-connector-c++ * Thu Feb 18 2010 Oden Eriksson <oeriksson@mandriva.com> 1.0.5-1mdv2010.0 - initial Mandriva package (inspired by opensuse)