# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ 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}/SugarSuite-${PV}.zip" LICENSE="MPL-1.1" KEYWORDS="~x86" S=${WORKDIR}/SugarSuite-Full-${PV} IUSE="" RDEPEND=">=dev-db/mysql-4 virtual/httpd-php dev-php/PEAR-DB PEAR-Cache_Lite 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 xml2 ; then eerror "PHP is missing XML support." eerror "Please add 'xml2' 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} for foo in ${docs} INSTALLATION.txt PATCH.txt UPGRADE.TXT; do rm -f ${foo} done # copy the app's main files # einfo "Installing main files" cp -R . ${D}/${MY_HTDOCSDIR} # 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 # webapp_serverowned ${MY_HTDOCSDIR}/config.php webapp_serverowned ${MY_HTDOCSDIR}/.htaccess for foo in cache custom data modules ; do webapp_serverowned ${MY_HTDOCSDIR}/${foo} cd "${S}/${foo}" for bar in $(find .) ; do webapp_serverowned ${MY_HTDOCSDIR}/${foo}/${bar} done done cd "${S}" # all done # # now we let the eclass strut its stuff ;-) # webapp_src_install } pkg_postinst () { webapp_pkg_postinst }