summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorJonathan Perkin <jonathan.perkin@oracle.com>2011-09-13 16:18:57 +0200
committerJonathan Perkin <jonathan.perkin@oracle.com>2011-09-13 16:18:57 +0200
commite715b761ad520e0bae8edf05c26ad8cd20969f22 (patch)
treeca6f5ce8a00947ea51650c2db0506acec4524bb9 /support-files
parent3690fa63e3c5be50a2d7b276cff24f26f06fb6f5 (diff)
downloadmariadb-git-e715b761ad520e0bae8edf05c26ad8cd20969f22.tar.gz
Complete support for OL/RH6.
Diffstat (limited to 'support-files')
-rw-r--r--support-files/mysql.spec.sh47
1 files changed, 26 insertions, 21 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 78211a4bc38..19595f228ef 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -144,7 +144,7 @@
%if "%elver" == "6"
%define distro_description Oracle Linux 6
%define distro_releasetag el6
- %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
+ %define distro_buildreq gcc-c++ ncurses-devel perl readline-devel time zlib-devel
%define distro_requires chkconfig coreutils grep procps shadow-utils net-tools
%else
%{error:Oracle Linux %{elver} is unsupported}
@@ -167,7 +167,7 @@
%if "%rhelver" == "6"
%define distro_description Red Hat Enterprise Linux 6
%define distro_releasetag rhel6
- %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
+ %define distro_buildreq gcc-c++ ncurses-devel perl readline-devel time zlib-devel
%define distro_requires chkconfig coreutils grep procps shadow-utils net-tools
%else
%{error:Red Hat Enterprise Linux %{rhelver} is unsupported}
@@ -463,25 +463,6 @@ mkdir release
make ${MAKE_JFLAG} VERBOSE=1
)
-# Use the build root for temporary storage of the shared libraries.
-RBR=$RPM_BUILD_ROOT
-
-# Clean up the BuildRoot first
-[ "$RBR" != "/" ] && [ -d "$RBR" ] && rm -rf "$RBR";
-
-# 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" -v 2>&1 | grep '^gcc.version' >/dev/null 2>&1
-then
- libgcc=`$CC $CFLAGS --print-libgcc-file`
- if [ -f $libgcc ]
- then
- mkdir -p $RBR%{_libdir}/mysql
- install -m 644 $libgcc $RBR%{_libdir}/mysql/libmygcc.a
- echo "%{_libdir}/mysql/libmygcc.a" >>optional-files-devel
- fi
-fi
-
##############################################################################
%install
@@ -504,6 +485,23 @@ install -d $RBR%{_sbindir}
make DESTDIR=$RBR install
)
+# For gcc builds, include libgcc.a in the devel subpackage (BUG 4921). Do
+# this in a sub-shell to ensure we don't pollute the install environment
+# with compiler bits.
+(
+ PATH=${MYSQL_BUILD_PATH:-$PATH}
+ CC=${MYSQL_BUILD_CC:-${CC:-gcc}}
+ CFLAGS=${MYSQL_BUILD_CFLAGS:-${CFLAGS:-$RPM_OPT_FLAGS}}
+ if "${CC}" -v 2>&1 | grep '^gcc.version' >/dev/null 2>&1; then
+ libgcc=`${CC} ${CFLAGS} --print-libgcc-file`
+ if [ -f ${libgcc} ]; then
+ mkdir -p $RBR%{_libdir}/mysql
+ install -m 644 ${libgcc} $RBR%{_libdir}/mysql/libmygcc.a
+ echo "%{_libdir}/mysql/libmygcc.a" >>optional-files-devel
+ fi
+ fi
+)
+
# FIXME: at some point we should stop doing this and just install everything
# FIXME: directly into %{_libdir}/mysql - perhaps at the same time as renaming
# FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax
@@ -1153,6 +1151,13 @@ echo "=====" >> $STATUS_HISTORY
# merging BK trees)
##############################################################################
%changelog
+* Tue Sep 13 2011 Jonathan Perkin <jonathan.perkin@oracle.com>
+
+- Add support for Oracle Linux 6 and Red Hat Enterprise Linux 6. Due to
+ changes in RPM behaviour ($RPM_BUILD_ROOT is removed prior to %install)
+ this necessitated a move of the libmygcc.a installation from %build to
+ %install, which is probably where it belonged in the first place.
+
* Tue Sep 13 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
- "make_win_bin_dist" and its manual are dropped, cmake does it different.