LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

%define vers	100
%define version	1.0.0
%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_maxminddb

Name:           dba-apache2-mod_maxminddb-%{vers}
Summary:        MaxMind DB Apache Module version 1.0.0
Version:        %{version}
Release:        1
License:        GPL
Url:            http://dev.maxmind.com/
Source0:        https://github.com/maxmind/%{modname}/releases/download/%{version}/%{modname}-%{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-libmaxminddb-104-static
%define maxpath /DBA/libmaxminddb/1.0.4

%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
This module allows you to query MaxMind DB files from Apache 2.2+ using the libmaxminddb library.


%prep
%setup -q -n %{modname}-%{version}


%build
# export CFLAGS="%{optflags} -std=c99 -I%{maxpath}/include"
export CFLAGS="%{optflags} -DMAXMINDDB_DEBUG=1 -std=gnu99 -I%{maxpath}/include"
# export LDFLAGS="$LDFLAGS -L%{maxpath}/lib -lmaxminddb"
export LDFLAGS="$LDFLAGS -L%{maxpath}/lib"

./configure --with-apxs=%{apxs}

%{__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

# %{__make} install DESTDIR=%{buildroot}

install -m 644 t/conf/extra.conf.in %{buildroot}%{prefix}/conf
install -m 755 src/.libs/%{modname}.so %{buildroot}%{prefix}/modules/%{modname}-%{version}.so


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


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


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