From 6d02c450daa5107eaa1674451dcd207b87115649 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 29 Oct 2003 05:15:40 +0000 Subject: add proper apache1/2 support --- net-www/mod_scgi/ChangeLog | 8 +- net-www/mod_scgi/Manifest | 5 +- net-www/mod_scgi/files/20_mod_scgi.conf | 2 +- .../mod_scgi/files/digest-mod_scgi-1.2_alpha1-r1 | 1 + net-www/mod_scgi/mod_scgi-1.2_alpha1-r1.ebuild | 93 ++++++++++++++++++++++ 5 files changed, 105 insertions(+), 4 deletions(-) create mode 100644 net-www/mod_scgi/files/digest-mod_scgi-1.2_alpha1-r1 create mode 100644 net-www/mod_scgi/mod_scgi-1.2_alpha1-r1.ebuild (limited to 'net-www/mod_scgi') diff --git a/net-www/mod_scgi/ChangeLog b/net-www/mod_scgi/ChangeLog index 7ce0fd29b1b6..19e862314d7c 100644 --- a/net-www/mod_scgi/ChangeLog +++ b/net-www/mod_scgi/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-www/mod_scgi # Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-www/mod_scgi/ChangeLog,v 1.3 2003/08/15 04:34:35 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-www/mod_scgi/ChangeLog,v 1.4 2003/10/29 05:15:37 robbat2 Exp $ + +*mod_scgi-1.2_alpha1-r1 (28 Oct 2003) + + 28 Oct 2003; Robin H. Johnson + mod_scgi-1.2_alpha1-r1.ebuild, files/20_mod_scgi.conf: + add proper apache1/2 support 14 Aug 2003; Robin H. Johnson metadata.xml, mod_scgi-1.2_alpha1.ebuild, files/20_mod_scgi.conf: diff --git a/net-www/mod_scgi/Manifest b/net-www/mod_scgi/Manifest index 123cb59851a8..fe4f3c1a0793 100644 --- a/net-www/mod_scgi/Manifest +++ b/net-www/mod_scgi/Manifest @@ -1,5 +1,6 @@ -MD5 54cc6cbdddc6406412adaeeba0975044 mod_scgi-1.2_alpha1-r1.ebuild 2631 -MD5 e66a7d05d48cc749b56fccb09658e5b0 ChangeLog 662 +MD5 e9c1c8e78bd64b25cefdb098c53684c1 mod_scgi-1.2_alpha1-r1.ebuild 2777 +MD5 96a06fc8afc0b592744d7ae08865e5c9 mod_scgi-1.2_alpha1.ebuild 1131 +MD5 d25e25c16481066a35c27b534f704819 ChangeLog 843 MD5 60e3a7ee1268e32bce296a6076f736c6 metadata.xml 252 MD5 fe6e3027503038b59f1e9b4ee2cb3baa files/digest-mod_scgi-1.2_alpha1 61 MD5 98c270edf79608cb914cbc7d6ffea7b0 files/20_mod_scgi.conf 1243 diff --git a/net-www/mod_scgi/files/20_mod_scgi.conf b/net-www/mod_scgi/files/20_mod_scgi.conf index 8bd11f5252e4..057e028a7c60 100644 --- a/net-www/mod_scgi/files/20_mod_scgi.conf +++ b/net-www/mod_scgi/files/20_mod_scgi.conf @@ -1,4 +1,4 @@ - + LoadModule mod_scgi extramodules/mod_scgi.so diff --git a/net-www/mod_scgi/files/digest-mod_scgi-1.2_alpha1-r1 b/net-www/mod_scgi/files/digest-mod_scgi-1.2_alpha1-r1 new file mode 100644 index 000000000000..818dbd4658ba --- /dev/null +++ b/net-www/mod_scgi/files/digest-mod_scgi-1.2_alpha1-r1 @@ -0,0 +1 @@ +MD5 2bb8b05c3f771c25778c808ab0960580 scgi-1.2a1.tar.gz 17778 diff --git a/net-www/mod_scgi/mod_scgi-1.2_alpha1-r1.ebuild b/net-www/mod_scgi/mod_scgi-1.2_alpha1-r1.ebuild new file mode 100644 index 000000000000..fd4fd91f86ac --- /dev/null +++ b/net-www/mod_scgi/mod_scgi-1.2_alpha1-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/mod_scgi/mod_scgi-1.2_alpha1-r1.ebuild,v 1.1 2003/10/29 05:15:37 robbat2 Exp $ + +detectapache() { + local domsg= + [ -n "$1" ] && domsg=1 + HAVE_APACHE1= + HAVE_APACHE2= + has_version '=net-www/apache-1*' && HAVE_APACHE1=1 + has_version '=net-www/apache-2*' && HAVE_APACHE2=1 + + [ -n "${HAVE_APACHE1}" ] && APACHEVER=1 + [ -n "${HAVE_APACHE2}" ] && APACHEVER=2 + [ -n "${HAVE_APACHE1}" ] && [ -n "${HAVE_APACHE2}" ] && APACHEVER='both' + + case "${APACHEVER}" in + 1) [ -n "${domsg}" ] && einfo 'Apache1 only detected' ;; + 2) [ -n "${domsg}" ] && einfo 'Apache2 only detected';; + both) + if [ "`use apache2`" ]; then + [ -n "${domsg}" ] && einfo "Multiple Apache versions detected, using Apache2 (USE=apache2)" + APACHEVER=2 + else + [ -n "${domsg}" ] && einfo 'Multiple Apache versions detected, using Apache1 (USE=-apache2)' + APACHEVER=1 + fi ;; + *) if [ -n "${domsg}" ]; then + MSG="Unknown Apache version!"; eerror $MSG ; die $MSG + else + APACHEVER=0 + fi; ;; + esac +} +detectapache +SLOT="${APACHEVER}" +[ "${APACHEVER}" -eq '2' ] && USE_APACHE2='2' || USE_APACHE2='' + +MY_PN=${PN/mod_} +MY_PV=${PV/_alpha/a} +MY_P=${MY_PN}-${MY_PV} +S=${WORKDIR}/${MY_P} +DESCRIPTION="Apache module for a Replacement for the CGI protocol that is similar to FastCGI" +HOMEPAGE="http://www.mems-exchange.org/software/scgi/" +SRC_URI="http://www.mems-exchange.org/software/files/${MY_PN}/${MY_P}.tar.gz" +LICENSE="CNRI" +KEYWORDS="~x86" +IUSE="apache2" +DEPEND="${DEPEND} + net-www/scgi + net-www/apache + apache2? ( >=net-www/apache-2 )" + +src_compile() { + detectapache true + cd apache${APACHEVER} + make || die "apache${APACHEVER} mod_scgi make failed" +} + +src_install() { + detectapache + newdoc apache1/README README.apache1 + newdoc apache2/README README.apache2 + dodoc README PKG-INFO LICENSE.txt CHANGES + exeinto /usr/lib/apache${APACHEVER}-extramodules + doexe apache${APACHEVER}/.libs/${PN}.so + insinto /etc/apache${APACHEVER}/conf/modules.d + doins ${FILESDIR}/20_mod_scgi.conf +} + +pkg_postinst() { + detectapache + if [ -n "${USE_APACHE2}" ] ; then + einfo "Add '-D SCGI' to your APACHE2_OPTS in /etc/conf.d/apache2" + else + einfo "1. Execute the command:" + einfo " \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" + einfo "2. Edit /etc/conf.d/apache and add \"-D SCGI\" to APACHE_OPTS" + fi +} + +pkg_config() { + detectapache + if [ -n "${USE_APACHE2}" ] ; then + einfo "Add '-D SCGI' to your APACHE2_OPTS in /etc/conf.d/apache2" + else + ${ROOT}/usr/sbin/apacheaddmod \ + ${ROOT}/etc/apache/conf/apache.conf \ + extramodules/mod_scgi.so mod_scgi.c scgi_module \ + before=perl define=SCGI addconf=conf/modules.d/20_mod_scgi.conf + :; + fi +} -- cgit v1.2.3-65-gdbad