--- /usr/portage/www-apps/dspam-web/dspam-web-3.8.0-r1.ebuild 2009-04-12 10:07:53.000000000 +0200 +++ dspam-web-3.9.0-r1.ebuild 2010-01-16 15:27:09.000000000 +0100 @@ -1,29 +1,26 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/dspam-web/dspam-web-3.8.0-r1.ebuild,v 1.2 2009/03/07 20:49:50 betelgeuse Exp $ +# $Header: $ -EAPI="2" +EAPI=2 -inherit webapp eutils autotools - -PATCHES_RELEASE_DATE="20071231" +inherit webapp DESCRIPTION="Web based administration and user controls for dspam" HOMEPAGE="http://dspam.nuclearelephant.com/" -SRC_URI="http://dspam.nuclearelephant.com/sources/dspam-${PV}.tar.gz - mirror://gentoo/dspam-${PV}-patches-${PATCHES_RELEASE_DATE}.tar.gz" +SRC_URI="mirror://sourceforge/dspam/dspam-${PV}.tar.gz" LICENSE="GPL-2" -KEYWORDS="~amd64 ~ppc sparc x86" -IUSE="" - -DEPEND="" -DEPEND=" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +IUSE="apache2" +RDEPEND="apache2? ( www-servers/apache[+suexec] ) >=mail-filter/dspam-${PV}[-user-homedirs] dev-perl/GD[png] dev-perl/GD-Graph3d dev-perl/GDGraph - dev-perl/GDTextUtil" + dev-perl/GDTextUtil + sys-apps/sed" +DEPEND="" # some FHS-like structure HOMEDIR="/var/spool/dspam" @@ -31,18 +28,12 @@ S="${WORKDIR}/dspam-${PV}" -src_prepare() { - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patches - - AT_M4DIR="${S}/m4" - eautoreconf -} +need_httpd_cgi src_configure() { econf \ - --with-dspam-home=${HOMEDIR} \ - --sysconfdir=${CONFDIR} || die "econf failed" + --with-dspam-home=${HOMEDIR} \ + --sysconfdir=${CONFDIR} || die "econf failed" } src_compile() { @@ -54,16 +45,18 @@ webapp_src_preinst cd "${S}/webui" + + # Cleanup install files + find . -type f -name "Makefile*" -or -name "*.in" -delete || die "failed to remove unneeded files" + insinto "${MY_HTDOCSDIR}" insopts -m644 - doins htdocs/*.{css,gif} - insinto "${MY_CGIBINDIR}/templates" - doins cgi-bin/templates/*.html + doins -r htdocs/* || die "doins failed for htdocs" + insinto "${MY_CGIBINDIR}" - doins cgi-bin/{admins,configure.pl,default.prefs,rgb.txt,*.cgi} + doins -r cgi-bin/* || die "doins failed for cgi-bin" webapp_configfile "${MY_CGIBINDIR}"/{admins,configure.pl,default.prefs,rgb.txt} - webapp_hook_script "${FILESDIR}/setperms" webapp_postinst_txt en "${FILESDIR}/postinst-en.txt" @@ -71,12 +64,13 @@ } pkg_postinst() { - ewarn "If you're using apache dspam-web's config requires the scripts in the cgi-bin" - ewarn "to be run as dspam:dspam. You will have to put a global SuexecUserGroup" - ewarn "declaration in the main server config which will force everything in cgi-bin" - ewarn "to run as dspam:dspam." + if use apache2; then + ewarn "If you're using Apache, dspam-web's config requires the scripts in the cgi-bin" + ewarn "to be run as dspam:dspam. You will have to put a global SuexecUserGroup" + ewarn "declaration in the main server config which will force everything in cgi-bin" + ewarn "to run as dspam:dspam." + fi ewarn "You should use a dedicated virtual host for this application or at least" ewarn "one that don't have any other cgi scripts." - echo webapp_pkg_postinst }