1 |
neoclust |
1769472 |
%define major8 2 |
2 |
|
|
%define libname8 %mklibname mysqlcppconn 8 %{major8} |
3 |
|
|
|
4 |
|
|
%define major 9 |
5 |
dmorgan |
56412 |
%define libname %mklibname mysqlcppconn %{major} |
6 |
|
|
|
7 |
neoclust |
1769472 |
%define develname %mklibname mysqlcppconn8 -d |
8 |
|
|
|
9 |
wally |
1419766 |
%ifarch aarch64 |
10 |
|
|
%global _smp_ncpus_max 4 |
11 |
|
|
%endif |
12 |
|
|
|
13 |
dmorgan |
56412 |
Summary: A MySQL database connector for C++ |
14 |
|
|
Name: mysql-connector-c++ |
15 |
daviddavid |
1935261 |
Version: 8.0.32 |
16 |
daviddavid |
1935262 |
Release: %mkrel 1 |
17 |
dmorgan |
56412 |
Group: System/Libraries |
18 |
barjac |
879272 |
License: GPLv2 |
19 |
daviddavid |
1935261 |
URL: https://dev.mysql.com/downloads/connector/cpp/ |
20 |
neoclust |
1769472 |
Source0: https://dev.mysql.com/get/Downloads/Connector-C++/%{name}-%{version}-src.tar.gz |
21 |
wally |
1419764 |
## from opensuse |
22 |
neoclust |
1769472 |
Patch3: mysql-connector-cpp-libmysql_dynamic_proxy_typos.patch |
23 |
|
|
Patch4: mysql-connector-cpp-mariadb.patch |
24 |
|
|
Patch7: mysql-connector-cpp-test-feature.patch |
25 |
|
|
|
26 |
dmorgan |
56412 |
BuildRequires: cmake |
27 |
|
|
BuildRequires: mysql-devel |
28 |
barjac |
879272 |
BuildRequires: boost-devel |
29 |
daviddavid |
1935262 |
BuildRequires: pkgconfig(RapidJSON) |
30 |
daviddavid |
1935261 |
BuildRequires: pkgconfig(liblz4) |
31 |
|
|
BuildRequires: pkgconfig(libzstd) |
32 |
|
|
BuildRequires: pkgconfig(protobuf) |
33 |
|
|
BuildRequires: pkgconfig(zlib) |
34 |
dmorgan |
56412 |
|
35 |
|
|
%description |
36 |
spuhler |
816025 |
MySQL Connector/C++ is a MySQL database connector for C++ development. The |
37 |
|
|
MySQL driver for C++ can be used to connect to MySQL from C++ applications. The |
38 |
|
|
driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. |
39 |
dmorgan |
56412 |
|
40 |
spuhler |
816025 |
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its |
41 |
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot |
42 |
|
|
connect to MySQL 4.1 or earlier. |
43 |
|
|
|
44 |
|
|
Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) |
45 |
|
|
offers the following advantages for C++ users: |
46 |
|
|
|
47 |
|
|
* Convenience of pure C++ - no C function calls |
48 |
|
|
* Support of a well designed API - JDBC 4.0 |
49 |
|
|
* Support of a commonly known and well documented API - JDBC 4.0 |
50 |
daviddavid |
1935261 |
* Support of the object oriented programming paradigm |
51 |
spuhler |
816025 |
* Shorter development times |
52 |
|
|
|
53 |
dmorgan |
56412 |
%package -n %{libname} |
54 |
|
|
Summary: The shared mysql-connector-cpp library |
55 |
barjac |
879272 |
Group: System/Libraries |
56 |
|
|
Provides: %{name} = %{version}-%{release} |
57 |
neoclust |
1769472 |
Provides: mysql-connector-cpp = %{version}-%{release} |
58 |
dmorgan |
56412 |
|
59 |
|
|
%description -n %{libname} |
60 |
spuhler |
816025 |
MySQL Connector/C++ is a MySQL database connector for C++ development. The |
61 |
|
|
MySQL driver for C++ can be used to connect to MySQL from C++ applications. The |
62 |
|
|
driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. |
63 |
dmorgan |
56412 |
|
64 |
spuhler |
816025 |
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its |
65 |
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot |
66 |
|
|
connect to MySQL 4.1 or earlier. |
67 |
dmorgan |
56412 |
|
68 |
spuhler |
816025 |
Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) |
69 |
|
|
offers the following advantages for C++ users: |
70 |
|
|
|
71 |
|
|
* Convenience of pure C++ - no C function calls |
72 |
|
|
* Support of a well designed API - JDBC 4.0 |
73 |
|
|
* Support of a commonly known and well documented API - JDBC 4.0 |
74 |
daviddavid |
1935261 |
* Support of the object oriented programming paradigm |
75 |
spuhler |
816025 |
* Shorter development times |
76 |
|
|
|
77 |
neoclust |
1769472 |
%package -n %{libname8} |
78 |
|
|
Summary: The shared mysql-connector-cpp library |
79 |
|
|
Group: System/Libraries |
80 |
|
|
|
81 |
|
|
%description -n %{libname8} |
82 |
|
|
MySQL Connector/C++ is a MySQL database connector for C++ development. The |
83 |
|
|
MySQL driver for C++ can be used to connect to MySQL from C++ applications. The |
84 |
|
|
driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. |
85 |
|
|
|
86 |
|
|
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its |
87 |
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot |
88 |
|
|
connect to MySQL 4.1 or earlier. |
89 |
|
|
|
90 |
|
|
Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) |
91 |
|
|
offers the following advantages for C++ users: |
92 |
|
|
|
93 |
|
|
* Convenience of pure C++ - no C function calls |
94 |
|
|
* Support of a well designed API - JDBC 4.0 |
95 |
|
|
* Support of a commonly known and well documented API - JDBC 4.0 |
96 |
daviddavid |
1935261 |
* Support of the object oriented programming paradigm |
97 |
neoclust |
1769472 |
* Shorter development times |
98 |
|
|
|
99 |
dmorgan |
56412 |
%package -n %{develname} |
100 |
|
|
Summary: Development library and header files for development with mysql-connector-cpp |
101 |
barjac |
879272 |
Group: Development/C++ |
102 |
neoclust |
1769472 |
Requires: %{libname} = %{version}-%{release} |
103 |
|
|
Requires: %{libname8} = %{version}-%{release} |
104 |
spuhler |
816025 |
Provides: %{name}-devel = %{version}-%{release} |
105 |
neoclust |
1769472 |
Provides: mysql-connector-cpp-devel = %{version}-%{release} |
106 |
dmorgan |
56412 |
|
107 |
|
|
%description -n %{develname} |
108 |
spuhler |
816025 |
MySQL Connector/C++ is a MySQL database connector for C++ development. The |
109 |
|
|
MySQL driver for C++ can be used to connect to MySQL from C++ applications. The |
110 |
|
|
driver mimics the JDBC 4.0 API. It implements a significant subset of JDBC 4.0. |
111 |
dmorgan |
56412 |
|
112 |
spuhler |
816025 |
The Driver for C++ is designed to work best with MySQL 5.1 or later. Note - its |
113 |
|
|
full functionality is not available when connecting to MySQL 5.0. You cannot |
114 |
|
|
connect to MySQL 4.1 or earlier. |
115 |
dmorgan |
56412 |
|
116 |
spuhler |
816025 |
Using MySQL Connector/C++ instead of the MySQL C API (MySQL Client Library) |
117 |
|
|
offers the following advantages for C++ users: |
118 |
|
|
|
119 |
|
|
* Convenience of pure C++ - no C function calls |
120 |
|
|
* Support of a well designed API - JDBC 4.0 |
121 |
|
|
* Support of a commonly known and well documented API - JDBC 4.0 |
122 |
daviddavid |
1935261 |
* Support of the object oriented programming paradigm |
123 |
spuhler |
816025 |
* Shorter development times |
124 |
|
|
|
125 |
dmorgan |
56412 |
%prep |
126 |
neoclust |
1769472 |
%autosetup -n %{name}-%{version}-src -p1 |
127 |
wally |
1419764 |
|
128 |
neoclust |
1769472 |
chmod -x jdbc/examples/*.{cpp,txt} |
129 |
dmorgan |
56455 |
|
130 |
daviddavid |
1935261 |
# drop bundled stuff |
131 |
|
|
rm -rf cdk/extra/protobuf/protobuf-*/ |
132 |
|
|
rm -rf cdk/extra/rapidjson/include/ |
133 |
|
|
rm -rf cdk/extra/lz4/ |
134 |
|
|
rm -rf cdk/extra/zlib/ |
135 |
|
|
rm -rf cdk/extra/zstd/ |
136 |
|
|
|
137 |
dmorgan |
56455 |
# Save examples to keep directory clean (for doc) |
138 |
neoclust |
1769472 |
cp -apr jdbc/examples examples |
139 |
|
|
rm -rf examples/CMakeLists.txt |
140 |
dmorgan |
56455 |
|
141 |
dmorgan |
56412 |
%build |
142 |
neoclust |
1769472 |
export CXXFLAGS="%{build_cxxflags} -Wno-deprecated-declarations" |
143 |
daviddavid |
1935308 |
export LDFLAGS="%{ldflages} -lpthread" |
144 |
wally |
1419767 |
%cmake \ |
145 |
neoclust |
1769472 |
-DMYSQL_INCLUDE_DIR=%{_includedir}/mysql \ |
146 |
|
|
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \ |
147 |
|
|
-DMYSQL_LIB=%{_libdir}/libmysqlclient.so \ |
148 |
daviddavid |
1935261 |
-DBUNDLE_DEPENDENCIES=OFF \ |
149 |
|
|
-DWITH_PROTOBUF=system \ |
150 |
|
|
-DWITH_LZ4=system \ |
151 |
neoclust |
1769472 |
-DWITH_SSL=system \ |
152 |
daviddavid |
1935261 |
-DWITH_ZLIB=system \ |
153 |
|
|
-DWITH_ZSTD=system \ |
154 |
neoclust |
1769472 |
-DWITH_JDBC=ON \ |
155 |
|
|
-DMYSQLCLIENT_STATIC_BINDING=OFF \ |
156 |
|
|
-DMYSQLCLIENT_STATIC_LINKING=OFF \ |
157 |
|
|
-DDEBUG_PREFIX_MAP=OFF |
158 |
wally |
1474104 |
%cmake_build |
159 |
dmorgan |
56412 |
|
160 |
|
|
%install |
161 |
wally |
1474104 |
%cmake_install |
162 |
dmorgan |
56412 |
|
163 |
neoclust |
1769472 |
mv -f %{buildroot}%{_prefix}/INFO_* . |
164 |
|
|
|
165 |
|
|
%files -n %{libname8} |
166 |
|
|
%license LICENSE* INFO_BIN |
167 |
|
|
%{_libdir}/libmysqlcppconn8.so.%{major8}{,.*} |
168 |
|
|
|
169 |
dmorgan |
56412 |
%files -n %{libname} |
170 |
neoclust |
1769472 |
%license LICENSE* INFO_BIN |
171 |
|
|
%{_libdir}/libmysqlcppconn.so.%{major}{,.*} |
172 |
dmorgan |
56412 |
|
173 |
|
|
%files -n %{develname} |
174 |
neoclust |
1769472 |
%doc README* CONTRIBUTING* examples |
175 |
|
|
%{_includedir}/mysqlx/ |
176 |
|
|
%{_includedir}/jdbc/ |
177 |
|
|
%{_includedir}/mysql/jdbc.h |
178 |
|
|
%{_libdir}/libmysqlcppconn.so |
179 |
|
|
%{_libdir}/libmysqlcppconn8.so |