summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2002-11-28 20:49:57 +0000
committerDonny Davies <woodchip@gentoo.org>2002-11-28 20:49:57 +0000
commit9c2d314f0a5c52c640f4fb6a00b7bede2ab9efc6 (patch)
tree86c0ed6175968280fe0da73d6f70f5bb3dc755e6 /net-www/mod_random
parentnew Apache2 mod (diff)
downloadgentoo-2-9c2d314f0a5c52c640f4fb6a00b7bede2ab9efc6.tar.gz
gentoo-2-9c2d314f0a5c52c640f4fb6a00b7bede2ab9efc6.tar.bz2
gentoo-2-9c2d314f0a5c52c640f4fb6a00b7bede2ab9efc6.zip
new Apache2 mod
Diffstat (limited to 'net-www/mod_random')
-rw-r--r--net-www/mod_random/ChangeLog8
-rw-r--r--net-www/mod_random/files/17_mod_random.conf38
-rw-r--r--net-www/mod_random/files/digest-mod_random-2.01
-rw-r--r--net-www/mod_random/files/mod_random-register.patch18
-rw-r--r--net-www/mod_random/mod_random-2.0.ebuild35
5 files changed, 100 insertions, 0 deletions
diff --git a/net-www/mod_random/ChangeLog b/net-www/mod_random/ChangeLog
new file mode 100644
index 000000000000..e1e5cf4f426b
--- /dev/null
+++ b/net-www/mod_random/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for net-www/mod_random
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
+# $Header: /var/cvsroot/gentoo-x86/net-www/mod_random/ChangeLog,v 1.1 2002/11/28 20:47:14 woodchip Exp $
+
+*mod_random-2.0 (28 Nov 2002)
+
+ 28 Nov 2002; Donny Davies <woodchip@gentoo.org> :
+ Initial import; created by me.
diff --git a/net-www/mod_random/files/17_mod_random.conf b/net-www/mod_random/files/17_mod_random.conf
new file mode 100644
index 000000000000..4cca3f867fb1
--- /dev/null
+++ b/net-www/mod_random/files/17_mod_random.conf
@@ -0,0 +1,38 @@
+<IfDefine HAVE_RANDOM>
+ <IfModule !mod_random.c>
+ LoadModule random_module extramodules/mod_random.so
+ </IfModule>
+</IfDefine>
+
+<IfModule mod_random.c>
+
+<Location /random>
+
+ SetHandler random
+ RandomURL http://www.gentoo.org/
+ RandomURL http://www.freshmeat.net/
+ RandomURL http://www.slashdot.org/
+ RandomURL /random-quote
+ RandomURL /random-ad
+
+</Location>
+
+<Location /random-quote>
+
+ RandomEngine On
+ SetHandler random-quote-page
+ RandomQuote "<P>I guess it was all a DREAM ... or an episode of HAWAII FIVE-O ...</P>"
+ RandomQuote "<P>Life is cheap, but the accessories can kill you.</P>"
+
+</Location>
+
+<Location /random-ad>
+
+ RandomEngine On
+ SetHandler random-ad-page
+ RandomAd "<P>Visit <a href=http://www.gentoo.org/>Gentoo Linux</a> today!</P>"
+
+</Location>
+
+</IfModule>
+
diff --git a/net-www/mod_random/files/digest-mod_random-2.0 b/net-www/mod_random/files/digest-mod_random-2.0
new file mode 100644
index 000000000000..aa614e25914a
--- /dev/null
+++ b/net-www/mod_random/files/digest-mod_random-2.0
@@ -0,0 +1 @@
+MD5 eb0690baab27f94cfbd116730fb94614 mod_random-2.0.tar.gz 7845
diff --git a/net-www/mod_random/files/mod_random-register.patch b/net-www/mod_random/files/mod_random-register.patch
new file mode 100644
index 000000000000..67012c43fb70
--- /dev/null
+++ b/net-www/mod_random/files/mod_random-register.patch
@@ -0,0 +1,18 @@
+--- mod_random.c.orig 2002-09-05 11:32:44.000000000 -0400
++++ mod_random.c 2002-09-05 11:35:08.000000000 -0400
+@@ -223,7 +223,15 @@
+ return OK;
+ }
+
++static int random2_init_handler(apr_pool_t *p, apr_pool_t *plog,
++ apr_pool_t *ptemp, server_rec *s)
++{
++ ap_add_version_component(p, "mod_random/2.0");
++ return OK;
++}
++
+ static void random2_register_hooks(apr_pool_t *p) {
++ ap_hook_post_config(random2_init_handler, NULL, NULL, APR_HOOK_MIDDLE);
+ ap_hook_handler(random_handler, NULL, NULL, APR_HOOK_MIDDLE);
+ ap_hook_handler(random_page_handler, NULL, NULL, APR_HOOK_MIDDLE);
+ ap_hook_fixups(random_fixup, NULL, NULL, APR_HOOK_FIRST);
diff --git a/net-www/mod_random/mod_random-2.0.ebuild b/net-www/mod_random/mod_random-2.0.ebuild
new file mode 100644
index 000000000000..cc2440337e02
--- /dev/null
+++ b/net-www/mod_random/mod_random-2.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/mod_random/mod_random-2.0.ebuild,v 1.1 2002/11/28 20:47:14 woodchip Exp $
+
+inherit eutils
+
+DESCRIPTION="An Apache2 DSO providing custom randomized responses"
+HOMEPAGE="http://software.tangent.org/"
+
+S=${WORKDIR}/${P}
+SRC_URI="http://software.tangent.org/download/${P}.tar.gz"
+DEPEND="=net-www/apache-2*"
+LICENSE="Apache-1.1"
+KEYWORDS="~x86"
+IUSE=""
+SLOT="0"
+
+src_unpack() {
+ unpack ${A} || die; cd ${S} || die
+ epatch ${FILESDIR}/mod_random-register.patch
+}
+
+src_compile() {
+ apxs2 -c ${PN}.c || die
+}
+
+src_install() {
+ exeinto /usr/lib/apache2-extramodules
+ doexe .libs/${PN}.so
+ insinto /etc/apache2/conf/modules.d
+ doins ${FILESDIR}/17_mod_random.conf
+ dodoc ${FILESDIR}/17_mod_random.conf
+ dodoc ChangeLog INSTALL LICENSE README VERSION
+ dohtml *.html
+}