1 |
spuhler |
816025 |
%define major 7 |
2 |
dmorgan |
56412 |
%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 |
spuhler |
879010 |
Version: 1.1.6 |
8 |
spuhler |
816025 |
Release: %mkrel 1 |
9 |
dmorgan |
56412 |
Group: System/Libraries |
10 |
|
|
License: GPL |
11 |
|
|
URL: http://dev.mysql.com/downloads/connector/cpp/ |
12 |
fwang |
307859 |
Source0: http://cdn.mysql.com/Downloads/Connector-C++/%{name}-%{version}.tar.gz |
13 |
spuhler |
816115 |
## patches from arch-linux |
14 |
|
|
Patch0: mysql_cxx_linkage.patch |
15 |
|
|
Patch1: mariadb_api.patch |
16 |
spuhler |
816157 |
Patch2: FindMySQL_cmake.patch |
17 |
dmorgan |
56412 |
BuildRequires: cmake |
18 |
|
|
BuildRequires: mysql-devel |
19 |
dmorgan |
56456 |
BuildRequires: boost-devel |
20 |
dmorgan |
56412 |
|
21 |
|
|
%description |
22 |
spuhler |
816025 |
MySQL Connector/C++ is a MySQL database connector for C++ development. The |
23 |
|
|
MySQL driver for C++ can be used to connect to MySQL from C++ applications. The |
24 |
|
|
driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. |
25 |
dmorgan |
56412 |
|
26 |
spuhler |
816025 |
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its |
27 |
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot |
28 |
|
|
connect to MySQL 4.1 or earlier. |
29 |
|
|
|
30 |
|
|
Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) |
31 |
|
|
offers the following advantages for C++ users: |
32 |
|
|
|
33 |
|
|
* Convenience of pure C++ - no C function calls |
34 |
|
|
* Support of a well designed API - JDBC 4.0 |
35 |
|
|
* Support of a commonly known and well documented API - JDBC 4.0 |
36 |
|
|
* Support of the object oriented programming paradigma |
37 |
|
|
* Shorter development times |
38 |
|
|
|
39 |
dmorgan |
56412 |
%package -n %{libname} |
40 |
|
|
Summary: The shared mysql-connector-cpp library |
41 |
|
|
Group: System/Libraries |
42 |
spuhler |
816025 |
Provides: %{name} = %{version}-%{release} |
43 |
dmorgan |
56412 |
|
44 |
|
|
%description -n %{libname} |
45 |
spuhler |
816025 |
MySQL Connector/C++ is a MySQL database connector for C++ development. The |
46 |
|
|
MySQL driver for C++ can be used to connect to MySQL from C++ applications. The |
47 |
|
|
driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. |
48 |
dmorgan |
56412 |
|
49 |
spuhler |
816025 |
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its |
50 |
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot |
51 |
|
|
connect to MySQL 4.1 or earlier. |
52 |
dmorgan |
56412 |
|
53 |
spuhler |
816025 |
Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) |
54 |
|
|
offers the following advantages for C++ users: |
55 |
|
|
|
56 |
|
|
* Convenience of pure C++ - no C function calls |
57 |
|
|
* Support of a well designed API - JDBC 4.0 |
58 |
|
|
* Support of a commonly known and well documented API - JDBC 4.0 |
59 |
|
|
* Support of the object oriented programming paradigma |
60 |
|
|
* Shorter development times |
61 |
|
|
|
62 |
dmorgan |
56412 |
%package -n %{develname} |
63 |
|
|
Summary: Development library and header files for development with mysql-connector-cpp |
64 |
|
|
Group: Development/C++ |
65 |
|
|
Requires: %{libname} = %{version} |
66 |
spuhler |
816025 |
Provides: %{name}-devel = %{version}-%{release} |
67 |
dmorgan |
56412 |
|
68 |
|
|
%description -n %{develname} |
69 |
spuhler |
816025 |
MySQL Connector/C++ is a MySQL database connector for C++ development. The |
70 |
|
|
MySQL driver for C++ can be used to connect to MySQL from C++ applications. The |
71 |
|
|
driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. |
72 |
dmorgan |
56412 |
|
73 |
spuhler |
816025 |
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its |
74 |
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot |
75 |
|
|
connect to MySQL 4.1 or earlier. |
76 |
dmorgan |
56412 |
|
77 |
spuhler |
816025 |
Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) |
78 |
|
|
offers the following advantages for C++ users: |
79 |
|
|
|
80 |
|
|
* Convenience of pure C++ - no C function calls |
81 |
|
|
* Support of a well designed API - JDBC 4.0 |
82 |
|
|
* Support of a commonly known and well documented API - JDBC 4.0 |
83 |
|
|
* Support of the object oriented programming paradigma |
84 |
|
|
* Shorter development times |
85 |
|
|
|
86 |
dmorgan |
56412 |
%prep |
87 |
dmorgan |
56455 |
%setup -q |
88 |
spuhler |
816115 |
%patch0 -p1 -b .linkage |
89 |
|
|
%patch1 -p1 -b .mariadb |
90 |
spuhler |
879044 |
## %patch2 -p1 -b .FindMySQL_cmake |
91 |
dmorgan |
56455 |
%{__chmod} -x examples/*.cpp examples/*.txt |
92 |
|
|
|
93 |
|
|
# Save examples to keep directory clean (for doc) |
94 |
|
|
%{__mkdir} _doc_examples |
95 |
|
|
%{__cp} -pr examples _doc_examples |
96 |
|
|
|
97 |
dmorgan |
56412 |
%build |
98 |
spuhler |
816025 |
%{cmake} \ |
99 |
spuhler |
816115 |
-DCMAKE_INSTALL_PREFIX=/usr \ |
100 |
|
|
-DCMAKE_BUILD_TYPE=Release \ |
101 |
spuhler |
816157 |
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \ |
102 |
spuhler |
816115 |
-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF \ |
103 |
spuhler |
816157 |
-DMYSQL_LIB=%{_libdir}/libmysqlclient.so |
104 |
fwang |
307859 |
%{make} |
105 |
dmorgan |
56412 |
|
106 |
|
|
%install |
107 |
dmorgan |
61364 |
cp build/cppconn/config.h cppconn/config.h |
108 |
spuhler |
816025 |
|
109 |
fwang |
307859 |
%makeinstall_std -C build |
110 |
dmorgan |
61363 |
rm -fr %{buildroot}%_prefix/COPYING |
111 |
|
|
rm -fr %{buildroot}%_prefix/INSTALL |
112 |
|
|
rm -fr %{buildroot}%_prefix/README |
113 |
fwang |
307860 |
rm -fr %{buildroot}%_prefix/ANNOUNCEMENT |
114 |
|
|
rm -fr %{buildroot}%_prefix/Licenses_for_Third-Party_Components.txt |
115 |
spuhler |
816025 |
rm -f %{buildroot}%{_libdir}/libmysqlcppconn-static.a |
116 |
dmorgan |
56412 |
|
117 |
|
|
%files -n %{libname} |
118 |
ovitters |
877720 |
%{_libdir}/*.so.%{major}{,.*} |
119 |
dmorgan |
56412 |
|
120 |
|
|
%files -n %{develname} |
121 |
spuhler |
816025 |
%doc README ANNOUNCEMENT COPYING CHANGES examples |
122 |
dmorgan |
61363 |
%dir %{_includedir}/cppconn |
123 |
fwang |
307859 |
%{_includedir}/*.h |
124 |
|
|
%{_includedir}/cppconn/*.h |
125 |
|
|
%{_libdir}/*.so |
126 |
spuhler |
816025 |
|