Mercurial > logstash
annotate logstash.Makefile @ 19:729f36e68da8 unbundled-1.1.9-working
work on building from source
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 17 Apr 2013 11:48:04 -0700 |
parents | 2b887e35b5cd |
children | 1d50b19beda0 |
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 |
15
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
23 cd lib; $(JRUBYC) -5 -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 |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
25 find ./lib -name '*.rb' | sed -e 's,^\./lib/,,' | (cd lib; cpio -p --make-directories ../build/ruby) |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
26 find ./test -name '*.rb' | sed -e 's,^\./test/,,' | (cd test; cpio -p --make-directories ../build/ruby) |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
27 rsync -av ./spec build/ruby |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
28 # install-gems |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
29 mkdir -p vendor/bundle |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
30 GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 ./gembag.rb logstash.gemspec |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
31 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
|
32 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
|
33 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
|
34 # build-monolith |
15
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
35 mkdir -p build/monolith/openssl |
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
36 mkdir -p build/monolith/jopenssl |
14
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
37 # unpack all jars |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
38 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
|
39 # 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
|
40 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
|
41 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
|
42 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
|
43 # 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
|
44 rm -f build/monolith/META-INF/*.LIST |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
45 rm -f build/monolith/META-INF/*.MF |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
46 rm -f build/monolith/META-INF/*.RSA |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
47 rm -f build/monolith/META-INF/*.SF |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
48 rm -f build/monolith/META-INF/NOTICE |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
49 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
|
50 rm -f build/monolith/META-INF/LICENSE |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
51 rm -f build/monolith/META-INF/LICENSE.txt |
17
292b6583148a
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
52 rm -rf build/monolith/org/jruby/ext/openssl |
14
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
53 cp $(GEOIP) build/monolith/ |
18
2b887e35b5cd
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
17
diff
changeset
|
54 # build the classpath in a manifest file |
2b887e35b5cd
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
17
diff
changeset
|
55 #echo -n "Class-Path: /usr/share/jruby.jar /usr/local/bin/graphtastic-client.jar " >logstash.manifest |
19
729f36e68da8
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
18
diff
changeset
|
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 |
15
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
57 # build-logstash-jar |
16
aa606d801e02
work on building from source, revert jruby and elastic search to versions bundled into logstash-monolith
Carl Byington <carl@five-ten-sg.com>
parents:
15
diff
changeset
|
58 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
|
59 -C build/ruby . \ |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
60 -C build/monolith . \ |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
61 -C vendor/bundle/jruby/1.9 gems \ |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
62 -C vendor/bundle/jruby/1.9 specifications \ |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
63 -C lib logstash/web/public \ |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
64 -C lib logstash/certs \ |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
65 -C lib logstash/web/views \ |
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
66 patterns |