%define major 6 %define libname %mklibname mysqlcppconn %{major} %define develname %mklibname mysqlcppconn -d Summary: A MySQL database connector for C++ Name: mysql-connector-c++ Version: 1.1.1 Release: %mkrel 7 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 BuildRequires: cmake BuildRequires: mysql-devel BuildRequires: boost-devel %description Connector/C++ is a tool that enables easy deployment and management of MySQL server and database through your C++ application. %package -n %{libname} Summary: The shared mysql-connector-cpp library Group: System/Libraries %description -n %{libname} Connector/C++ is a tool that enables easy deployment and management of MySQL server and database through your C++ application. This package provides the shared mysql-connector-cpp library. %package -n %{develname} Summary: Development library and header files for development with mysql-connector-cpp Group: Development/C++ Requires: %{libname} = %{version} Provides: mysql-connector-c++-devel = %{version}-%{release} %description -n %{develname} Connector/C++ is a tool that enables easy deployment and management of MySQL server and database through your C++ application. This package is only needed if you plan to develop or compile applications which requires the mysql-connector-cpp library. %prep %setup -q %{__sed} -i -e 's/lib$/%{_lib}/' driver/CMakeLists.txt %{__chmod} -x examples/*.cpp examples/*.txt # Save examples to keep directory clean (for doc) %{__mkdir} _doc_examples %{__cp} -pr examples _doc_examples %build %{cmake} -DMYSQLCPPCONN_BUILD_EXAMPLES:BOOL=OFF %{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 %files -n %{libname} %{_libdir}/*.so.%{major}* %files -n %{develname} %dir %{_includedir}/cppconn %{_includedir}/*.h %{_includedir}/cppconn/*.h %{_libdir}/*.so %{_libdir}/*.a