summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-www/mod_contribs/mod_contribs-1.0.8-r1.ebuild')
-rw-r--r--net-www/mod_contribs/mod_contribs-1.0.8-r1.ebuild105
1 files changed, 105 insertions, 0 deletions
diff --git a/net-www/mod_contribs/mod_contribs-1.0.8-r1.ebuild b/net-www/mod_contribs/mod_contribs-1.0.8-r1.ebuild
new file mode 100644
index 000000000000..04a67e691c48
--- /dev/null
+++ b/net-www/mod_contribs/mod_contribs-1.0.8-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-www/mod_contribs/mod_contribs-1.0.8-r1.ebuild,v 1.1 2002/05/04 23:23:01 woodchip Exp $
+
+# The mod_layout and mod_random that come in the archive are really old,
+# so I've replaced them with more current versions.
+mod_layout_ver=3.0.3
+mod_random_ver=1.4
+
+DESCRIPTION="Collection of third-party contributed modules for Apache"
+HOMEPAGE="http://www.apache.org/dist/httpd/contrib/modules/1.3/"
+
+S=${WORKDIR}/apache-contrib-${PV}
+SRC_URI="http://www.apache.org/dist/httpd/contrib/modules/1.3/apache-contrib-${PV}.tar.gz
+ http://software.tangent.org/download/mod_layout-${mod_layout_ver}.tar.gz
+ http://software.tangent.org/download/mod_random-${mod_random_ver}.tar.gz"
+
+DEPEND="virtual/glibc >=net-www/apache-1.3.24"
+LICENSE="Apache-1.1"
+SLOT="0"
+
+MY_MODS="mod_allowdev mod_auth_system mod_disallow_id mod_lock mod_random
+ mod_auth_cookie mod_bandwidth mod_eaccess mod_macro mod_roaming
+ mod_auth_cookie_file mod_cache mod_fastcgi mod_peephole mod_session
+ mod_auth_external mod_cgisock mod_ip_forwarding mod_put mod_ticket
+ mod_auth_inst mod_cvs mod_layout mod_qs2ssi mod_urlcount"
+
+src_unpack() {
+ unpack ${A} ; cd ${S}
+
+ # update mod_random..
+ cd ${S}/mod_random
+ rm -f mod_random.c
+ cp ${S}/../mod_random-${mod_random_ver}/{mod_random.c,README,faq.html} .
+
+ # update mod_layout..
+ cd ${S}/mod_layout
+ rm -f mod_layout.c
+ cp ${S}/../mod_layout-${mod_layout_ver}/{*.c,*.h,README,faq.html,directives/*} .
+ cp Makefile Makefile.orig
+ sed -e "s%^\(SRCS\)\(.*\)%\1\2 utility.c origin.c footer.c header.c%" \
+ Makefile.orig > Makefile
+
+ # fix to be like others: libcache.so -> mod_cache.so
+ cd ${S}/mod_cache
+ cp Makefile Makefile.orig
+ sed -e "s%^\(DSO\).*%\1=mod_cache.so%" Makefile.orig > Makefile
+}
+
+src_compile() {
+ emake || die "compile problem"
+}
+
+src_install() {
+ local i
+ for i in ${MY_MODS}
+ do
+ if [ -f $i/$i.so ]
+ then
+ exeinto /usr/lib/apache-extramodules
+ doexe $i/$i.so
+ fi
+ if [ -f $i/README ]
+ then
+ docinto $i
+ dodoc $i/README
+ fi
+ if [ -f $i/00BLURB ]
+ then
+ docinto $i
+ dodoc $i/00BLURB
+ fi
+ ls $i/*.html >/dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+ mkdir -p ${D}/usr/share/doc/${PF}/${i}/html
+ cp $i/*.html ${D}/usr/share/doc/${PF}/${i}/html
+ fi
+ done
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Execute \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\""
+ einfo "to have your apache.conf auto-updated for use with these modules."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+}
+
+pkg_config() {
+ local i j k
+ for i in ${MY_MODS}
+ do
+ j="`echo $i | sed -e 's%mod_\(.*\)%\1%'`"
+ k="`echo $j | tr a-z A-Z`"
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/$i.so $i.c ${j}_module define=$k
+ if [ ! $? ]
+ then
+ ewarn "hrmph, problem auto-updating apache.conf for $i!"
+ fi
+ done
+ :;
+}