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