1 %define mod_name access_referer
2 %define apxs %{_sbindir}/apxs
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: apache-mod_%{mod_name}
9 Group: Networking/Daemons
10 Source0: http://prdownloads.sourceforge.net/accessreferer/mod_%{mod_name}-%{version}.tar.gz
11 URL: http://sourceforge.net/projects/accessreferer/
12 BuildRequires: %{apxs}
13 BuildRequires: apache(EAPI)-devel
14 Prereq: %{_sbindir}/apxs
15 Requires: apache(EAPI)
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
21 This is an module for the Apache HTTP Server that provides access
22 control based on "Referer" HTTP header content.
25 Modu³ ten pozwala na kontrolowanie dostêpu do plików na serwerze w
26 zale¿no¶ci od zawarto¶ci standardowego nag³ówka HTTP - "REFERER"
29 %setup -q -n mod_%{mod_name}-%{version}
32 PATH=$PATH:%{_sbindir}
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT%{_pkglibdir}
39 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
42 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
43 if [ -f /var/lock/subsys/httpd ]; then
44 /etc/rc.d/init.d/httpd restart 1>&2
48 if [ "$1" = "0" ]; then
49 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
50 if [ -f /var/lock/subsys/httpd ]; then
51 /etc/rc.d/init.d/httpd restart 1>&2
56 rm -rf $RPM_BUILD_ROOT
59 %defattr(644,root,root,755)
61 %attr(755,root,root) %{_pkglibdir}/*