34
34
%{!?compilation_comment_debug: %global compilation_comment_debug MySQL Community Server - Debug (GPL)}
35
35
%{!?src_base: %global src_base mysql}
36
36
37
+ %if 0%{?fedora} < 27
37
38
%global compatver 5.6.37
38
39
%global compatlib 18
39
40
%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.6/mysql-%{compatver}.tar.gz
41
+ %endif
40
42
41
43
%global src_dir %{src_base}-%{version}
42
-
43
- # No debuginfo for now, ships /usr/sbin/mysqld-debug and libmysqlcliet-debug.a
44
+ # No debuginfo for now
44
45
%if 0%{?nodebuginfo}
45
46
%global _enable_debug_package 0
46
47
%global debug_package %{nil}
@@ -65,7 +66,9 @@ Release: 1%{?dist}
65
66
License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{?license_type} license as shown in the Description field.
66
67
Source0: https://cdn.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz
67
68
Source1: http://downloads.sourceforge.net/boost/@
[email protected]
69
+ %if 0%{?compatlib}
68
70
Source2: %{compatsrc}
71
+ %endif
69
72
URL: http://www.mysql.com/
70
73
Packager: MySQL Release Engineering <
[email protected] >
71
74
Vendor: %{mysql_vendor}
@@ -136,6 +139,11 @@ Obsoletes: mariadb-galera-server
136
139
Obsoletes: mariadb-server-galera
137
140
Obsoletes: community-mysql-server < %{version}-%{release}
138
141
Obsoletes: mysql-server < %{version}-%{release}
142
+ %if 0%{?compatlib}
143
+ %else
144
+ Obsoletes: mysql-community-embedded-compat < 5.7.20
145
+ Obsoletes: mysql-community-libs-compat < 5.7.20
146
+ %endif
139
147
Provides: mysql-server = %{version}-%{release}
140
148
Provides: mysql-server%{?_isa} = %{version}-%{release}
141
149
Provides: mysql-compat-server = %{version}-%{release}
@@ -190,9 +198,11 @@ Group: Applications/Databases
190
198
%if 0%{?commercial}
191
199
Obsoletes: mysql-community-common < %{version}-%{release}
192
200
%endif
201
+ %if 0%{?compatlib}
193
202
Obsoletes: mariadb-common
194
- Obsoletes: mariadb-config
195
203
Obsoletes: mariadb-errmsg
204
+ %endif # compatlib
205
+ Obsoletes: mariadb-config
196
206
Obsoletes: community-mysql-common < %{version}-%{release}
197
207
Obsoletes: community-mysql-errmsg < %{version}-%{release}
198
208
Obsoletes: mysql-common < %{version}-%{release}
@@ -252,7 +262,9 @@ Requires: mysql-commercial-common%{?_isa} >= %{min}
252
262
%else
253
263
Requires: mysql-community-common%{?_isa} >= %{min}
254
264
%endif
265
+ %if 0%{?compatlib}
255
266
Obsoletes: mariadb-libs
267
+ %endif # compatlib
256
268
Obsoletes: community-mysql-libs < %{version}-%{release}
257
269
Obsoletes: mysql-libs < %{version}-%{release}
258
270
Provides: mysql-libs = %{version}-%{release}
@@ -262,6 +274,7 @@ Provides: mysql-libs%{?_isa} = %{version}-%{release}
262
274
This package contains the shared libraries for MySQL client
263
275
applications.
264
276
277
+ %if 0%{?compatlib}
265
278
%package libs-compat
266
279
Summary: Shared compat libraries for MySQL %{compatver} database client applications
267
280
Group: Applications/Databases
@@ -279,6 +292,7 @@ Requires: mysql-community-libs%{?_isa} >= %{min}
279
292
%description libs-compat
280
293
This package contains the shared compat libraries for MySQL %{compatver} client
281
294
applications.
295
+ %endif # compatlib
282
296
283
297
%package embedded
284
298
Summary: MySQL embedded library
@@ -289,7 +303,9 @@ Requires: mysql-commercial-common%{?_isa} = %{version}-%{release}
289
303
%else
290
304
Requires: mysql-community-common%{?_isa} = %{version}-%{release}
291
305
%endif
306
+ %if 0%{?compatlib}
292
307
Obsoletes: mariadb-embedded
308
+ %endif
293
309
Obsoletes: community-mysql-embedded < %{version}-%{release}
294
310
Obsoletes: mysql-embedded < %{version}-%{release}
295
311
Provides: mysql-embedded = %{version}-%{release}
@@ -307,6 +323,7 @@ client/server version.
307
323
308
324
For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
309
325
326
+ %if 0%{?compatlib}
310
327
%package embedded-compat
311
328
Summary: MySQL embedded compat library
312
329
Group: Applications/Databases
@@ -320,6 +337,7 @@ Requires: mysql-community-common%{?_isa} >= %{min}
320
337
%description embedded-compat
321
338
This package contains the MySQL server as an embedded library with
322
339
compatibility for applications using version %{compatlib} of the library.
340
+ %endif # compatlib
323
341
324
342
%package embedded-devel
325
343
Summary: Development header files and libraries for MySQL as an embeddable library
@@ -343,7 +361,11 @@ This package contains files needed for developing applications using
343
361
the embedded version of the MySQL server.
344
362
345
363
%prep
364
+ %if 0%{?compatlib}
346
365
%setup -q -T -a 0 -a 1 -a 2 -c -n %{src_dir}
366
+ %else
367
+ %setup -q -T -a 0 -a 1 -c -n %{src_dir}
368
+ %endif # 0%{?compatlib}
347
369
348
370
%build
349
371
# Fail quickly and obviously if user tries to build as root
357
379
%endif
358
380
359
381
# Build compat libs
382
+ %if 0%{?compatlib}
360
383
(
361
384
pushd mysql-%{compatver}
362
385
mkdir build && pushd build
381
404
echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG
382
405
make %{?_smp_mflags} VERBOSE=1
383
406
)
407
+ %endif # compatlib
384
408
385
409
# Build debug versions of mysqld and libmysqld.a
386
410
mkdir debug
@@ -447,11 +471,13 @@ mkdir release
447
471
448
472
%install
449
473
# Install compat libs
474
+ %if 0%{?compatlib}
450
475
for dir in libmysql libmysqld ; do
451
476
pushd mysql-%{compatver}/build/$dir
452
477
make DESTDIR=%{buildroot} install
453
478
popd
454
479
done
480
+ %endif # compatlib
455
481
rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient{,_r}.{a,la,so}
456
482
rm -f %{buildroot}%{_libdir}/mysql/libmysqld.{a,la,so}
457
483
@@ -743,6 +769,7 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
743
769
%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
744
770
%{_libdir}/mysql/libmysqlclient.so.20*
745
771
772
+ %if 0%{?compatlib}
746
773
%files libs-compat
747
774
%defattr(-, root, root, -)
748
775
%doc %{?license_files_server}
@@ -752,6 +779,7 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
752
779
%{_libdir}/mysql/libmysqlclient.so.%{compatlib}.*.0
753
780
%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}
754
781
%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}.*.0
782
+ %endif # compatlib
755
783
756
784
%files test
757
785
%defattr(-, root, root, -)
@@ -832,12 +860,14 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
832
860
%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
833
861
%attr(755, root, root) %{_libdir}/mysql/libmysqld.so.20*
834
862
863
+ %if 0%{?compatlib}
835
864
%files embedded-compat
836
865
%defattr(-, root, root, -)
837
866
%doc %{?license_files_server}
838
867
%dir %attr(755, root, root) %{_libdir}/mysql
839
868
%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
840
869
%attr(755, root, root) %{_libdir}/mysql/libmysqld.so.18*
870
+ %endif # compatlib
841
871
842
872
%files embedded-devel
843
873
%defattr(-, root, root, -)
0 commit comments