diff options
author | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-04-08 15:21:31 +0200 |
---|---|---|
committer | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-04-08 15:21:31 +0200 |
commit | 44c542c3039306093086577397087f0d2a2c01a1 (patch) | |
tree | 257106ab90e4cf306f10946c4dc4f2af5f7c39e8 /support-files | |
parent | 37ca19e01fb652faaf5123d3b039b857fcf32e47 (diff) | |
download | mariadb-git-44c542c3039306093086577397087f0d2a2c01a1.tar.gz |
Fix gcc check, SuSE doesn't print (GCC) anywhere. Get rid of
WITH_LIBGCC %define, it isn't subject to shell rules and is
parsed anyway. Instead create a file with optional files to
include.
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/mysql.spec.sh | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 8dba4fb4277..f7fe9f598b4 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -68,9 +68,6 @@ %undefine __perl_provides %undefine __perl_requires -# Variables which need to be global so they can be changed during phases. -%global WITH_LIBGCC 0 - ############################################################################## # Command line handling ############################################################################## @@ -340,6 +337,9 @@ client/server version. # Be strict about variables, bail at earliest opportunity, etc. set -eu +# Optional files to include +touch optional-server-files + # # Set environment in order of preference, MYSQL_BUILD_* first, then variable # name, finally a default. RPM_OPT_FLAGS is assumed to be a part of the @@ -400,14 +400,14 @@ RBR=$RPM_BUILD_ROOT # For gcc builds, include libgcc.a in the devel subpackage (BUG 4921). This # needs to be during build phase as $CC is not set during install. -if "$CC" --version | grep '(GCC)' >/dev/null 2>&1 +if "$CC" -v | grep '^gcc.version' >/dev/null 2>&1 then libgcc=`$CC $CFLAGS --print-libgcc-file` if [ -f $libgcc ] then - %define WITH_LIBGCC 1 mkdir -p $RBR%{_libdir}/mysql install -m 644 $libgcc $RBR%{_libdir}/mysql/libmygcc.a + echo "%{_libdir}/mysql/libmygcc.a" >>optional-server-files fi fi @@ -645,7 +645,7 @@ fi # Files section ############################################################################## -%files server +%files server -f optional-server-files %defattr(-,root,root,0755) %doc %{src_dir}/COPYING @@ -832,9 +832,6 @@ fi %dir %attr(755, root, root) %{_libdir}/mysql %{_includedir}/mysql/* %{_datadir}/aclocal/mysql.m4 -%if %{WITH_LIBGCC} -%{_libdir}/mysql/libmygcc.a -%endif %{_libdir}/mysql/libmysqlclient.a %{_libdir}/mysql/libmysqlclient_r.a %{_libdir}/mysql/libmysqlservices.a |