diff logstash.Makefile @ 15:c158cae7cd26

work on building from source
author Carl Byington <carl@five-ten-sg.com>
date Thu, 11 Apr 2013 10:18:06 -0700
parents 0e45fe64b10d
children aa606d801e02
line wrap: on
line diff
--- a/logstash.Makefile	Wed Apr 10 21:24:14 2013 -0700
+++ b/logstash.Makefile	Thu Apr 11 10:18:06 2013 -0700
@@ -6,7 +6,7 @@
 
 SYSJRUBY=$(shell which jruby 2>/dev/null)
 ifeq ($(SYSJRUBY),)
-JRUBY_CMD=java -jar /usr/local/bin/jruby.jar
+JRUBY_CMD=java -jar /usr/share/jruby.jar
 else
 JRUBY_CMD=jruby
 endif
@@ -15,18 +15,12 @@
 GEOIP=GeoLiteCity.dat
 
 all:
-	echo '********** in my local makefile'
-
-	# make the target directory to collect all the class files that will be in the final jar
-	mkdir target
-
-	# make the logstash jar
 	# compile-grammer
 	touch lib/logstash/config/grammar.rl	# force rebuild
 	make -C lib/logstash/config grammar.rb
 	# compile-runner
 	mkdir -p build/ruby
-	(cd lib; $(JRUBYC) -5 -t ../build/ruby logstash/runner.rb)
+	cd lib; $(JRUBYC) -5 -t ../build/ruby logstash/runner.rb
 	# copy-ruby-files
 	find ./lib	-name '*.rb' | sed -e 's,^\./lib/,,'  | (cd lib;  cpio -p --make-directories ../build/ruby)
 	find ./test -name '*.rb' | sed -e 's,^\./test/,,' | (cd test; cpio -p --make-directories ../build/ruby)
@@ -38,14 +32,15 @@
 	rm -rf ./vendor/bundle/jruby/1.9/gems/*/spec
 	rm -rf ./vendor/bundle/jruby/1.9/gems/*/test
 	# build-monolith
-	mkdir -p build/monolith/openssl build/monolith/jopenssl
+	mkdir -p build/monolith/openssl
+	mkdir -p build/monolith/jopenssl
 	# unpack all jars
 	find $$PWD/vendor/bundle -name '*.jar' | (cd build/monolith; xargs -n1 jar xf)
 	# copy openssl/lib/shared folders/files to root of jar - need this for openssl to work with JRuby
 	cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/openssl/*	build/monolith/openssl
 	cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/jopenssl/*	build/monolith/jopenssl
 	cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/openssl.rb	build/monolith/openssl.rb
-	# purge any extra files we don't need in META-INF (like manifests and @# signature files)
+	# purge any extra files we don't need in META-INF (like manifests and signature files)
 	rm -f build/monolith/META-INF/*.LIST
 	rm -f build/monolith/META-INF/*.MF
 	rm -f build/monolith/META-INF/*.RSA
@@ -55,8 +50,8 @@
 	rm -f build/monolith/META-INF/LICENSE
 	rm -f build/monolith/META-INF/LICENSE.txt
 	cp $(GEOIP) build/monolith/
-	# build-monolith-jar
-	jar cfe build/logstash-$(VERSION)-monolithic.jar logstash.runner \
+	# build-logstash-jar
+	jar cfe build/logstash.jar logstash.runner       \
 		-C build/ruby .								 \
 		-C build/monolith .							 \
 		-C vendor/bundle/jruby/1.9 gems				 \
@@ -65,6 +60,3 @@
 		-C lib logstash/certs						 \
 		-C lib logstash/web/views					 \
 		patterns
-	# see what we have
-	unzip -t build/logstash-$(VERSION)-monolithic.jar >/tmp/log.mono.jar.txt
-	sort /tmp/log.mono.jar.txt >/tmp/log.mono.jar.sort.txt