Browse Source

Stefan Fiedler:


			
			
				rocklinux
			
			
		
Stefan Fiedler 18 years ago
parent
commit
d27da16c38
2 changed files with 22 additions and 16 deletions
  1. +19
    -13
      package/base/mysql/mysql.conf
  2. +3
    -3
      package/base/mysql/mysql.init

+ 19
- 13
package/base/mysql/mysql.conf

@ -31,28 +31,34 @@ var_append extraconfopt " " "--with-ndbcluster"
var_append extraconfopt " " "--with-embedded-server" var_append extraconfopt " " "--with-embedded-server"
if [ $prefix_auto = 1 ] ; then if [ $prefix_auto = 1 ] ; then
prefix="opt/mysql"
prefix="opt/$xpkg"
set_confopt set_confopt
else
$localstatedir="$root/var/$xpkg"
fi fi
pkg_mysql_postmake() { pkg_mysql_postmake() {
cat << EOT > /var/adm/parse-config/mysql
cat << EOT > /var/adm/parse-config/$xpkg
var_append extraconfopt " " "--with-mysql-lib=/$prefix/lib/mysql" var_append extraconfopt " " "--with-mysql-lib=/$prefix/lib/mysql"
var_append extraconfopt " " "--with-mysql-include=/$prefix/include/mysql" var_append extraconfopt " " "--with-mysql-include=/$prefix/include/mysql"
pkg_mysql_prefix=/$prefix pkg_mysql_prefix=/$prefix
EOT EOT
ln -svf $libdir/mysql/*.{a,la,so}* $libdir/ ln -svf $libdir/mysql/*.{a,la,so}* $libdir/
}
postmake="pkg_mysql_postmake"
hook_add postmake 3 "install_init mysql $confdir/mysql.init"
install_init $xpkg $confdir/mysql.init
}
pkg_mysql_preconf() {
aclocal
autoheader
libtoolize --automake --force
automake
autoconf
pkg_mysql_postinstall() {
# build_this_package automatically creates this directory and
# removes it before postinstall hooks are evaluated because it is
# empty. So we can only create it here or in a prepare hook.
if [ -e $localstatedir ] ; then
touch $localstatedir
else
mkdir -vp $localstatedir
fi
chown -v mysql:mysql $localstatedir
} }
preconf="pkg_mysql_preconf"
hook_add postmake 3 pkg_mysql_postmake
hook_add postinstall 3 pkg_mysql_postinstall

+ 3
- 3
package/base/mysql/mysql.init

@ -29,15 +29,15 @@
main_begin main_begin
block_begin(start, `Starting MySQL Server.') block_begin(start, `Starting MySQL Server.')
check(`(D_prefix/bin/mysqld_safe >/dev/null 2>&1 &)')
check(`(D_prefix/bin/mysqld_safe >/dev/null 2>&1 )')
block_end block_end
block_begin(stop, `Stopping MySQL Server.') block_begin(stop, `Stopping MySQL Server.')
check(`killall D_prefix/libexec/mysqld')
check(`killall D_prefix/bin/mysqld_safe')
block_end block_end
block_begin(restart, `Restarting MySQL Server.') block_begin(restart, `Restarting MySQL Server.')
check(`killall -1 D_prefix/libexec/mysqld')
check(`killall -1 D_prefix/bin/mysqld_safe')
block_end block_end
main_end main_end

Loading…
Cancel
Save