File dba-couchdb-121.spec of Package dba-couchdb-121

#
# spec file for package dba-couchdb-121
#

%define real_name       couchdb
%define version         1.2.1
%define vers            121
%define prefix          /DBA/%{real_name}/%{version}
%define maketest        0


Name:           dba-%{real_name}-%{vers}
Version:        %{version}
Release:        1
Summary:        A document database server, accessible via a RESTful JSON API
License:        Apache-2.0
Group:          Productivity/File utilities
Url:            http://couchdb.apache.org/
Source0:        http://www.apache.org/dist/%{real_name}/releases/%{version}/apache-couchdb-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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

#!BuildIgnore:  dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c dba-openssl-101e

BuildRequires:  automake
BuildRequires:  erlang
BuildRequires:  gcc-c++
BuildRequires:  libcurl-devel
BuildRequires:  libicu-devel
BuildRequires:  libtool
BuildRequires:  js-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig


%description
Apache CouchDB is a distributed, fault-tolerant and schema-free
document-oriented database accessible via a RESTful HTTP/JSON API.
Among other features, it provides robust, incremental replication
with bi-directional conflict detection and resolution, and is
queryable and indexable using a table-oriented view engine with
JavaScript acting as the default view definition language.

%prep
%setup -q -n apache-couchdb-%{version}


%build
#autoreconf -fi
# We need to define the use of gnu99 standard. It seems expected in the code, but not passed.
export CFLAGS="%{optflags} -std=gnu99"

./configure --prefix=%{prefix} \
   --enable-js-trunk \

make %{?_smp_mflags}

%install
%makeinstall
find %{buildroot} -name '*.la' -delete -print


%check
%if %maketest
make check
%endif


%files
%defattr(-,root,root)
%dir %{prefix}
%{prefix}/bin
%{prefix}/etc
%{prefix}/lib
%{prefix}/share


%changelog
* Thu Sep 19 2013 Holger Manthey <holger.manthey@bertelsmann.de>
- inital version