]> git.pld-linux.org Git - packages/apache1-mod_vhost_limit.git/blob - apache1-mod_vhost_limit.spec
- apxs1 in apache1-devel now
[packages/apache1-mod_vhost_limit.git] / apache1-mod_vhost_limit.spec
1 %define         mod_name        vhost_limit
2 %define         apxs            /usr/sbin/apxs1
3 Summary:        Apache module: vhost_limit limits
4 Summary(pl.UTF-8):      Moduł do apache: limity pasma dla serwerów wirtualnych
5 Name:           apache1-mod_%{mod_name}
6 Version:        0.4
7 Release:        3
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 # Source0-md5:  bae36a7174e184804b91356ef67d0b5d
12 URL:            http://www.nowhere-land.org/programs/mod_vhost_limit/
13 BuildRequires:  apache1-devel >= 1.3.39
14 BuildRequires:  rpmbuild(macros) >= 1.268
15 Requires(triggerpostun):        %{apxs}
16 Requires:       apache1(EAPI)
17 Requires:       crondaemon
18 Requires:       procps
19 Obsoletes:      apache-mod_vhost_limit <= 0.4
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
23 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
24
25 %description
26 This is the module for Apache Web Server to restrict the number of
27 simultaneous connections per a virtual host.
28
29 %description -l pl.UTF-8
30 Ten pakiet zawiera moduł dla serwera WWW Apache służący do
31 ograniczania liczby jednoczesnych połączeń dla serwerów wirtualnych.
32
33 %prep
34 %setup -q -n mod_%{mod_name}-%{version}
35
36 %build
37 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
42
43 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
44
45 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > \
46         $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %post
52 %service -q apache restart
53
54 %postun
55 if [ "$1" = "0" ]; then
56         %service -q apache restart
57 fi
58
59 %triggerpostun -- apache1-mod_%{mod_name} < 0.4-1.1
60 # check that they're not using old apache.conf
61 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
62         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
63 fi
64
65 %files
66 %defattr(644,root,root,755)
67 %doc */*html
68 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
69 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.116132 seconds and 3 git commands to generate.