Skip to content

Commit 1ce62ac

Browse files
committed
Merge branch 'wl14113-test' into release/8.0.22
2 parents 3bf8f2d + 0bec1c6 commit 1ce62ac

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

packaging/mysql-connector-c++.spec.in

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
%if 0%{?suse_version} == 1500
4343
%global dist .sl15
4444
%endif
45-
%define debug_package %{nil}
4645
%global source_date_epoch_from_changelog 0
4746
Summary: MySQL database connector for C++
4847
Name: mysql-connector-c++%{?product_suffix}
@@ -77,6 +76,7 @@ Requires: mysql-community-client-plugins = %{version}
7776
%endif
7877
%description
7978
A C++ interface for communicating with MySQL servers.
79+
8080
%package jdbc
8181
Summary: MySQL Driver for C++ which mimics the JDBC 4.0 API
8282
%{?commercial:Obsoletes: mysql-connector-c++-jdbc < %{version}-%{release}}
@@ -86,6 +86,7 @@ Provides: libmysqlcppconn7 = %{version}-%{release}
8686
Provides: libmysqlcppconn-devel = %{version}-%{release}
8787
%description jdbc
8888
This MySQL Driver for C++ mimics the JDBC 4.0 API.
89+
8990
%package devel
9091
Summary: Development header files and libraries for MySQL C++ client applications
9192
%if 0%{?commercial}
@@ -100,6 +101,7 @@ Requires: mysql-connector-c++-jdbc = %{version}-%{release}
100101
This package contains the development header files and libraries necessary
101102
to develop MySQL client applications in C++.
102103
%if 0%{?with_tests:1} && 0%{?with_gtest:1}
104+
103105
%package test
104106
Summary: Regression tests for MySQL Connector/C++
105107
%if 0%{?commercial}
@@ -115,14 +117,22 @@ This package contains the test files necessary to run regression
115117
test suite for MySQL Connector/C++
116118
%endif
117119
%prep
120+
118121
%setup -q -n mysql-connector-c++%{product_suffix}-%{version}-src
119122
%build
123+
124+
%{?el6:. /opt/rh/devtoolset-8/enable}
120125
%{?el6:export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc}
121126
%{?el6:export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++}
127+
128+
%{?el7:. /opt/rh/devtoolset-9/enable}
122129
%{?el7:export CC=/opt/rh/devtoolset-9/root/usr/bin/gcc}
123130
%{?el7:export CXX=/opt/rh/devtoolset-9/root/usr/bin/g++}
131+
132+
%{?el8:. /opt/rh/gcc-toolset-9/enable}
124133
%{?el8:export CC=/opt/rh/gcc-toolset-9/root/usr/bin/gcc}
125134
%{?el8:export CXX=/opt/rh/gcc-toolset-9/root/usr/bin/g++}
135+
126136
%if 0%{?with_tests:1} && 0%{?with_gtest:1}
127137
%global __cmake_test_opts -DWITH_TESTS=1 -DWITH_GTEST=%{with_gtest}
128138
%else
@@ -144,7 +154,12 @@ mkdir build-static && pushd build-static
144154
%__cmake_cmd -DBUILD_STATIC=ON
145155
make %{?_smp_mflags} VERBOSE=1
146156
popd
157+
147158
%install
159+
%{?el6:. /opt/rh/devtoolset-8/enable}
160+
%{?el7:. /opt/rh/devtoolset-9/enable}
161+
%{?el8:. /opt/rh/gcc-toolset-9/enable}
162+
148163
pushd build-dynamic
149164
make DESTDIR=%{buildroot} install
150165
%if 0%{?with_tests:1} && 0%{?with_gtest:1}
@@ -174,16 +189,23 @@ popd
174189
# Add compat dir and remove unwanted file
175190
ln -s mysql-cppconn-8 %{buildroot}%{_includedir}/mysql-cppconn
176191
rm %{buildroot}/usr/{INFO_SRC,INFO_BIN}
192+
177193
%post -p /sbin/ldconfig
194+
178195
%postun -p /sbin/ldconfig
196+
179197
%post jdbc -p /sbin/ldconfig
198+
180199
%postun jdbc -p /sbin/ldconfig
200+
181201
%files
182202
%doc README.txt LICENSE.txt INFO_SRC build-dynamic/INFO_BIN
183203
%{_libdir}/libmysqlcppconn8.so.@ABI_VERSION_MAJOR@*
204+
184205
%files jdbc
185206
%doc README.txt LICENSE.txt INFO_SRC build-dynamic/INFO_BIN
186207
%{_libdir}/libmysqlcppconn.so.@JDBC_ABI_VERSION_MAJOR@*
208+
187209
%files devel
188210
%doc README.txt LICENSE.txt INFO_SRC build-dynamic/INFO_BIN
189211
%{_libdir}/libmysqlcppconn.so
@@ -196,6 +218,7 @@ rm %{buildroot}/usr/{INFO_SRC,INFO_BIN}
196218
%{_includedir}/mysql-cppconn-8/mysql
197219
%{_includedir}/mysql-cppconn-8/jdbc
198220
%if 0%{?with_tests:1} && 0%{?with_gtest:1}
221+
199222
%files test
200223
%dir %{_libdir}/mysql-cppconn-8
201224
%dir %{_libdir}/mysql-cppconn-8/dynamic
@@ -205,6 +228,7 @@ rm %{buildroot}/usr/{INFO_SRC,INFO_BIN}
205228
%{_libdir}/mysql-cppconn-8/static/run_unit_tests
206229
%{_libdir}/mysql-cppconn-8/static/CTestTestfile.cmake
207230
%endif
231+
208232
%changelog
209233
* Tue Jun 30 2020 Sreedhar S <[email protected]> - 8.0.22-1
210234
- Updated the dependency list to use server's client-plugin package

0 commit comments

Comments
 (0)