- rel 2; STBR
[packages/apache1-mod_suid.git] / apache1-mod_suid.spec
1 %define         mod_name        suid
2 %define         apxs            /usr/sbin/apxs1
3 Summary:        Apache module: execution of scripts under their own uids
4 Summary(pl):    Modu³ do apache: wykonywanie skryptów pod wskazanym uidem
5 Name:           apache1-mod_%{mod_name}
6 Version:        1.1
7 Release:        2
8 License:        GPL
9 Group:          Networking/Daemons
10 Source0:        http://www.jdimedia.nl/igmar/mod_%{mod_name}/files/mod_%{mod_name}-%{version}.tar.gz
11 # Source0-md5:  1e47d40d8f0404d9faa3040655df44a2
12 URL:            http://www.jdimedia.nl/igmar/mod_suid/
13 BuildRequires:  %{apxs}
14 BuildRequires:  apache1-devel >= 1.3.33-2
15 BuildRequires:  zlib-devel
16 Requires(triggerpostun):        %{apxs}
17 Requires:       apache1 >= 1.3.33-2
18 Obsoletes:      apache-mod_%{mod_name} <= %{version}
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
22
23 %description
24 Apache module: execution of scripts under their own uids per-vhost.
25
26 %description -l pl
27 Modu³ do apache: wykonywanie skryptów pod wskazanym uidem per-vhost.
28
29 %prep
30 %setup -q -n mod_%{mod_name}-%{version}
31
32 %build
33 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
34
35 %install
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
38
39 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
40
41 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > \
42         $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT
46
47 %post
48 if [ -f /var/lock/subsys/apache ]; then
49         /etc/rc.d/init.d/apache restart 1>&2
50 fi
51
52 %preun
53 if [ "$1" = "0" ]; then
54         if [ -f /var/lock/subsys/apache ]; then
55                 /etc/rc.d/init.d/apache restart 1>&2
56         fi
57 fi
58
59 %triggerpostun -- apache1-mod_%{mod_name} < 1.1-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 CHANGES.txt README
68 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
69 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.040992 seconds and 3 git commands to generate.