]> git.pld-linux.org Git - packages/apache1-mod_access_referer.git/blob - apache1-mod_access_referer.spec
b36ae38c9d3aa8370df56bc170bdb8bbb73ee195
[packages/apache1-mod_access_referer.git] / apache1-mod_access_referer.spec
1 %define         mod_name        access_referer
2 %define         apxs            %{_sbindir}/apxs1
3 Summary:        Access control based on "Referer" HTTP header content
4 Summary(pl):    Kontrola dostêpu bazuj±ca na zawarto¶ci standardowego nag³ówka HTTP "REFERER"
5 Name:           apache1-mod_%{mod_name}
6 Version:        1.0.2
7 Release:        2.8
8 License:        Apache Group
9 Group:          Networking/Daemons
10 Source0:        http://dl.sourceforge.net/accessreferer/mod_%{mod_name}-%{version}.tar.gz
11 # Source0-md5:  f1726cfe5965eda1bdca90b8db475377
12 Patch0:         http://dl.sourceforge.net/sourceforge/accessreferer/mod_access_referer_1.0.2_third_part_patch.txt
13 URL:            http://sourceforge.net/projects/accessreferer/
14 BuildRequires:  %{apxs}
15 BuildRequires:  apache1-devel >= 1.3.33-2
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 2>/dev/null)
22 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
23
24 %description
25 This is an module for the Apache HTTP Server that provides access
26 control based on "Referer" HTTP header content.
27
28 %description -l pl
29 Modu³ ten pozwala na kontrolowanie dostêpu do plików na serwerze w
30 zale¿no¶ci od zawarto¶ci standardowego nag³ówka HTTP - "REFERER"
31
32 %prep
33 %setup -q -n mod_%{mod_name}-%{version}
34 %patch0 -p0
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 CFG=$RPM_BUILD_ROOT%{_sysconfdir}/conf.d
46 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > $CFG/90_mod_%{mod_name}.conf
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %post
52 if [ -f /var/lock/subsys/apache ]; then
53         /etc/rc.d/init.d/apache restart 1>&2
54 fi
55
56 %preun
57 if [ "$1" = "0" ]; then
58         if [ -f /var/lock/subsys/apache ]; then
59                 /etc/rc.d/init.d/apache restart 1>&2
60         fi
61 fi
62
63 %triggerpostun -- %{name} < 1.0.2-2.1
64 # check that they're not using old apache.conf
65 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
66         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
67 fi
68
69 %files
70 %defattr(644,root,root,755)
71 %doc README ChangeLog HACKING *.html
72 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
73 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.044717 seconds and 2 git commands to generate.