1 |
dmorgan |
56412 |
%define major 1 |
2 |
|
|
%define libname %mklibname mysqlcppconn %{major} |
3 |
|
|
%define develname %mklibname mysqlcppconn -d |
4 |
|
|
|
5 |
|
|
Summary: A MySQL database connector for C++ |
6 |
|
|
Name: mysql-connector-c++ |
7 |
|
|
Version: 1.0.5 |
8 |
|
|
Release: %mkrel 7 |
9 |
|
|
Group: System/Libraries |
10 |
|
|
License: GPL |
11 |
|
|
URL: http://dev.mysql.com/downloads/connector/cpp/ |
12 |
|
|
Source0: http://mirrors.dotsrc.org/mysql/Downloads/Connector-C++/mysql-connector-c++-%{version}.tar.gz |
13 |
|
|
Patch0: mysql-connector-cpp-1.0.4-beta-cmake-paths-fix.patch |
14 |
|
|
Patch1: mysql-connector-cpp-1.0.5-gcc44.patch |
15 |
|
|
Patch2: mysql-connector-c++-1.0.5-no_examples.diff |
16 |
|
|
BuildRequires: cmake |
17 |
|
|
BuildRequires: mysql-devel |
18 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
19 |
|
|
|
20 |
|
|
%description |
21 |
|
|
Connector/C++ is a tool that enables easy deployment and management of MySQL |
22 |
|
|
server and database through your C++ application. |
23 |
|
|
|
24 |
|
|
%package -n %{libname} |
25 |
|
|
Summary: The shared mysql-connector-cpp library |
26 |
|
|
Group: System/Libraries |
27 |
|
|
|
28 |
|
|
%description -n %{libname} |
29 |
|
|
Connector/C++ is a tool that enables easy deployment and management of MySQL |
30 |
|
|
server and database through your C++ application. |
31 |
|
|
|
32 |
|
|
This package provides the shared mysql-connector-cpp library. |
33 |
|
|
|
34 |
|
|
|
35 |
|
|
%package -n %{develname} |
36 |
|
|
Summary: Development library and header files for development with mysql-connector-cpp |
37 |
|
|
Group: Development/C++ |
38 |
|
|
Requires: %{libname} = %{version} |
39 |
|
|
Provides: mysql-connector-c++-devel = %{version}-%{release} |
40 |
|
|
|
41 |
|
|
%description -n %{develname} |
42 |
|
|
Connector/C++ is a tool that enables easy deployment and management of MySQL |
43 |
|
|
server and database through your C++ application. |
44 |
|
|
|
45 |
|
|
This package is only needed if you plan to develop or compile applications |
46 |
|
|
which requires the mysql-connector-cpp library. |
47 |
|
|
|
48 |
|
|
%prep |
49 |
|
|
%setup -q -n mysql-connector-c++-%{version} |
50 |
|
|
%patch0 -p1 -b .build |
51 |
|
|
%patch1 -p0 |
52 |
|
|
%patch2 -p0 |
53 |
|
|
|
54 |
|
|
%build |
55 |
|
|
%serverbuild |
56 |
|
|
%cmake -DCMAKE_INSTALL_LIB_DIR=%{_libdir} |
57 |
|
|
%make |
58 |
|
|
|
59 |
|
|
%install |
60 |
|
|
rm -rf %{buildroot} |
61 |
|
|
|
62 |
|
|
%makeinstall_std -C build |
63 |
|
|
|
64 |
|
|
# cleanup |
65 |
|
|
rm -f %{buildroot}%{_libdir}/*.a |
66 |
|
|
rm -f %{buildroot}%{_prefix}/ANNOUNCEMENT |
67 |
|
|
rm -f %{buildroot}%{_prefix}/COPYING |
68 |
|
|
rm -f %{buildroot}%{_prefix}/README |
69 |
|
|
|
70 |
|
|
%clean |
71 |
|
|
rm -rf %{buildroot} |
72 |
|
|
|
73 |
|
|
%files -n %{libname} |
74 |
|
|
%defattr(-,root,root) |
75 |
|
|
%doc README ANNOUNCEMENT COPYING CHANGES |
76 |
|
|
%attr(0755,root,root) %{_libdir}/*.so.%{major}* |
77 |
|
|
|
78 |
|
|
%files -n %{develname} |
79 |
|
|
%defattr(-,root,root) |
80 |
|
|
%dir %{_includedir}/mysql-connector |
81 |
|
|
%dir %{_includedir}/mysql-connector/cppconn |
82 |
|
|
%attr(0644,root,root) %{_includedir}/mysql-connector/*.h |
83 |
|
|
%attr(0644,root,root) %{_includedir}/mysql-connector/cppconn/*.h |
84 |
|
|
%attr(0644,root,root) %{_libdir}/*.so |
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|