Mercurial > logstash
diff logstash.Makefile @ 21:1d50b19beda0
work on building from source
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 17 Apr 2013 17:38:14 -0700 |
parents | 729f36e68da8 |
children | bb48b2672ff2 |
line wrap: on
line diff
--- a/logstash.Makefile Wed Apr 17 13:10:34 2013 -0700 +++ b/logstash.Makefile Wed Apr 17 17:38:14 2013 -0700 @@ -20,14 +20,19 @@ 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) -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) - rsync -av ./spec build/ruby + rsync -a --include "*/" --include "*.rb" --exclude "*" ./lib/ ./test/ ./build/ruby + rsync -a ./spec ./build/ruby + rsync -a ./locales ./build/ruby + # Delete any empty directories copied by rsync. + find ./build/ruby -type d -empty -delete # install-gems mkdir -p vendor/bundle GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 ./gembag.rb logstash.gemspec + # Purge old versions of gems installed because gembag doesn't do dependency resolution correctly + GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 -S gem uninstall addressable -v 2.2.8 + # Purge any junk that fattens our jar without need! rm -rf ./vendor/bundle/jruby/1.9/gems/riak-client-1.0.3/pkg rm -rf ./vendor/bundle/jruby/1.9/gems/*/spec rm -rf ./vendor/bundle/jruby/1.9/gems/*/test @@ -49,13 +54,9 @@ 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 the classpath in a manifest file - #echo -n "Class-Path: /usr/share/jruby.jar /usr/local/bin/graphtastic-client.jar " >logstash.manifest - #echo /usr/local/bin/{elasticsearch,jna,jts,log4j,lucene-core,lucene-analyzers,lucene-highlighter,lucene-memory,lucene-queries,snappy-java,spatial4j}.jar >>logstash.manifest # build-logstash-jar - jar cfme build/logstash.jar logstash.manifest logstash.runner \ + jar cfme build/logstash.jar logstash.manifest logstash.runner \ -C build/ruby . \ -C build/monolith . \ -C vendor/bundle/jruby/1.9 gems \ @@ -64,3 +65,10 @@ -C lib logstash/certs \ -C lib logstash/web/views \ patterns + +manifest: + # build the classpath in a manifest file + echo "Class-Path: /usr/share/jruby.jar /usr/local/bin/graphtastic-client.jar " >logstash.manifest + for i in /usr/local/bin/elasticsearch/{elasticsearch,jna,jts,log4j,lucene-{core,analyzers,highlighter,memory,queries},snappy-java,spatial4j}.jar; do \ + echo " $$i" >>logstash.manifest; \ + done