comparison 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
comparison
equal deleted inserted replaced
20:a94969b736cb 21:1d50b19beda0
18 # compile-grammer 18 # compile-grammer
19 touch lib/logstash/config/grammar.rl # force rebuild 19 touch lib/logstash/config/grammar.rl # force rebuild
20 make -C lib/logstash/config grammar.rb 20 make -C lib/logstash/config grammar.rb
21 # compile-runner 21 # compile-runner
22 mkdir -p build/ruby 22 mkdir -p build/ruby
23 cd lib; $(JRUBYC) -5 -t ../build/ruby logstash/runner.rb 23 cd lib; $(JRUBYC) -t ../build/ruby logstash/runner.rb
24 # copy-ruby-files 24 # copy-ruby-files
25 find ./lib -name '*.rb' | sed -e 's,^\./lib/,,' | (cd lib; cpio -p --make-directories ../build/ruby) 25 rsync -a --include "*/" --include "*.rb" --exclude "*" ./lib/ ./test/ ./build/ruby
26 find ./test -name '*.rb' | sed -e 's,^\./test/,,' | (cd test; cpio -p --make-directories ../build/ruby) 26 rsync -a ./spec ./build/ruby
27 rsync -av ./spec build/ruby 27 rsync -a ./locales ./build/ruby
28 # Delete any empty directories copied by rsync.
29 find ./build/ruby -type d -empty -delete
28 # install-gems 30 # install-gems
29 mkdir -p vendor/bundle 31 mkdir -p vendor/bundle
30 GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 ./gembag.rb logstash.gemspec 32 GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 ./gembag.rb logstash.gemspec
33 # Purge old versions of gems installed because gembag doesn't do dependency resolution correctly
34 GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 -S gem uninstall addressable -v 2.2.8
35 # Purge any junk that fattens our jar without need!
31 rm -rf ./vendor/bundle/jruby/1.9/gems/riak-client-1.0.3/pkg 36 rm -rf ./vendor/bundle/jruby/1.9/gems/riak-client-1.0.3/pkg
32 rm -rf ./vendor/bundle/jruby/1.9/gems/*/spec 37 rm -rf ./vendor/bundle/jruby/1.9/gems/*/spec
33 rm -rf ./vendor/bundle/jruby/1.9/gems/*/test 38 rm -rf ./vendor/bundle/jruby/1.9/gems/*/test
34 # build-monolith 39 # build-monolith
35 mkdir -p build/monolith/openssl 40 mkdir -p build/monolith/openssl
47 rm -f build/monolith/META-INF/*.SF 52 rm -f build/monolith/META-INF/*.SF
48 rm -f build/monolith/META-INF/NOTICE 53 rm -f build/monolith/META-INF/NOTICE
49 rm -f build/monolith/META-INF/NOTICE.txt 54 rm -f build/monolith/META-INF/NOTICE.txt
50 rm -f build/monolith/META-INF/LICENSE 55 rm -f build/monolith/META-INF/LICENSE
51 rm -f build/monolith/META-INF/LICENSE.txt 56 rm -f build/monolith/META-INF/LICENSE.txt
52 rm -rf build/monolith/org/jruby/ext/openssl
53 cp $(GEOIP) build/monolith/ 57 cp $(GEOIP) build/monolith/
54 # build the classpath in a manifest file
55 #echo -n "Class-Path: /usr/share/jruby.jar /usr/local/bin/graphtastic-client.jar " >logstash.manifest
56 #echo /usr/local/bin/{elasticsearch,jna,jts,log4j,lucene-core,lucene-analyzers,lucene-highlighter,lucene-memory,lucene-queries,snappy-java,spatial4j}.jar >>logstash.manifest
57 # build-logstash-jar 58 # build-logstash-jar
58 jar cfme build/logstash.jar logstash.manifest logstash.runner \ 59 jar cfme build/logstash.jar logstash.manifest logstash.runner \
59 -C build/ruby . \ 60 -C build/ruby . \
60 -C build/monolith . \ 61 -C build/monolith . \
61 -C vendor/bundle/jruby/1.9 gems \ 62 -C vendor/bundle/jruby/1.9 gems \
62 -C vendor/bundle/jruby/1.9 specifications \ 63 -C vendor/bundle/jruby/1.9 specifications \
63 -C lib logstash/web/public \ 64 -C lib logstash/web/public \
64 -C lib logstash/certs \ 65 -C lib logstash/certs \
65 -C lib logstash/web/views \ 66 -C lib logstash/web/views \
66 patterns 67 patterns
68
69 manifest:
70 # build the classpath in a manifest file
71 echo "Class-Path: /usr/share/jruby.jar /usr/local/bin/graphtastic-client.jar " >logstash.manifest
72 for i in /usr/local/bin/elasticsearch/{elasticsearch,jna,jts,log4j,lucene-{core,analyzers,highlighter,memory,queries},snappy-java,spatial4j}.jar; do \
73 echo " $$i" >>logstash.manifest; \
74 done