view elasticsearch.spec @ 24:0f249d38da21

jruby.spec needs /usr/share to match fedora jrudy location
author Carl Byington <>
date Fri, 19 Apr 2013 17:48:29 -0700
parents bb48b2672ff2
children f2691b83bafa
line wrap: on
line source

# prevent brp repack jar files
%define __os_install_post %{nil}

Summary:        elasticsearch is a scalable full text search engine
Name:           elasticsearch
Version:        0.20.6
Release:        0%{?dist}
Group:          System Environment/Daemons
License:        Apache 2.0
BuildArch:      noarch
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  java-devel

%if "%{?dist}" != ".el6"
# el6 does not have maven yet, so we assume it is manually installed
# in /usr/local/apache-maven-3.0.5
BuildRequires:  maven-local


%setup -q

[ "%{?dist}" == ".el6" ] && export PATH=/usr/local/apache-maven-3.0.5/bin:$PATH
mvn -Dmaven.test.skip=true clean package

mkdir xx
cd xx
tar xfz ../target/releases/%{name}-%{version}.tar.gz
for f in %{name}-%{version}/lib/*.jar; do
    b=$(basename $f)
    install -D -p -m 644 $f $RPM_BUILD_ROOT%{_javadir}/%{name}/$b
cd $RPM_BUILD_ROOT%{_javadir}/%{name}
for f in elasticsearch jna jts log4j lucene-core lucene-analyzers lucene-highlighter lucene-memory lucene-queries snappy-java spatial4j; do
    v=$(echo $f*.jar)
    ln --symbolic $v $f.jar


%attr(0755,root,root) %{_javadir}/%{name}

* Wed Apr 10 2013  <> - 0.20.6-0
- Initial build.