LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dba-apache2-mod_geoip-129.spec of Package dba-apache2-mod_geoip-129 (Project home:csbuild:DBA)

%define vers	129
%define version	1.2.9
%define prefix	/DBA/apache/WWW/2.2.x
%define apavers 2.2.29
%define apapack 2229
%define apahome /DBA/apache/WWW/%{apavers}
%define apxs    %{apahome}/bin/apxs
%define modname mod_geoip

Name:           dba-apache2-mod_geoip-%{vers}
Summary:        Apache GeoIP Module 1.2.9
Version:        %{version}
Release:        1
License:        GPL
Url:            http://dev.maxmind.com/geoip/legacy/mod_geoip2/
Source0:        https://github.com/maxmind/geoip-api-mod_geoip2/archive/geoip-api-mod_geoip2-%{version}.tar.gz
Group:          Productivity/Networking/Web/Servers
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  dba-apache-%{apapack}
Requires:  	dba-apache-base

#!BuildIgnore:  dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c
BuildRequires:  gcc-c++
BuildRequires:  automake libtool

BuildRequires:  dba-geoip-163-static
%define geoippath /DBA/geoip/1.6.3

%if 0%{?suse_version}
BuildRequires:  libapr-util1-devel >= 1.3 libapr1-devel >= 1.3
%else
BuildRequires:  apr-util-devel apr-devel
%endif

%if 0%{?suse_version} >= 1000
BuildRequires:  openldap2-devel
%endif

%if 0%{?suse_version} >= 1110
BuildRequires:  -post-build-checks
%endif


%description
The mod_geoip2 module embeds GeoIP Legacy database lookups into the Apache web server. It is only capable of looking up the IP of a client that connects to the web server, as opposed to looking up arbitrary addresses. 

%prep
%setup -q -n geoip-api-mod_geoip2-%{version}


%build
%{apxs} -c -I%{geoippath}/include -L%{geoippath}/lib -lGeoIP mod_geoip.c

# %{__make}


%install
# prevent rpath problem on suse
export NO_BRP_CHECK_RPATH=true

%{__mkdir_p} %{buildroot}%{prefix}/bin
%{__mkdir_p} %{buildroot}%{prefix}/conf
%{__mkdir_p} %{buildroot}%{prefix}/modules

install -m 755 .libs/%{modname}.so %{buildroot}%{prefix}/modules/%{modname}-%{version}.so


%clean
%{__rm} -rf %{buildroot};


%files
%defattr(-,root,root,-)
%{prefix}/modules/%{modname}-%{version}.so


%changelog
* Tue Feb 10 2015 Holger Manthey <holger.manthey@bertelsmann.de>
- initial build