# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # Source: http://bugs.gentoo.org/show_bug.cgi?id=103295 # Submitted-By: mbonar # Reviewed-By: # $Id: sugarcrm-4.0.0.ebuild 77 2006-01-03 21:42:44Z wrobel $ inherit webapp eutils DESCRIPTION="A complete CRM and groupware system for businesses of all sizes." HOMEPAGE="http://www.sugarcrm.com" SRC_URI="mirror://sourceforge/${PN}/SugarOS-${PV}.zip" LICENSE="MPL-1.1" KEYWORDS="~x86" S="${WORKDIR}/SugarOS-Full-${PV}" IUSE="" RDEPEND=">=dev-db/mysql-4 virtual/httpd-php dev-php/PEAR-DB dev-php/PEAR-Cache_Lite dev-php/PEAR-Mail_Mime" pkg_setup() { if ! built_with_use virtual/httpd-php mysql ; then eerror "PHP is missing MySQL support." eerror "Please add 'mysql' to your USE flags, and re-emerge PHP." die "PHP needs MySQL support" fi if ! built_with_use virtual/httpd-php curl ; then eerror "PHP is missing cURL support." eerror "Please add 'curl' to your USE flags, and re-emerge PHP." die "PHP needs cURL support" fi if ! built_with_use virtual/httpd-php ssl ; then eerror "PHP is missing SSL support." eerror "Please add 'ssl' to your USE flags, and re-emerge PHP." die "PHP needs SSL support" fi if ! built_with_use virtual/httpd-php xml ; then eerror "PHP is missing XML support." eerror "Please add 'xml' to your USE flags, and re-emerge PHP." die "PHP needs XML support" fi webapp_pkg_setup } src_install () { webapp_src_preinst cd "${S}" local docs="README.txt" # handle documentation files # # NOTE that doc files go into /usr/share/doc as normal; they do NOT # get installed per vhost! dodoc ${docs} # copy the app's main files # einfo "Installing main files" cp -R . ${D}/${MY_HTDOCSDIR} for foo in ${docs} INSTALLATION.txt PATCH.txt UPGRADE.TXT; do rm -f ${D}/${MY_HTDOCSDIR}/${foo} done # add the post-installation instructions # webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt # Identify the configuration files that this app uses # webapp_configfile ${MY_HTDOCSDIR}/config.php webapp_configfile ${MY_HTDOCSDIR}/.htaccess # Directories and files needed to be owned by web server # for foo in cache custom data modules ; do webapp_serverowned -R ${MY_HTDOCSDIR}/${foo} done # all done # # now we let the eclass strut its stuff ;-) # webapp_src_install }