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

Diff of /eclass/mysql.eclass

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

Revision 1.104 Revision 1.105
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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.104 2009/02/11 11:27:13 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.105 2009/02/11 11:28:16 robbat2 Exp $
4 4
5# Author: Francesco Riosa (Retired) <vivo@gentoo.org> 5# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
6# Maintainer: MySQL Team <mysql-bugs@gentoo.org> 6# Maintainer: MySQL Team <mysql-bugs@gentoo.org>
7# - Luca Longinotti <chtekk@gentoo.org> 7# - Luca Longinotti <chtekk@gentoo.org>
8# - Robin H. Johnson <robbat2@gentoo.org> 8# - Robin H. Johnson <robbat2@gentoo.org>
689 689
690 insinto "${MY_INCLUDEDIR}" 690 insinto "${MY_INCLUDEDIR}"
691 doins "${MY_INCLUDEDIR}"/my_{config,dir}.h 691 doins "${MY_INCLUDEDIR}"/my_{config,dir}.h
692 692
693 # Convenience links 693 # Convenience links
694 einfo "Making Convenience links for mysqlcheck multi-call binary"
694 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze" 695 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze"
695 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair" 696 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair"
696 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize" 697 dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize"
697 698
698 # Various junk (my-*.cnf moved elsewhere) 699 # Various junk (my-*.cnf moved elsewhere)
700 einfo "Removing duplicate /usr/share/mysql files"
699 rm -Rf "${D}/usr/share/info" 701 rm -Rf "${D}/usr/share/info"
700 for removeme in "mysql-log-rotate" mysql.server* \ 702 for removeme in "mysql-log-rotate" mysql.server* \
701 binary-configure* my-*.cnf mi_test_all* 703 binary-configure* my-*.cnf mi_test_all*
702 do 704 do
703 rm -f "${D}"/usr/share/mysql/${removeme} 705 rm -f "${D}"/usr/share/mysql/${removeme}
704 done 706 done
705 707
706 # Clean up stuff for a minimal build 708 # Clean up stuff for a minimal build
707 if use minimal ; then 709 if use minimal ; then
710 einfo "Remove all extra content for minimal build"
708 rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench} 711 rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench}
709 rm -f "${D}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} 712 rm -f "${D}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam}
710 rm -f "${D}/usr/sbin/mysqld" 713 rm -f "${D}/usr/sbin/mysqld"
711 rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a 714 rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a
712 fi 715 fi
715 if mysql_version_is_at_least "4.1" ; then 718 if mysql_version_is_at_least "4.1" ; then
716 mysql_mycnf_version="4.1" 719 mysql_mycnf_version="4.1"
717 else 720 else
718 mysql_mycnf_version="4.0" 721 mysql_mycnf_version="4.0"
719 fi 722 fi
723 einfo "Building default my.cnf"
720 insinto "${MY_SYSCONFDIR}" 724 insinto "${MY_SYSCONFDIR}"
721 doins scripts/mysqlaccess.conf 725 doins scripts/mysqlaccess.conf
722 sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ 726 sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
723 "${FILESDIR}/my.cnf-${mysql_mycnf_version}" \ 727 "${FILESDIR}/my.cnf-${mysql_mycnf_version}" \
724 > "${TMPDIR}/my.cnf.ok" 728 > "${TMPDIR}/my.cnf.ok"
727 fi 731 fi
728 newins "${TMPDIR}/my.cnf.ok" my.cnf 732 newins "${TMPDIR}/my.cnf.ok" my.cnf
729 733
730 # Minimal builds don't have the MySQL server 734 # Minimal builds don't have the MySQL server
731 if ! use minimal ; then 735 if ! use minimal ; then
736 einfo "Creating initial directories"
732 # Empty directories ... 737 # Empty directories ...
733 diropts "-m0750" 738 diropts "-m0750"
734 if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then 739 if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then
735 dodir "${MY_DATADIR}" 740 dodir "${MY_DATADIR}"
736 keepdir "${MY_DATADIR}" 741 keepdir "${MY_DATADIR}"
744 chown -R mysql:mysql "${D}/${folder}" 749 chown -R mysql:mysql "${D}/${folder}"
745 done 750 done
746 fi 751 fi
747 752
748 # Docs 753 # Docs
754 einfo "Installing docs"
749 dodoc README COPYING ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE 755 dodoc README COPYING ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE
750 doinfo "${S}"/Docs/mysql.info 756 doinfo "${S}"/Docs/mysql.info
751 757
752 # Minimal builds don't have the MySQL server 758 # Minimal builds don't have the MySQL server
753 if ! use minimal ; then 759 if ! use minimal ; then
760 einfo "Including support files and sample configurations"
754 docinto "support-files" 761 docinto "support-files"
755 for script in \ 762 for script in \
756 "${S}"/support-files/my-*.cnf \ 763 "${S}"/support-files/my-*.cnf \
757 "${S}"/support-files/magic \ 764 "${S}"/support-files/magic \
758 "${S}"/support-files/ndb-config-2-node.ini 765 "${S}"/support-files/ndb-config-2-node.ini

Legend:
Removed from v.1.104  
changed lines
  Added in v.1.105

  ViewVC Help
Powered by ViewVC 1.1.20