forked from rabbitmq/rabbitmq-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
126 lines (116 loc) · 3.55 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
# 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.8 ruby1.8-dev rdoc1.8 unzip mono-gmcs sun-java5-jdk
#
#
# 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
#
test: dotnet/.ok erlang/.ok java/.ok python/.ok php/.ok ruby/.ok python-puka/.ok
RUBYVER=$(RUBYVER) python test.py
RABBITVER:=$(shell curl -s "http://www.rabbitmq.com/releases/rabbitmq-server/?C=N;O=D;F=0;V=1" | grep -oE '([0-9\.]{5,})' | head -n 1)
R=http://www.rabbitmq.com/releases
DVER=$(RABBITVER)
dotnet/.ok:
(cd dotnet && \
mkdir 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)
RUBYVER:=1.8
GEMSVER=1.8.5
TOPDIR:=$(PWD)
RVER="0.8.0"
ruby/.ok:
(cd ruby && \
wget -qc http://production.cf.rubygems.org/rubygems/rubygems-$(GEMSVER).tgz && \
tar xzf rubygems-$(GEMSVER).tgz && \
cd rubygems-$(GEMSVER) && \
ruby$(RUBYVER) setup.rb --prefix=$(TOPDIR)/ruby/gems && \
cd .. && \
rm -r rubygems-$(GEMSVER).tgz rubygems-$(GEMSVER) && \
GEM_HOME=gems/gems RUBYLIB=gems/lib gems/bin/gem$(RUBYVER) install amqp --version $(RVER) && \
touch .ok)
clean::
(cd ruby && \
rm -rf .ok gems)
python-puka/.ok:
(cd python-puka && \
virtualenv venv && \
./venv/bin/easy_install pip && \
./venv/bin/pip install puka && \
touch .ok)
clean::
(cd python-puka && \
rm -rf .ok venv distribute*.tar.gz)