| 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/mysql.eclass,v 1.23 2006/03/09 12:37:01 vivo Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.24 2006/03/10 11:41:39 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 | |
| 8 | inherit eutils flag-o-matic gnuconfig autotools mysql_fx |
8 | inherit eutils flag-o-matic gnuconfig autotools mysql_fx |
| … | |
… | |
| 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 | |
| 525 | mysql_pkg_preinst() { |
529 | mysql_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 | |
| 532 | mysql_pkg_postinst() { |
536 | mysql_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 | |