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}
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)
21 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
22 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
25 This is an module for the Apache HTTP Server that provides access
26 control based on "Referer" HTTP header content.
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"
33 %setup -q -n mod_%{mod_name}-%{version}
37 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
43 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
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
49 rm -rf $RPM_BUILD_ROOT
52 if [ -f /var/lock/subsys/apache ]; then
53 /etc/rc.d/init.d/apache restart 1>&2
57 if [ "$1" = "0" ]; then
58 if [ -f /var/lock/subsys/apache ]; then
59 /etc/rc.d/init.d/apache restart 1>&2
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
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}/*