Mercurial > logstash
comparison logstash.Makefile @ 14:0e45fe64b10d
work on building from source
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 10 Apr 2013 21:24:14 -0700 |
parents | c0150404962d |
children | c158cae7cd26 |
comparison
equal
deleted
inserted
replaced
13:c0150404962d | 14:0e45fe64b10d |
---|---|
1 # | |
2 # fedora uses system jruby | |
3 # el6 uses minimal jruby.jar | |
4 # | |
5 VERSION=$(shell awk -F\" '/LOGSTASH_VERSION/ {print $$2}' lib/logstash/version.rb) | |
6 | |
7 SYSJRUBY=$(shell which jruby 2>/dev/null) | |
8 ifeq ($(SYSJRUBY),) | |
9 JRUBY_CMD=java -jar /usr/local/bin/jruby.jar | |
10 else | |
11 JRUBY_CMD=jruby | |
12 endif | |
13 WITH_JRUBY=$(JRUBY_CMD) -S | |
14 JRUBYC=$(WITH_JRUBY) jrubyc | |
15 GEOIP=GeoLiteCity.dat | |
16 | |
1 all: | 17 all: |
2 echo '********** in my local makefile' | 18 echo '********** in my local makefile' |
3 | 19 |
4 # make the graphtastic client interface class | 20 # make the target directory to collect all the class files that will be in the final jar |
5 echo '********** build with raw javac, rather than maven' | 21 mkdir target |
6 cd GT/GraphTastic; \ | |
7 javac src/main/java/com/monstersoftwarellc/graphtastic/rmi/IRmiService.java; \ | |
8 find . -name '*.class' | |
9 echo '********* done with graphtastic build' | |
10 | |
11 # make the elastic search jar | |
12 cd ES/elasticsearch-0.20.6; \ | |
13 export PATH=/usr/local/apache-maven-3.0.5/bin:$(PATH); \ | |
14 mvn -Dmaven.test.skip=true package; \ | |
15 find . -name '*.jar'; \ | |
16 find . -name '*.class' | |
17 echo '********* done with elastic search build' | |
18 | 22 |
19 # make the logstash jar | 23 # make the logstash jar |
24 # compile-grammer | |
25 touch lib/logstash/config/grammar.rl # force rebuild | |
26 make -C lib/logstash/config grammar.rb | |
27 # compile-runner | |
28 mkdir -p build/ruby | |
29 (cd lib; $(JRUBYC) -5 -t ../build/ruby logstash/runner.rb) | |
30 # copy-ruby-files | |
31 find ./lib -name '*.rb' | sed -e 's,^\./lib/,,' | (cd lib; cpio -p --make-directories ../build/ruby) | |
32 find ./test -name '*.rb' | sed -e 's,^\./test/,,' | (cd test; cpio -p --make-directories ../build/ruby) | |
33 rsync -av ./spec build/ruby | |
34 # install-gems | |
35 mkdir -p vendor/bundle | |
36 GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 ./gembag.rb logstash.gemspec | |
37 rm -rf ./vendor/bundle/jruby/1.9/gems/riak-client-1.0.3/pkg | |
38 rm -rf ./vendor/bundle/jruby/1.9/gems/*/spec | |
39 rm -rf ./vendor/bundle/jruby/1.9/gems/*/test | |
40 # build-monolith | |
41 mkdir -p build/monolith/openssl build/monolith/jopenssl | |
42 # unpack all jars | |
43 find $$PWD/vendor/bundle -name '*.jar' | (cd build/monolith; xargs -n1 jar xf) | |
44 # copy openssl/lib/shared folders/files to root of jar - need this for openssl to work with JRuby | |
45 cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/openssl/* build/monolith/openssl | |
46 cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/jopenssl/* build/monolith/jopenssl | |
47 cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/openssl.rb build/monolith/openssl.rb | |
48 # purge any extra files we don't need in META-INF (like manifests and @# signature files) | |
49 rm -f build/monolith/META-INF/*.LIST | |
50 rm -f build/monolith/META-INF/*.MF | |
51 rm -f build/monolith/META-INF/*.RSA | |
52 rm -f build/monolith/META-INF/*.SF | |
53 rm -f build/monolith/META-INF/NOTICE | |
54 rm -f build/monolith/META-INF/NOTICE.txt | |
55 rm -f build/monolith/META-INF/LICENSE | |
56 rm -f build/monolith/META-INF/LICENSE.txt | |
57 cp $(GEOIP) build/monolith/ | |
58 # build-monolith-jar | |
59 jar cfe build/logstash-$(VERSION)-monolithic.jar logstash.runner \ | |
60 -C build/ruby . \ | |
61 -C build/monolith . \ | |
62 -C vendor/bundle/jruby/1.9 gems \ | |
63 -C vendor/bundle/jruby/1.9 specifications \ | |
64 -C lib logstash/web/public \ | |
65 -C lib logstash/certs \ | |
66 -C lib logstash/web/views \ | |
67 patterns | |
68 # see what we have | |
69 unzip -t build/logstash-$(VERSION)-monolithic.jar >/tmp/log.mono.jar.txt | |
70 sort /tmp/log.mono.jar.txt >/tmp/log.mono.jar.sort.txt |