summaryrefslogtreecommitdiff
path: root/support-files/mysql.spec.sh
diff options
context:
space:
mode:
Diffstat (limited to 'support-files/mysql.spec.sh')
-rw-r--r--support-files/mysql.spec.sh40
1 files changed, 27 insertions, 13 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 3fd602dd818..ea09c4f8cc7 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -17,6 +17,7 @@ Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql
Icon: mysql.gif
URL: http://www.mysql.com/
Packager: David Axmark <david@mysql.com>
+Vendor: MySQL AB
Provides: msqlormysql MySQL-server
Obsoletes: mysql
@@ -133,10 +134,10 @@ Summary: MySQL - server with Berkeley DB and Innodb support
Group: Applications/Databases
Obsoletes: mysql-Max
-%description Max
-Extra MySQL server binary to get support extra features like
-transactional tables. To active these features on only have to install
-this package after the server package.
+%description Max
+Optional MySQL server binary that supports features
+like transactional tables. To active this binary, just install this
+package after the MySQL package.
%prep
%setup -n mysql-%{mysql_version}
@@ -151,11 +152,11 @@ BuildMySQL() {
# support assembler speedups.
sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
CC=\"${MYSQL_BUILD_CC:-egcs}\" \
- CFLAGS=\"${MYSQL_BUILD_CFLAGS:- -O6 -fno-omit-frame-pointer}\" \
+ CFLAGS=\"${MYSQL_BUILD_CFLAGS:- -O3}\" \
CXX=\"${MYSQL_BUILD_CXX:-egcs}\" \
- CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:- -O6 \
+ CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:- -O3 \
-felide-constructors -fno-exceptions -fno-rtti \
- -fno-omit-frame-pointer}\" \
+ }\" \
./configure \
$* \
--enable-assembler \
@@ -211,6 +212,9 @@ mv Docs/manual.ps Docs/manual.ps.save
make distclean
mv Docs/manual.ps.save Docs/manual.ps
+# RPM:s destroys Makefile.in files, so we generate them here
+automake
+
BuildMySQL "--disable-shared" \
"--with-mysqld-ldflags='-all-static'" \
"--with-client-ldflags='-all-static'" \
@@ -295,15 +299,25 @@ chmod -R og-rw $mysql_datadir/mysql
# Allow safe_mysqld to start mysqld and print a message before we exit
sleep 2
+%post Max
+# Restart mysqld, to use the new binary.
+# There may be a better way to handle this.
+/etc/rc.d/init.d/mysql stop > /dev/null 2>&1
+echo "Giving mysqld a couple of seconds to restart"
+sleep 5
+/etc/rc.d/init.d/mysql start
+sleep 2
+
%preun
-if test -x /etc/rc.d/init.d/mysql
-then
- /etc/rc.d/init.d/mysql stop > /dev/null
-fi
-# Remove autostart of mysql
if test $1 = 0
then
- /sbin/chkconfig --del mysql
+ if test -x /etc/rc.d/init.d/mysql
+ then
+ /etc/rc.d/init.d/mysql stop > /dev/null
+ fi
+
+ # Remove autostart of mysql
+ /sbin/chkconfig --del mysql
fi
# We do not remove the mysql user since it may still own a lot of
# database files.