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