changeset 17:292b6583148a

work on building from source
author Carl Byington <carl@five-ten-sg.com>
date Fri, 12 Apr 2013 15:05:23 -0700
parents aa606d801e02
children 2b887e35b5cd
files GraphTastic-client.spec Makefile elasticsearch.spec logstash.Makefile logstash.manifest
diffstat 5 files changed, 30 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/GraphTastic-client.spec	Thu Apr 11 13:48:24 2013 -0700
+++ b/GraphTastic-client.spec	Fri Apr 12 15:05:23 2013 -0700
@@ -15,7 +15,7 @@
 #Source0:         https://github.com/NickPadilla/GraphTastic/tar.gz/%{gtcommit} >GraphTastic.tar.gz
 Source0:        GraphTastic.tar.gz
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-BuildRequires:  java-1.7.0-openjdk
+BuildRequires:  java-1.7.0-openjdk-devel
 
 %description
 
--- a/Makefile	Thu Apr 11 13:48:24 2013 -0700
+++ b/Makefile	Fri Apr 12 15:05:23 2013 -0700
@@ -12,7 +12,7 @@
 j=jruby-complete-$(jv).jar
 k=GeoLite-City-2013-01-18.dat.gz
 
-all:
+download:
 	[ -f $f ] || curl https://logstash.objects.dreamhost.com/release/$f >$f
 	[ -f $g ] || curl https://nodeload.github.com/logstash/logstash/tar.gz/v$(gv) >$g
 	[ -f $h ] || curl https://nodeload.github.com/elasticsearch/elasticsearch/tar.gz/v$(hv) >$h
@@ -20,14 +20,18 @@
 	[ -f $j ] || curl http://repository.codehaus.org/org/jruby/jruby-complete/$(jv)/$j >$j
 	[ -f $k ] || curl http://logstash.objects.dreamhost.com/maxmind/$k >$k
 
+srpm: download
 	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs jruby.spec
-	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild jruby-$(jv)-0.$d.src.rpm
-
 	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs GraphTastic-client.spec
-	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild GraphTastic-client-0.0.0-0.$d.src.rpm
+	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs elasticsearch.spec
+	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs logstash.spec
 
-	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs elasticsearch.spec
+rpm:
+	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild jruby-$(jv)-0.$d.src.rpm
+	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild GraphTastic-client-0.0.0-0.$d.src.rpm
 	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild elasticsearch-$(hv)-0.$d.src.rpm
+	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild logstash-$(gv)-0.$d.src.rpm
 
-	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs logstash.spec
-	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild logstash-$(gv)-0.$d.src.rpm
+package-web:
+	tar cfz logstash.fedora.tar.gz *.src.rpm $(hg status -c | cut -c3-)
+
--- a/elasticsearch.spec	Thu Apr 11 13:48:24 2013 -0700
+++ b/elasticsearch.spec	Fri Apr 12 15:05:23 2013 -0700
@@ -14,7 +14,7 @@
 #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
+BuildRequires:  java-1.7.0-openjdk-devel
 
 %if "%{?dist}" != ".el6"
 # el6 does not have maven yet, so we assume it is manually installed
@@ -31,12 +31,26 @@
 
 %build
 [ "%{?dist}" == ".el6" ] && export PATH=/usr/local/apache-maven-3.0.5/bin:$PATH
-mvn -Dmaven.test.skip=true package
+sed -i -e 's,guava</include>,guava</include>            \
+    <include>org.apache.lucene:lucene</include>         \
+    <include>log4j:log4j</include>                      \
+    <include>net.java.dev.jna:jna</include>             \
+    <include>org.xerial.snappy:snappy-java</include>    \
+    <include>com.spatial4j:spatial4j</include>          \
+    <include>com.vividsolutions:jts</include>,g' pom.xml
+sed -i -e 's,<optional>true</optional>,,g'       pom.xml
+sed -i -e 's,useTransitiveFiltering>true,useTransitiveFiltering>false,g'  src/main/assemblies/common-bin.xml
+echo '*********' pom.xml
+cat pom.xml
+echo '*********' src/main/assemblies/common-bin.xml
+cat src/main/assemblies/common-bin.xml
+mvn -Dmaven.test.skip=true clean package
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -D -p -m 644 target/elasticsearch-%{version}.jar $RPM_BUILD_ROOT%{_bindir}/elasticsearch.jar
+find . -name '*.jar'
 
 
 %clean
--- a/logstash.Makefile	Thu Apr 11 13:48:24 2013 -0700
+++ b/logstash.Makefile	Fri Apr 12 15:05:23 2013 -0700
@@ -49,6 +49,7 @@
 	rm -f build/monolith/META-INF/NOTICE.txt
 	rm -f build/monolith/META-INF/LICENSE
 	rm -f build/monolith/META-INF/LICENSE.txt
+	rm -rf build/monolith/org/jruby/ext/openssl
 	cp $(GEOIP) build/monolith/
 	# build-logstash-jar
 	jar cfme build/logstash.jar logstash.manifest logstash.runner       \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/logstash.manifest	Fri Apr 12 15:05:23 2013 -0700
@@ -0,0 +1,1 @@
+Class-Path: /usr/share/jruby.jar /usr/local/bin/graphtastic-client.jar /usr/local/bin/elasticsearch.jar