/[gentoo-x86]/eclass/mysql.eclass
Gentoo

Diff of /eclass/mysql.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.23 Revision 1.25
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/mysql.eclass,v 1.23 2006/03/09 12:37:01 vivo Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/mysql.eclass,v 1.25 2006/03/16 20:39:00 vivo Exp $
4 4
5# Author: Francesco Riosa <vivo at gentoo.org> 5# Author: Francesco Riosa <vivo at gentoo.org>
6# Maintainer: Francesco Riosa <vivo at gentoo.org> 6# Maintainer: Francesco Riosa <vivo at gentoo.org>
7 7
8inherit eutils flag-o-matic gnuconfig autotools mysql_fx 8inherit eutils flag-o-matic gnuconfig autotools mysql_fx
440 "${FILESDIR}/my.cnf-4.1-r1" \ 440 "${FILESDIR}/my.cnf-4.1-r1" \
441 > "${TMPDIR}/my.cnf.ok" 441 > "${TMPDIR}/my.cnf.ok"
442 newins "${TMPDIR}/my.cnf.ok" my.cnf 442 newins "${TMPDIR}/my.cnf.ok" my.cnf
443 443
444 insinto "/etc/conf.d" 444 insinto "/etc/conf.d"
445 newins "${FILESDIR}/mysql-slot.conf.d-r1" "mysql" 445 newins "${FILESDIR}/mysql.conf.d-r1" "mysql"
446 mysql_version_is_at_least "5.00.11.00" \ 446 mysql_version_is_at_least "5.00.11.00" \
447 && newins "${FILESDIR}/mysqlmanager-slot.conf.d" "mysqlmanager" 447 && newins "${FILESDIR}/mysqlmanager.conf.d" "mysqlmanager"
448 448
449 # minimal builds don't have the server 449 # minimal builds don't have the server
450 if ! useq minimal; then 450 if ! useq minimal; then
451 exeinto /etc/init.d 451 exeinto /etc/init.d
452 newexe "${FILESDIR}/mysql-slot.rc6-r3" "mysql" 452 newexe "${FILESDIR}/mysql.rc6-r3" "mysql"
453 453
454 mysql_version_is_at_least "5.00.11.00" \ 454 mysql_version_is_at_least "5.00.11.00" \
455 && newexe "${FILESDIR}/mysqlmanager-slot.rc6" "mysqlmanager" 455 && newexe "${FILESDIR}/mysqlmanager.rc6" "mysqlmanager"
456 insinto /etc/logrotate.d 456 insinto /etc/logrotate.d
457 sed -e "s!___MY_SUFFIX___!${MY_SUFFIX}!g" \ 457 sed -e "s!___MY_SUFFIX___!${MY_SUFFIX}!g" \
458 "${FILESDIR}/logrotate-slot.mysql" \ 458 "${FILESDIR}/logrotate-slot.mysql" \
459 > "${TMPDIR}/logrotate.mysql" 459 > "${TMPDIR}/logrotate.mysql"
460 newins "${TMPDIR}/logrotate.mysql" "mysql${MY_SUFFIX}" 460 newins "${TMPDIR}/logrotate.mysql" "mysql${MY_SUFFIX}"
518 echo "${MY_SYSCONFDIR#"/"}" >> "${filelist}" 518 echo "${MY_SYSCONFDIR#"/"}" >> "${filelist}"
519 echo "${MY_LIBDIR#"/"}" >> "${filelist}" 519 echo "${MY_LIBDIR#"/"}" >> "${filelist}"
520 echo "${MY_SHAREDSTATEDIR#"/"}" >> "${filelist}" 520 echo "${MY_SHAREDSTATEDIR#"/"}" >> "${filelist}"
521 popd &>/dev/null 521 popd &>/dev/null
522 fi 522 fi
523
524 # It's safer portage wis doing this in instal, but we can't
525 # if it's a slotted install
526 [[ ${SLOT} -eq 0 ]] && ROOT="${D}" mysql_lib_symlinks
523} 527}
524 528
525mysql_pkg_preinst() { 529mysql_pkg_preinst() {
526 530
527 enewgroup mysql 60 || die "problem adding group mysql" 531 enewgroup mysql 60 || die "problem adding group mysql"
530} 534}
531 535
532mysql_pkg_postinst() { 536mysql_pkg_postinst() {
533 537
534 mysql_init_vars 538 mysql_init_vars
535 mysql_lib_symlinks 539 # slotted, manage lib symlinks on the real file-system
540 # to cope with other version installed
541 [[ ${SLOT} -ne 0 ]] && mysql_lib_symlinks
536 542
537 # mind at FEATURES=collision-protect before to remove this 543 # mind at FEATURES=collision-protect before to remove this
538 [ -d "${ROOT}/var/log/mysql" ] \ 544 [ -d "${ROOT}/var/log/mysql" ] \
539 || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" 545 || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
540 546

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.20