Commit e715b761 authored by Jonathan Perkin's avatar Jonathan Perkin

Complete support for OL/RH6.

parent 3690fa63
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
%if "%elver" == "6" %if "%elver" == "6"
%define distro_description Oracle Linux 6 %define distro_description Oracle Linux 6
%define distro_releasetag el6 %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 %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools
%else %else
%{error:Oracle Linux %{elver} is unsupported} %{error:Oracle Linux %{elver} is unsupported}
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
%if "%rhelver" == "6" %if "%rhelver" == "6"
%define distro_description Red Hat Enterprise Linux 6 %define distro_description Red Hat Enterprise Linux 6
%define distro_releasetag rhel6 %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 %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools
%else %else
%{error:Red Hat Enterprise Linux %{rhelver} is unsupported} %{error:Red Hat Enterprise Linux %{rhelver} is unsupported}
...@@ -463,25 +463,6 @@ mkdir release ...@@ -463,25 +463,6 @@ mkdir release
make ${MAKE_JFLAG} VERBOSE=1 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 %install
...@@ -504,6 +485,23 @@ install -d $RBR%{_sbindir} ...@@ -504,6 +485,23 @@ install -d $RBR%{_sbindir}
make DESTDIR=$RBR install 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: 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: directly into %{_libdir}/mysql - perhaps at the same time as renaming
# FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax # FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax
...@@ -1153,6 +1151,13 @@ echo "=====" >> $STATUS_HISTORY ...@@ -1153,6 +1151,13 @@ echo "=====" >> $STATUS_HISTORY
# merging BK trees) # merging BK trees)
############################################################################## ##############################################################################
%changelog %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> * Tue Sep 13 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
- "make_win_bin_dist" and its manual are dropped, cmake does it different. - "make_win_bin_dist" and its manual are dropped, cmake does it different.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment