/[packages]/updates/8/mysql-connector-c++/current/SPECS/mysql-connector-c++.spec
ViewVC logotype

Contents of /updates/8/mysql-connector-c++/current/SPECS/mysql-connector-c++.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1935329 - (show annotations) (download)
Mon Jan 23 19:19:36 2023 UTC (14 months, 3 weeks ago) by daviddavid
File size: 6262 byte(s)
SILENT: add patch to fix linking issue

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

  ViewVC Help
Powered by ViewVC 1.1.30