diff elasticsearch.spec @ 14:0e45fe64b10d

work on building from source
author Carl Byington <carl@five-ten-sg.com>
date Wed, 10 Apr 2013 21:24:14 -0700
parents
children aa606d801e02
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/elasticsearch.spec	Wed Apr 10 21:24:14 2013 -0700
@@ -0,0 +1,54 @@
+# prevent brp repack jar files
+%define __os_install_post %{nil}
+
+%define _bindir  /usr/local/bin
+
+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
+URL:            http://www.elasticsearch.org/
+BuildArch:      noarch
+#Source0:         curl https://nodeload.github.com/elasticsearch/elasticsearch/tar.gz/v%{version} >elasticsearch-%{version}.tar.gz
+Source0:        %{name}-%{version}.tar.gz
+BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+BuildRequires:  java-1.7.0-openjdk
+
+%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
+%endif
+
+%description
+
+
+%prep
+%setup -q
+
+
+%build
+[ "%{?dist}" == ".el6" ] && export PATH=/usr/local/apache-maven-3.0.5/bin:$PATH
+mvn -Dmaven.test.skip=true package
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -D -p -m 644 target/elasticsearch-%{version}.jar $RPM_BUILD_ROOT%{_bindir}/elasticsearch.jar
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%attr(0755,root,root) %{_bindir}/*
+
+
+
+%changelog
+* Wed Apr 10 2013  <carl@five-ten-sg.com> - 0.20.6-0
+- Initial build.