summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2003-07-14 02:53:09 +0000
committerDonny Davies <woodchip@gentoo.org>2003-07-14 02:53:09 +0000
commit2818b8ac26d5f83e8570ed450290e6d0b6e7b2bf (patch)
tree2436942af5d7fa529b1856cc5164aa09b94401b0 /net-www
parent#22778 (diff)
downloadhistorical-2818b8ac26d5f83e8570ed450290e6d0b6e7b2bf.tar.gz
historical-2818b8ac26d5f83e8570ed450290e6d0b6e7b2bf.tar.bz2
historical-2818b8ac26d5f83e8570ed450290e6d0b6e7b2bf.zip
#22778
Diffstat (limited to 'net-www')
-rw-r--r--net-www/mod_bandwidth/Manifest4
-rw-r--r--net-www/mod_bandwidth/files/digest-mod_bandwidth-2.0.41
-rw-r--r--net-www/mod_bandwidth/files/mod_bandwidth-2.0.4-register.patch20
-rw-r--r--net-www/mod_bandwidth/files/mod_bandwidth.conf20
-rw-r--r--net-www/mod_bandwidth/mod_bandwidth-2.0.4.ebuild58
5 files changed, 101 insertions, 2 deletions
diff --git a/net-www/mod_bandwidth/Manifest b/net-www/mod_bandwidth/Manifest
index 186a6a38ca8a..a321272cad00 100644
--- a/net-www/mod_bandwidth/Manifest
+++ b/net-www/mod_bandwidth/Manifest
@@ -1,5 +1,5 @@
-MD5 8338d16dccb23e4986b44c562ecbb2b0 mod_bandwidth-2.0.4.ebuild 1736
-MD5 e41427500bf8592c2a36bf011d96b707 ChangeLog 348
+MD5 a42a81572ac26926af6f5d6ec72fae04 mod_bandwidth-2.0.4.ebuild 1716
+MD5 29f475d3197f75ffadeaf01789ec665a ChangeLog 560
MD5 cb75940c95ae90a42fc84bd3baac4f4f files/mod_bandwidth.conf 519
MD5 7fdb7dc609577ce39c00d5c998411c56 files/mod_bandwidth-2.0.4-register.patch 658
MD5 b1f6d1637699dda2b89daf03a5991078 files/digest-mod_bandwidth-2.0.4 59
diff --git a/net-www/mod_bandwidth/files/digest-mod_bandwidth-2.0.4 b/net-www/mod_bandwidth/files/digest-mod_bandwidth-2.0.4
new file mode 100644
index 000000000000..318a048630c9
--- /dev/null
+++ b/net-www/mod_bandwidth/files/digest-mod_bandwidth-2.0.4
@@ -0,0 +1 @@
+MD5 00f0905d777f79485beb428b53191ecf mod_bandwidth.c 43630
diff --git a/net-www/mod_bandwidth/files/mod_bandwidth-2.0.4-register.patch b/net-www/mod_bandwidth/files/mod_bandwidth-2.0.4-register.patch
new file mode 100644
index 000000000000..9e5222d6ebb9
--- /dev/null
+++ b/net-www/mod_bandwidth/files/mod_bandwidth-2.0.4-register.patch
@@ -0,0 +1,20 @@
+--- mod_bandwidth.c.orig 2003-07-13 22:29:57.000000000 -0400
++++ mod_bandwidth.c 2003-07-13 22:30:49.000000000 -0400
+@@ -1236,9 +1236,16 @@
+ { NULL }
+ };
+
++#define MOD_BANDWIDTH_VERSION_S "2.0.4"
++
++void bandwidth_module_init(void)
++{
++ ap_add_version_component("mod_bandwidth/" MOD_BANDWIDTH_VERSION_S);
++}
++
+ module bandwidth_module = {
+ STANDARD_MODULE_STUFF,
+- NULL, /* initializer */
++ bandwidth_module_init, /* initializer */
+ create_bw_config, /* bw config creater */
+ NULL, /* bw merger --- default is to override */
+ create_bw_server_config, /* server config */
diff --git a/net-www/mod_bandwidth/files/mod_bandwidth.conf b/net-www/mod_bandwidth/files/mod_bandwidth.conf
new file mode 100644
index 000000000000..67a62b4f76c7
--- /dev/null
+++ b/net-www/mod_bandwidth/files/mod_bandwidth.conf
@@ -0,0 +1,20 @@
+# Syntax can be found at http://www.cohprog.com/v3/bandwidth/doc-en.html
+<IfModule mod_bandwidth.c>
+
+ BandWidthDataDir /var/cache/mod_bandwidth
+
+ # This must be turned on for mod_bandwidth to actually do anything
+ # These directives can go inside a VirtualHost or Directory, etc...
+ #
+ # BandWidthModule On
+
+ # Limit 196.168.0.0/24 to 80KB/sec, with a minimum of 60KB/sec
+ #
+ # BandWidth 196.168.0 80000
+ # BandWidth 196.168.0 60000
+
+ # Everyone else shares 50KB/sec
+ #
+ # Bandwidth all 50000
+
+</IfModule>
diff --git a/net-www/mod_bandwidth/mod_bandwidth-2.0.4.ebuild b/net-www/mod_bandwidth/mod_bandwidth-2.0.4.ebuild
new file mode 100644
index 000000000000..ab3c88a3ae2c
--- /dev/null
+++ b/net-www/mod_bandwidth/mod_bandwidth-2.0.4.ebuild
@@ -0,0 +1,58 @@
+# 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_bandwidth/mod_bandwidth-2.0.4.ebuild,v 1.1 2003/07/14 02:52:57 woodchip Exp $
+
+DESCRIPTION="Bandwidth Management Module for Apache"
+HOMEPAGE="http://www.cohprog.com/v3/bandwidth/intro-en.html"
+SRC_URI="ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c"
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+DEPEND="=net-www/apache-1*"
+
+src_unpack() {
+ mkdir -p ${S} && cp ${DISTDIR}/${A} ${S} || die
+ cd ${S} || die
+ patch <${FILESDIR}/mod_bandwidth-2.0.4-register.patch || die
+}
+
+src_compile() {
+ apxs -c ${S}/mod_bandwidth.c -o ${S}/mod_bandwidth.so
+}
+
+src_install() {
+ exeinto /usr/lib/apache-extramodules
+ doexe ${PN}.so
+
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/${PN}.conf
+
+ dodoc ${PN}.c
+}
+
+pkg_postinst() {
+ # empty dirs..
+ install -m0755 -o apache -g apache -d \
+ ${ROOT}/var/cache/mod_bandwidth/{link,master}
+
+ einfo
+ einfo "Execute \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\""
+ einfo "to have your apache.conf auto-updated for use with this module."
+ einfo "You should then edit your /etc/conf.d/apache file to suit."
+ einfo
+ einfo "For configuration documentation, look at"
+ einfo "http://www.cohprog.com/v3/bandwidth/doc-en.html"
+ einfo
+ einfo "Be sure to add -D BANDWIDTH to your /etc/conf.d/apache in order for"
+ einfo "the module to be actually loaded."
+ einfo
+}
+
+pkg_config() {
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/mod_bandwidth.so mod_bandwidth.c bandwidth_module \
+ define=BANDWIDTH addconf=conf/addon-modules/mod_bandwidth.conf
+ :;
+}