-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
84 lines (61 loc) · 2.38 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.PHONY: env tarball cli devrel riak-release latest-presto riak-devrel presto-devrel
all: env cli latest-presto riak-release
PRESTO_VERSION=0.103
FILE=presto/presto-server/target/presto-server-$(PRESTO_VERSION).tar.gz
CLIJAR=presto/presto-cli/target/presto-cli-$(PRESTO_VERSION)-executable.jar
VERIFIER=presto/presto-verifier/target/presto-verifier-$(PRESTO_VERSION)-executable.jar
#$(FILE):
# wget http://central.maven.org/maven2/com/facebook/presto/presto-server/0.61/presto-server-0.61.tar.gz
presto:
git clone git://github.com/facebook/presto.git
latest-presto: presto
@cd presto && git fetch && git checkout $(PRESTO_VERSION)
$(FILE): latest-presto
@cd presto/presto-server && mvn package assembly:assembly -DdescriptorId=bin -Dtest=skip -DfailIfNoTests=false
$(CLIJAR): presto
@cd presto/presto-cli && mvn package assembly:assembly -DdescriptorId=bin -Dtest=skip -DfailIfNoTests=false
$(VERIFIER): presto
@cd presto/presto-verifier && mvn package assembly:assembly -DdescriptorId=bin -Dtest=skip -DfailIfNoTests=false
devrel: presto-devrel riak-devrel
presto-devrel: $(FILE) riak-devrel
tar xzf $(FILE)
rm -rf dev
mkdir dev
mkdir -p presto-server-$(PRESTO_VERSION)/plugin/presto-riak
sh build_devrel.sh presto-server-$(PRESTO_VERSION) 1
sh build_devrel.sh presto-server-$(PRESTO_VERSION) 2
sh build_devrel.sh presto-server-$(PRESTO_VERSION) 3
sh build_devrel.sh presto-server-$(PRESTO_VERSION) 4
sh build_devrel.sh presto-server-$(PRESTO_VERSION) 5
presto-verifier: $(VERIFIER)
cp $< $@
chmod 755 $@
mv $@ bin/
presto-cli: $(CLIJAR)
cp $< $@
chmod 755 $@
mv $@ bin/
cli: presto-cli presto-verifier
env: $(FILE)
tar xzf $<
mkdir -p data
rm -rf lib
cp -r presto-server-$(PRESTO_VERSION)/lib .
cp -r presto-server-$(PRESTO_VERSION)/bin/* ./bin/
cp -r presto-server-$(PRESTO_VERSION)/plugin .
mkdir -p plugin/presto-riak
clean:
rm -rf lib plugin data NOTICE README.txt
test:
mvn -Dmaven.junit.usefile=false test
riak:
git clone git://github.com/basho/riak -b 2.1.1
riak-release: riak/rel/riak
riak/rel/riak: riak
cd riak && make clean
cd riak && make stage
sed -e "s/storage_backend = bitcask/storage_backend = leveldb/" -i.back riak/rel/riak/etc/riak.conf
riak-devrel: riak/dev/dev1
riak/dev/dev1: riak
cd riak && make stagedevrel
for NODE in '1 2 3 4'; do sed -e "s/storage_backend = bitcask/storage_backend = leveldb/" -i.back riak/dev/dev${NODE}/etc/riak.conf; done