changeset 13:c0150404962d

start working on building from source
author Carl Byington <carl@five-ten-sg.com>
date Sat, 06 Apr 2013 08:48:09 -0700
parents 567e51f1f5e7
children 0e45fe64b10d
files Makefile logstash.Makefile logstash.spec
diffstat 3 files changed, 49 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri Mar 22 15:09:21 2013 -0700
+++ b/Makefile	Sat Apr 06 08:48:09 2013 -0700
@@ -1,7 +1,15 @@
 f=logstash-1.1.9-monolithic.jar
-
+g=logstash-1.1.9.tar.gz
+h=elasticsearch-0.20.6.tar.gz
+i=GraphTastic.tar.gz
+icc=06a620d011d08bd2c1099c0d0810c053bf105400
 all:
 	[ -f $f ] || curl https://logstash.objects.dreamhost.com/release/$f >$f
+	[ -f $g ] || curl https://nodeload.github.com/logstash/logstash/tar.gz/v1.1.9 >$g
+	[ -f $h ] || curl https://nodeload.github.com/elasticsearch/elasticsearch/tar.gz/v0.20.6 >$h
+	[ -f $i ] || curl https://nodeload.github.com/NickPadilla/GraphTastic/tar.gz/$(icc) >$i
 	[ -d builder ] && rm -rf builder || /bin/true
 	mkdir builder
 	rpmbuild --define "_sourcedir $(shell pwd)" --define "_builddir $(shell pwd)/builder" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" -ba logstash.spec
+	[ -d builder ] && rm -rf builder || /bin/true
+	rpmbuild --define "_builddir $(shell pwd)/builder" --rebuild logstash-1.1.9-0.src.rpm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/logstash.Makefile	Sat Apr 06 08:48:09 2013 -0700
@@ -0,0 +1,19 @@
+all:
+	echo '********** in my local makefile'
+
+	# make the graphtastic client interface class
+	echo '********** build with raw javac, rather than maven'
+	cd GT/GraphTastic;                                                              \
+	javac src/main/java/com/monstersoftwarellc/graphtastic/rmi/IRmiService.java;    \
+	find . -name '*.class'
+	echo '********* done with graphtastic build'
+
+	# make the elastic search jar
+	cd ES/elasticsearch-0.20.6;							   \
+	export PATH=/usr/local/apache-maven-3.0.5/bin:$(PATH); \
+	mvn -Dmaven.test.skip=true package;                    \
+	find . -name '*.jar';                                  \
+	find . -name '*.class'
+	echo '********* done with elastic search build'
+
+	# make the logstash jar
--- a/logstash.spec	Fri Mar 22 15:09:21 2013 -0700
+++ b/logstash.spec	Sat Apr 06 08:48:09 2013 -0700
@@ -2,6 +2,8 @@
 %define __os_install_post %{nil}
 
 %define _bindir  /usr/local/bin
+%define ES_VERSION 0.20.6
+%define gtcommit   06a620d011d08bd2c1099c0d0810c053bf105400
 
 Summary:        logstash is a tool for managing events and logs.
 Name:           logstash
@@ -13,6 +15,13 @@
 BuildArch:      noarch
 Source0:        https://logstash.objects.dreamhost.com/release/%{name}-%{version}-monolithic.jar
 Source1:        https://logstash.jira.com/secure/attachment/12610/logstash_index_cleaner.py
+#Source2:         curl https://nodeload.github.com/logstash/logstash/tar.gz/v1.1.9 >logstash-1.1.9.tar.gz
+Source2:        %{name}-%{version}.tar.gz
+Source3:        %{name}.Makefile
+#Source4:         curl https://nodeload.github.com/elasticsearch/elasticsearch/tar.gz/V%{ES_VERSION}.tar.gz >elasticsearch-%{ES_VERSION}.tar.gz
+Source4:        elasticsearch-%{ES_VERSION}.tar.gz
+#Source5:         https://github.com/NickPadilla/GraphTastic/tar.gz/%{gtcommit} >GraphTastic.tar.gz
+Source5:        GraphTastic.tar.gz
 Source10:       %{name}.rc
 Source11:       %{name}.cron
 Source12:       %{name}.conf
@@ -26,6 +35,7 @@
 Requires(postun):       /usr/sbin/userdel
 Requires(post,preun):   /sbin/chkconfig
 Requires(post,preun):   /sbin/service
+#BuildRequires:  maven
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 
@@ -37,14 +47,23 @@
 
 
 %prep
-true
+%setup -q -T -b 2
+mkdir ES
+cd ES
+gzip -dc %SOURCE4 | tar -xvvf -
+cd ..
+mkdir GT
+cd GT
+gzip -dc %SOURCE5 | tar -xvvf -
+mv GraphTastic-%{gtcommit} GraphTastic
 
 
 %build
-true
+make -f %SOURCE3
 
 
 %install
+# for now, ignore the results of the build, and just package the source jar files.
 rm -rf $RPM_BUILD_ROOT
 mkdir  -p $RPM_BUILD_ROOT/var/log/%{name}
 install -D -m 750 %SOURCE0   $RPM_BUILD_ROOT/%{_bindir}/%{name}.jar