File: libapache-mod-limitipconn.packages

package info (click to toggle)
yada 0.34
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,160 kB
  • ctags: 83
  • sloc: perl: 3,554; makefile: 26; sh: 12
file content (121 lines) | stat: -rw-r--r-- 4,431 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# $Id: /trunk/debian/dists/libapache-mod-limitipconn/debian/packages 21 2005-02-28T13:00:43.174787Z dexter  $

# If the debian/rules or debian/control file is missing, rebuild the file:
#
#   $ yada rebuild control
#   $ yada rebuild rules

%define apache_version %`dpkg -s apache-dev | grep ^Version | sed 's/^Version: //'`

# Other macros:
#   apache_version=%{apache_version}

Source: libapache-mod-limitipconn
Section: web
Priority: extra
Maintainer: Piotr Roszatycki <dexter@debian.org>
Standards-Version: 3.6.1
Upstream-Source: <URL:http://dominia.org/djao/limit/mod_limitipconn-(0.0[0-9.]*)\.tar.gz>
Home-Page: <URL:http://dominia.org/djao/limitipconn.html>
Description: module for Apache which limits simultaneous connections per IP
Copyright: .
 Copyright (C) 2000 David Jao <djao@dominia.org>
 .
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
 files (the "Software"), to deal in the Software without
 restriction, including without limitation the rights to use, copy,
 modify, merge, publish, distribute, sublicense, and/or sell copies
 of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:
 .
 The above copyright notice, this permission notice, and the
 following disclaimer shall be included in all copies or substantial
 portions of the Software.
 .
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 DEALINGS IN THE SOFTWARE.
Build-Depends: apache-dev (>= 1.3.23)
Patches: patches/*.patch
Build: sh
 APXS=${APXS:-apxs}
 CFLAGS=${CFLAGS:--Wall -g}
 if [ "${DEB_BUILD_OPTIONS#*noopt}" != "$DEB_BUILD_OPTIONS" ]; then
      CFLAGS="$CFLAGS -O0"
 else
      CFLAGS="$CFLAGS -O2"
 fi
 .
 if [ -d apache-build ]; then
     rm -rf apache-build
 fi
 mkdir apache-build
 pushd apache-build
     cp -a ../*.c .
     $APXS -c -S CFLAGS="`$APXS -q CFLAGS` $CFLAGS" *.c
 popd
Clean: sh
 rm -rf *-build || true

Package: libapache-mod-limitipconn
Architecture: any
Depends: apache-common (>= %{apache_version}), []
Description: module for Apache which limits simultaneous connections per IP
 The mod_limitipconn module lets you enforce limits on the number of
 simultaneous downloads allowed from a single IP address. You can also
 control which MIME types are affected by the limits.
Install: sh
 APXS=${APXS:-apxs}
 LIBEXECDIR=$($APXS -q LIBEXECDIR)
 yada install -dir $LIBEXECDIR
 $APXS -i -S LIBEXECDIR="$ROOT$LIBEXECDIR" apache-build/*.so
 chmod -x "$ROOT$LIBEXECDIR"/*.so
 yada install -data -into /usr/lib/apache/1.3 debian/data/*.info
 yada install -doc apachesrc.diff
 yada install -doc README
 yada install -doc -as changelog ChangeLog
 yada install -doc debian/doc/README.Debian
Postinst: sh
 reload_apache()
 {
     webserver=$1
     if ${webserver}ctl configtest 2>/dev/null; then
         invoke-rc.d $webserver force-reload || true
     else
         echo "Your $webserver configuration is broken, so we're not restarting it for you."
     fi
 }
 .
 if [ "$1" = "configure" ]; then
     if [ -x /usr/sbin/apache-modconf ]; then
         for webserver in apache apache-ssl apache-perl; do
             if [ -x /usr/sbin/$webserver ]; then
                 if [ -n "$2" ]; then
                     # we're upgrading. test if we're enabled, and if so, restart to reload the module.
                     if [ "$(apache-modconf $webserver query mod_limitipconn)" = "mod_limitipconn" ]; then
                         reload_apache $webserver
                     fi
                 else
                     # fresh
                     apache-modconf $webserver enable mod_limitipconn
                 fi
             fi
         done
     fi
 fi
Prerm: sh
 if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
     if [ -x /usr/sbin/apache-modconf ]; then
         for webserver in apache apache-ssl apache-perl; do
             if [ -x /usr/sbin/$webserver ]; then
                 apache-modconf $webserver disable mod_limitipconn quiet
             fi
         done
     fi
 fi