a988f7f4c447d1b76290e540358f279c9c0c8758
[packages/apache-mod_vhost_limit.git] / apache-mod_vhost_limit.spec
1 %define         mod_name        vhost_limit
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: vhost_limit limits
4 Summary(pl):    Modu³ do apache: limity pasma
5 Name:           apache-mod_%{mod_name}
6 Version:        0.4
7 Release:        1
8 License:        Apache
9 Group:          Networking/Daemons
10 Source0:        http://www.nowhere-land.org/programs/mod_vhost_limit/mod_%{mod_name}-%{version}.tar.gz
11 URL:            http://www.nowhere-land.org/programs/mod_vhost_limit/
12 BuildRequires:  apache(EAPI)-devel
13 Requires(post,preun):   %{apxs}
14 Requires(post,preun):   grep
15 Requires(preun):        fileutils
16 Requires:       apache(EAPI)
17 Requires:       crondaemon
18 Requires:       procps
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
22 %define         _sysconfdir     /etc/httpd
23
24 %description
25 This is the module for Apache Web Server to restrict the number of simultaneous connections per a virtual host.
26
27 %prep
28 %setup -q -n mod_%{mod_name}-%{version}
29
30 %build
31 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
32
33 %install
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
36
37 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
38
39 %clean
40 rm -rf $RPM_BUILD_ROOT
41
42 %post
43 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
44 if [ -f /var/lock/subsys/httpd ]; then
45         /etc/rc.d/init.d/httpd restart 1>&2
46 fi
47
48 %preun
49 if [ "$1" = "0" ]; then
50         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
51         if [ -f /var/lock/subsys/httpd ]; then
52                 /etc/rc.d/init.d/httpd restart 1>&2
53         fi
54 fi
55
56 %files
57 %defattr(644,root,root,755)
58 %doc */*html
59 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.076966 seconds and 2 git commands to generate.