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