annotate logstash.Makefile @ 26:610835fb4209

external configuration for kibana
author Carl Byington <carl@five-ten-sg.com>
date Fri, 03 May 2013 08:04:08 -0700
parents bb48b2672ff2
children f2691b83bafa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
1 #
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
2 # fedora uses system jruby
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
3 # el6 uses minimal jruby.jar
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
4 #
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
5 VERSION=$(shell awk -F\" '/LOGSTASH_VERSION/ {print $$2}' lib/logstash/version.rb)
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
6
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
7 SYSJRUBY=$(shell which jruby 2>/dev/null)
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
8 ifeq ($(SYSJRUBY),)
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
9 JRUBY_CMD=java -jar /usr/share/jruby.jar
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
10 else
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
11 JRUBY_CMD=jruby
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
12 endif
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
13 WITH_JRUBY=$(JRUBY_CMD) -S
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
14 JRUBYC=$(WITH_JRUBY) jrubyc
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
15 GEOIP=GeoLiteCity.dat
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
16
13
c0150404962d start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
17 all:
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
18 # compile-grammer
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
19 touch lib/logstash/config/grammar.rl # force rebuild
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
20 make -C lib/logstash/config grammar.rb
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
21 # compile-runner
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
22 mkdir -p build/ruby
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
23 cd lib; $(JRUBYC) -t ../build/ruby logstash/runner.rb
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
24 # copy-ruby-files
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
25 rsync -a --include "*/" --include "*.rb" --exclude "*" ./lib/ ./test/ ./build/ruby
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
26 rsync -a ./spec ./build/ruby
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
27 rsync -a ./locales ./build/ruby
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
28 # Delete any empty directories copied by rsync.
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
29 find ./build/ruby -type d -empty -delete
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
30 # install-gems
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
31 mkdir -p vendor/bundle
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
32 GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 ./gembag.rb logstash.gemspec
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
33 # Purge old versions of gems installed because gembag doesn't do dependency resolution correctly
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
34 GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 -S gem uninstall addressable -v 2.2.8
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
35 # Purge any junk that fattens our jar without need!
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
36 rm -rf ./vendor/bundle/jruby/1.9/gems/riak-client-1.0.3/pkg
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
37 rm -rf ./vendor/bundle/jruby/1.9/gems/*/spec
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
38 rm -rf ./vendor/bundle/jruby/1.9/gems/*/test
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
39 # build-monolith
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
40 mkdir -p build/monolith/openssl
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
41 mkdir -p build/monolith/jopenssl
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
42 # unpack all jars
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
43 find $$PWD/vendor/bundle -name '*.jar' | (cd build/monolith; xargs -n1 jar xf)
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
44 # copy openssl/lib/shared folders/files to root of jar - need this for openssl to work with JRuby
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
45 cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/openssl/* build/monolith/openssl
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
46 cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/jopenssl/* build/monolith/jopenssl
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
47 cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/openssl.rb build/monolith/openssl.rb
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
48 # purge any extra files we don't need in META-INF (like manifests and signature files)
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
49 rm -f build/monolith/META-INF/*.LIST
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
50 rm -f build/monolith/META-INF/*.MF
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
51 rm -f build/monolith/META-INF/*.RSA
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
52 rm -f build/monolith/META-INF/*.SF
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
53 rm -f build/monolith/META-INF/NOTICE
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
54 rm -f build/monolith/META-INF/NOTICE.txt
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
55 rm -f build/monolith/META-INF/LICENSE
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
56 rm -f build/monolith/META-INF/LICENSE.txt
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
57 cp $(GEOIP) build/monolith/
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
58 # build-logstash-jar
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
59 jar cfme build/logstash.jar logstash.manifest logstash.runner \
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
60 -C build/ruby . \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
61 -C build/monolith . \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
62 -C vendor/bundle/jruby/1.9 gems \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
63 -C vendor/bundle/jruby/1.9 specifications \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
64 -C lib logstash/web/public \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
65 -C lib logstash/certs \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
66 -C lib logstash/web/views \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
67 patterns
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
68