# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header $ EAPI=5 inherit webapp DESCRIPTION="Web based (PHP Script) photo album viewer/creator" HOMEPAGE="http://gallery.menalto.com/" SRC_URI="mirror://sourceforge/gallery/${PN}/${P}.zip" LICENSE="GPL-2" KEYWORDS="~x86 ~amd64" IUSE="+gd imagemagick mysql mysqli ffmpeg" # No forced dependency on # mysql? ( virtual/mysql ) # which may live on another server # Build depend is on unzip DEPEND="app-arch/unzip" RDEPEND=" >=dev-lang/php-5.2.3[ctype,gd?,filter,iconv,json,mysql?,mysqli?,simplexml,tokenizer,unicode] virtual/httpd-php >=www-servers/apache-2.2 imagemagick? ( || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] ) ) ffmpeg? ( virtual/ffmpeg ) " REQUIRED_USE="|| ( gd imagemagick ) || ( mysql mysqli )" My_PN="${PN}3" S=${WORKDIR}/${My_PN} src_install() { webapp_src_preinst INSTALL_DIR="/${My_PN}" cp -R * ${D}/${MY_HTDOCSDIR} cp .htaccess ${D}/${MY_HTDOCSDIR} keepdir ${MY_HTDOCSDIR}/var webapp_serverowned ${MY_HTDOCSDIR}/var webapp_configfile ${MY_HTDOCSDIR}/.htaccess webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt webapp_postupgrade_txt en ${FILESDIR}/postupgrade-en.txt webapp_src_install } pkg_postinst() { ewarn ewarn "ATTENTION!" ewarn "gallery3 requires short_open_tag to be enabled" ewarn "You need to edit \"/etc/php/apache2-php5.?/php.ini\"" ewarn "and change short_open_tag to \"On\" and " ewarn "re-start apache (/etc/init.d/apache2 restart)" ewarn ewarn "This ebuild does not depend on mysql or mariadb," ewarn "because the database may run on another host." ewarn "But you will need a running mysql compatible database somewhere ..." ewarn einfo einfo einfo "To see the post install instructions, do" einfo einfo " webapp-config -h galleryhost -d gallerydir --show-postinst ${PN} ${PVR}" einfo einfo "or for the update instructions, do" einfo einfo " webapp-config -h galleryhost -d gallerydir --show-postupgrade ${PN} ${PVR}" einfo }