Sophie

Sophie

distrib > Mandriva > 10.0-com > x86_64 > by-pkgid > b0b9f044ba35f68e2852b83ab8afa28e > files > 3

apache2-mod_geo-2.0.48_1.3.0-1mdk.src.rpm

#Module-Specific definitions
%define mod_version 1.3.0
%define release 1mdk
%define mod_name mod_geo
%define mod_conf A10_%{mod_name}.conf
%define mod_so %{mod_name}.so
%define sourcename %{mod_name}-%{mod_version}

#New ADVX macros
%define ADVXdir %{_datadir}/ADVX
%{expand:%(cat %{ADVXdir}/ADVX-build)}
%{expand:%%global ap_version %(%{apxs} -q ap_version)}

# Standard Module Definitions
%define name %{ap_name}-%{mod_name}
%define version %{ap_version}_%{mod_version}

#Standard ADVX requires
Prereq:		%{ap_name} = %{ap_version}
Prereq:		%{ap_name}-conf
BuildPreReq:	ADVX-build >= 9.2
BuildRequires:	%{ap_name}-devel >= 2.0.43-5mdk
Provides: 	ADVXpackage
Provides:	AP20package

Summary:	Mod_geo is a DSO module for the %{ap_name} Web server.
Name:		%{name}
Version:	%{version}
Release:	%{release}
Group:		System/Servers
Source0: 	%{sourcename}.tar.bz2
Source1:	%{mod_conf}.bz2
Source2:	README_en.html.bz2
Patch0:		mod_geo-1.3.0-register.patch.bz2
License:	Apache License
URL:		http://www.lexa.ru/programs/mod-geo.html
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
The module is intended for definition of geography of the user of
the WWW-server and transfer of geography to caused script/dynamic
pages as additional argument of search. It can be useful, if
depending on region different contents of reciprocal page are
formed, we shall tell different advertising or different links to
Internets - shops (for example, American for US/CA, European for
the others).

%prep

%setup -q -n %{mod_name}-%{mod_version}
%patch0 -p0 -b .register

bzcat %{SOURCE2} > README_en.html

%build

# fix naming...
perl -p -i -e "s|geo2|geo|g" %{mod_name}2.c
mv %{mod_name}2.c %{mod_name}.c

%{apxs} -c %{mod_name}.c

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%ADVXinstlib
%ADVXinstconf %{SOURCE1} %{mod_conf}
%ADVXinstdoc %{name}-%{version}

install -d %{buildroot}%{ap_sysconfdir}
install -m644 country-codes.txt %{buildroot}%{ap_sysconfdir}/mod_geo-country-codes.txt
install -m644 ipranges.2002-01-10 %{buildroot}%{ap_sysconfdir}/mod_geo-ipranges.2002-01-10

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%post
%ADVXpost

%postun
%ADVXpost

%files
%defattr(-,root,root)
%doc ChangeLog README* libpatricia.copyright
%config(noreplace) %{ap_confd}/%{mod_conf}
%config(noreplace) %{ap_sysconfdir}/mod_geo-country-codes.txt
%config(noreplace) %{ap_sysconfdir}/mod_geo-ipranges.2002-01-10
%{ap_extralibs}/%{mod_so}
%{ap_webdoc}/*

%changelog
* Wed Nov 05 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.48_1.3.0-1mdk
- built for apache 2.0.48

* Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.47_1.3.0-1mdk
- rebuilt against latest apache2, requires and buildrequires

* Sat May 31 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.46_1.3.0-1mdk
- rebuilt for apache v2.0.46
- buildprereq ADVX-build >= 9.2

* Thu May 22 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.45_1.3.0-1mdk
- initial cooker contrib
- added P0
- added the english readme by Günter Knauf