# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: $ inherit webapp-apache DESCRIPTION="Geeklog is a weblog powered by PHP and MySQL" SRC_URI="http://www.geeklog.net/filemgmt/upload_dir/${PN}-${PV}.tar.gz" HOMEPAGE="http://www.geeklog.net" LICENSE="GPL-2" KEYWORDS="~x86 ~ppc" RESTRICT="nomirror" SLOT="0" RDEPEND="virtual/php" S=${WORKDIR}/${PN}-${PV} #HTTPD_ROOT="/var/www/localhost/htdocs" #HTTPD_USER="apache" #HTTPD_GROUP="apache" pkg_setup() { webapp-detect || NO_WEBSERVER=1 webapp-pkg_setup "${NO_WEBSERVER}" if [ -d ${HTTPD_ROOT}/geeklog ] ; then ewarn "You need to unmerge old Geeklog version first." ewarn "Geeklog will be installed into ${HTTPD_ROOT}/geeklog" ewarn "directly instead of a version-dependant directory." die "need to unmerge old version first" fi einfo "Installing for ${WEBAPP_SERVER}" } src_unpack() { unpack ${A} cd ${S} } src_install() { webapp-mkdirs dodir ${HTTPD_ROOT}/../geeklog cp -a * ${D}/${HTTPD_ROOT}/../geeklog cd ${D}/${HTTPD_ROOT}/../geeklog mv public_html ${D}/${HTTPD_ROOT}/geeklog chmod -R 775 logs/ dodoc INSTALL readme ${S}/docs/* cd ${D}/${HTTPD_ROOT} chown -R ${HTTPD_USER}.${HTTPD_GROUP} ${D}/${HTTPD_ROOT}/../geeklog chown -R ${HTTPD_USER}.${HTTPD_GROUP} ${D}/${HTTPD_ROOT}/geeklog chmod -R 775 ${D}/${HTTPD_ROOT}/geeklog/backend/ chmod -R 775 ${D}/${HTTPD_ROOT}/geeklog/images/articles chmod -R 775 ${D}/${HTTPD_ROOT}/geeklog/images/userphotos } pkg_postinst() { einfo "You will need to create a database for geeklog." einfo "For install and configure instructions read the avaible documentation." }