1 %define mod_name access_referer
2 %define apxs /usr/sbin/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}
35 rm -rf $RPM_BUILD_ROOT
36 install -d $RPM_BUILD_ROOT%{_pkglibdir}
38 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
40 gzip -9nf README ChangeLog
43 %{_sbindir}/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
44 if [ -f /var/lock/subsys/httpd ]; then
45 /etc/rc.d/init.d/httpd restart 1>&2
49 if [ "$1" = "0" ]; then
50 %{_sbindir}/apxsks -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
51 if [ -f /var/lock/subsys/httpd ]; then
52 /etc/rc.d/init.d/httpd restart 1>&2
57 rm -rf $RPM_BUILD_ROOT
60 %defattr(644,root,root,755)
62 %attr(755,root,root) %{_pkglibdir}/*