view Makefile @ 32:082f7a76fa48

update to logstash 1.1.13
author Carl Byington <carl@five-ten-sg.com>
date Wed, 29 May 2013 11:37:41 -0700
parents e84d1f4fe2bf
children 0faebb0b0fa4
line wrap: on
line source

ifeq ($(dist),)
dist=.f20
endif

gv=1.1.13
f=logstash-$(gv)-monolithic.jar
g=logstash-$(gv).tar.gz
hv=0.90.0
h=elasticsearch-$(hv).tar.gz
i=GraphTastic.tar.gz
icc=06a620d011d08bd2c1099c0d0810c053bf105400
jv=1.7.3
j=jruby-complete-$(jv).jar
k=GeoLite-City-2013-01-18.dat.gz
lcc=df8ae2344433e5072a8dfe77082acfd1c9b6ed62
lcs=df8ae234
lv=0.2.0
l=Kibana-$(lv)-$(lcs).tar.gz

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)
	[ -f $(i) ] || curl https://nodeload.github.com/NickPadilla/GraphTastic/tar.gz/$(icc) >$(i)
	[ -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)
	[ -f $(l) ] || curl https://nodeload.github.com/rashidkpc/Kibana/tar.gz/$(lcc) >$(l)

logstash.manifest:
	# build the classpath in a manifest file
	echo "Class-Path: /usr/share/jruby.jar /usr/share/graphtastic-client.jar " >logstash.manifest
	for i in /usr/share/elasticsearch/{lucene-{core,analyzers-common,codecs,queries,memory,highlighter,queryparser,sandbox,suggest,join,grouping,spatial},spatial4j,jts,log4j,jna,elasticsearch}.jar; do \
		echo "  $$i" >>logstash.manifest; \
	done

srpm: logstash.manifest
	# build the source rpms
	rpmbuild --define "dist $(dist)" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs Kibana.spec
	rpmbuild --define "dist $(dist)" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs jruby.spec
	rpmbuild --define "dist $(dist)" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs GraphTastic-client.spec
	rpmbuild --define "dist $(dist)" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs elasticsearch.spec
	rpmbuild --define "dist $(dist)" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs logstash.spec

rpm:
	# kill off maven repository cache
	rm -rf ~/.m2
	# build binary rpms
	rpmbuild --define "dist $(dist)" --define "_rpmdir $(shell pwd)" --rebuild Kibana-$(lv)-1$(dist).src.rpm
	rpmbuild --define "dist $(dist)" --define "_rpmdir $(shell pwd)" --rebuild jruby-$(jv)-0$(dist).src.rpm
	rpmbuild --define "dist $(dist)" --define "_rpmdir $(shell pwd)" --rebuild GraphTastic-client-0.0.0-0$(dist).src.rpm
	rpmbuild --define "dist $(dist)" --define "_rpmdir $(shell pwd)" --rebuild elasticsearch-$(hv)-0$(dist).src.rpm
	rpmbuild --define "dist $(dist)" --define "_rpmdir $(shell pwd)" --rebuild rubygem-tzinfo*src.rpm
	rpmbuild --define "dist $(dist)" --define "_rpmdir $(shell pwd)" --rebuild logstash-$(gv)-0$(dist).src.rpm