42
42
%if 0%{?suse_version} == 1500
43
43
%global dist .sl15
44
44
%endif
45
- %define debug_package %{nil}
46
45
%global source_date_epoch_from_changelog 0
47
46
Summary: MySQL database connector for C++
48
47
Name: mysql-connector-c++%{?product_suffix}
@@ -77,6 +76,7 @@ Requires: mysql-community-client-plugins = %{version}
77
76
%endif
78
77
%description
79
78
A C++ interface for communicating with MySQL servers.
79
+
80
80
%package jdbc
81
81
Summary: MySQL Driver for C++ which mimics the JDBC 4.0 API
82
82
%{?commercial:Obsoletes: mysql-connector-c++-jdbc < %{version}-%{release}}
@@ -86,6 +86,7 @@ Provides: libmysqlcppconn7 = %{version}-%{release}
86
86
Provides: libmysqlcppconn-devel = %{version}-%{release}
87
87
%description jdbc
88
88
This MySQL Driver for C++ mimics the JDBC 4.0 API.
89
+
89
90
%package devel
90
91
Summary: Development header files and libraries for MySQL C++ client applications
91
92
%if 0%{?commercial}
@@ -100,6 +101,7 @@ Requires: mysql-connector-c++-jdbc = %{version}-%{release}
100
101
This package contains the development header files and libraries necessary
101
102
to develop MySQL client applications in C++.
102
103
%if 0%{?with_tests:1} && 0%{?with_gtest:1}
104
+
103
105
%package test
104
106
Summary: Regression tests for MySQL Connector/C++
105
107
%if 0%{?commercial}
@@ -115,14 +117,22 @@ This package contains the test files necessary to run regression
115
117
test suite for MySQL Connector/C++
116
118
%endif
117
119
%prep
120
+
118
121
%setup -q -n mysql-connector-c++%{product_suffix}-%{version}-src
119
122
%build
123
+
124
+ %{?el6:. /opt/rh/devtoolset-8/enable}
120
125
%{?el6:export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc}
121
126
%{?el6:export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++}
127
+
128
+ %{?el7:. /opt/rh/devtoolset-9/enable}
122
129
%{?el7:export CC=/opt/rh/devtoolset-9/root/usr/bin/gcc}
123
130
%{?el7:export CXX=/opt/rh/devtoolset-9/root/usr/bin/g++}
131
+
132
+ %{?el8:. /opt/rh/gcc-toolset-9/enable}
124
133
%{?el8:export CC=/opt/rh/gcc-toolset-9/root/usr/bin/gcc}
125
134
%{?el8:export CXX=/opt/rh/gcc-toolset-9/root/usr/bin/g++}
135
+
126
136
%if 0%{?with_tests:1} && 0%{?with_gtest:1}
127
137
%global __cmake_test_opts -DWITH_TESTS=1 -DWITH_GTEST=%{with_gtest}
128
138
%else
@@ -144,7 +154,12 @@ mkdir build-static && pushd build-static
144
154
%__cmake_cmd -DBUILD_STATIC=ON
145
155
make %{?_smp_mflags} VERBOSE=1
146
156
popd
157
+
147
158
%install
159
+ %{?el6:. /opt/rh/devtoolset-8/enable}
160
+ %{?el7:. /opt/rh/devtoolset-9/enable}
161
+ %{?el8:. /opt/rh/gcc-toolset-9/enable}
162
+
148
163
pushd build-dynamic
149
164
make DESTDIR=%{buildroot} install
150
165
%if 0%{?with_tests:1} && 0%{?with_gtest:1}
@@ -174,16 +189,23 @@ popd
174
189
# Add compat dir and remove unwanted file
175
190
ln -s mysql-cppconn-8 %{buildroot}%{_includedir}/mysql-cppconn
176
191
rm %{buildroot}/usr/{INFO_SRC,INFO_BIN}
192
+
177
193
%post -p /sbin/ldconfig
194
+
178
195
%postun -p /sbin/ldconfig
196
+
179
197
%post jdbc -p /sbin/ldconfig
198
+
180
199
%postun jdbc -p /sbin/ldconfig
200
+
181
201
%files
182
202
%doc README.txt LICENSE.txt INFO_SRC build-dynamic/INFO_BIN
183
203
%{_libdir}/libmysqlcppconn8.so.@ABI_VERSION_MAJOR@*
204
+
184
205
%files jdbc
185
206
%doc README.txt LICENSE.txt INFO_SRC build-dynamic/INFO_BIN
186
207
%{_libdir}/libmysqlcppconn.so.@JDBC_ABI_VERSION_MAJOR@*
208
+
187
209
%files devel
188
210
%doc README.txt LICENSE.txt INFO_SRC build-dynamic/INFO_BIN
189
211
%{_libdir}/libmysqlcppconn.so
@@ -196,6 +218,7 @@ rm %{buildroot}/usr/{INFO_SRC,INFO_BIN}
196
218
%{_includedir}/mysql-cppconn-8/mysql
197
219
%{_includedir}/mysql-cppconn-8/jdbc
198
220
%if 0%{?with_tests:1} && 0%{?with_gtest:1}
221
+
199
222
%files test
200
223
%dir %{_libdir}/mysql-cppconn-8
201
224
%dir %{_libdir}/mysql-cppconn-8/dynamic
@@ -205,6 +228,7 @@ rm %{buildroot}/usr/{INFO_SRC,INFO_BIN}
205
228
%{_libdir}/mysql-cppconn-8/static/run_unit_tests
206
229
%{_libdir}/mysql-cppconn-8/static/CTestTestfile.cmake
207
230
%endif
231
+
208
232
%changelog
209
233
* Tue Jun 30 2020 Sreedhar S <
[email protected] > - 8.0.22-1
210
234
- Updated the dependency list to use server's client-plugin package
0 commit comments