forked from rabbitmq/rabbitmq-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
144 lines (127 loc) · 3.8 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Ignore this file, go straight to the directory with your language of
# choice and read the readme there.
#
# This makefile is for testing only. It's intended to install
# dependencies for all source code languages, which is an overkill for
# the great majority of users.
#
all:
@echo "Review README in the directory with your langage of choice."
### Test all combinations of languages
#
#
# Running everything requires quite a lot of dependencies you need at
# least (as tested on debian 5.0):
#
# apt-get install python-virtualenv git-core php5-cli \
# ruby1.9 ruby1.9-dev rdoc1.9 unzip mono-gmcs sun-java5-jdk \
# cpan perl
#
#
# You also need recent erlang, you may install it from sources following
# this commands:
# cd /usr/src
# apt-get -y install libncurses-dev libssl-dev
# [ -e otp_src_R14B03.tar.gz ] || wget http://www.erlang.org/download/otp_src_R14B03.tar.gz
# [ -e otp_src_R14B03 ] || tar xzf otp_src_R14B03.tar.gz
# cd otp_src_R14B03/
# ./configure
# make
# make install
#
setup: dotnet/.ok erlang/.ok java/.ok python/.ok php/.ok ruby-amqp/.ok ruby/.ok python-puka/.ok perl/.ok
setup-travisci: dotnet/.ok erlang/.ok java/.ok python/.ok ruby/.ok php/.ok
test: setup
RUBY=$(RUBY) python test.py
test-travisci: setup-travisci
RUBY=ruby python travisci.py
RABBITVER:=$(shell curl -s "http://www.rabbitmq.com/releases/rabbitmq-server/" | grep -oE '([0-9\.]{5,})' | tail -n 1)
R=http://www.rabbitmq.com/releases
# Default value assumes CI environment
RUBY?=ruby1.9.1
DVER=$(RABBITVER)
dotnet/.ok:
(cd dotnet && \
mkdir -p lib && \
cd lib && \
wget -qc $(R)/rabbitmq-dotnet-client/v$(DVER)/rabbitmq-dotnet-client-$(DVER)-dotnet-3.0.zip && \
unzip -q rabbitmq-dotnet-client-$(DVER)-dotnet-3.0.zip && \
cd .. && \
for f in *.cs; do \
gmcs -r:lib/bin/RabbitMQ.Client.dll $$f; \
done && \
touch .ok)
clean::
(cd dotnet && \
rm -rf .ok *.zip lib *.exe)
EVER=$(RABBITVER)
erlang/.ok:
(cd erlang && \
wget -qc $(R)/rabbitmq-erlang-client/v$(EVER)/rabbit_common-$(EVER).ez \
$(R)/rabbitmq-erlang-client/v$(EVER)/amqp_client-$(EVER).ez && \
unzip -q rabbit_common-$(EVER).ez && \
ln -s rabbit_common-$(EVER) rabbit_common && \
unzip -q amqp_client-$(EVER).ez && \
ln -s amqp_client-$(EVER) amqp_client && \
touch .ok)
clean::
(cd erlang && \
rm -rf .ok *.ez amqp_client* rabbit_common*)
JVER=$(RABBITVER)
java/.ok:
(cd java && \
wget -qc $(R)/rabbitmq-java-client/v$(JVER)/rabbitmq-java-client-bin-$(JVER).zip && \
unzip -q rabbitmq-java-client-bin-$(JVER).zip && \
cp rabbitmq-java-client-bin-$(JVER)/*.jar . && \
javac -cp rabbitmq-client.jar *.java && \
touch .ok)
clean::
(cd java && \
rm -rf .ok *.jar *.class *.zip rabbitmq-java-client-bin*)
PVER=0.9.5
python/.ok:
(cd python && \
virtualenv venv && \
./venv/bin/easy_install pip && \
./venv/bin/pip install pika==$(PVER) && \
touch .ok)
clean::
(cd python && \
rm -rf .ok venv distribute*.tar.gz)
php/.ok:
(cd php && \
git clone http://github.com/tnc/php-amqplib.git lib/php-amqplib && \
touch .ok)
clean::
(cd php && \
rm -rf .ok lib)
GEM?=gem1.9.1
TOPDIR:=$(PWD)
ruby/.ok:
(cd ruby && \
GEM_HOME=gems/gems RUBYLIB=gems/lib $(GEM) install bunny --version ">= 0.9.4" --no-ri --no-rdoc && \
touch .ok)
clean::
(cd ruby && \
rm -rf .ok gems)
ruby-amqp/.ok:
(cd ruby-amqp && \
GEM_HOME=gems/gems RUBYLIB=gems/lib $(GEM) install amqp --no-ri --no-rdoc && \
touch .ok)
clean::
(cd ruby-amqp && \
rm -rf .ok gems)
python-puka/.ok:
(cd python-puka && \
virtualenv venv && \
./venv/bin/easy_install pip && \
./venv/bin/pip install puka && \
touch .ok)
perl/.ok:
(cd perl && \
PERL_MM_USE_DEFAULT=1 cpan -i -f Net::RabbitFoot && \
PERL_MM_USE_DEFAULT=1 cpan -i -f UUID::Tiny && \
touch .ok)
clean::
(cd python-puka && \
rm -rf .ok venv distribute*.tar.gz)