This repository has been archived by the owner on Feb 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
61 lines (48 loc) · 2.2 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
#####################################################################################
# Copyright 2011 Normation SAS
#####################################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#####################################################################################
MAVEN_RELEASE = 3.0.4
WGET := $(if $(PROXY), http_proxy=$(PROXY) ftp_proxy=$(PROXY)) /usr/bin/wget
.DEFAULT_GOAL := localdepends
GIT_BRANCH_RUDDER = <put branch or tag name here>
RUDDER_VERSION_TO_PACKAGE = <put Rudder version or version-snapshot here>
localdepends: ./rudder-sources ./maven2/bin/mvn ./rudder-sources/helloworld-plugin
/usr/bin/wget:
sudo aptitude --assume-yes install wget
./maven.tgz: /usr/bin/wget
# Original URL: http://apache.multidist.com/maven/binaries/apache-maven-$(MAVEN_RELEASE)-bin.tar.gz
$(WGET) -O ./maven.tgz http://www.normation.com/tarball/apache-maven-$(MAVEN_RELEASE)-bin.tar.gz
./maven2/bin/mvn: ./maven.tgz
tar -xvzf ./maven.tgz -C .
rm -rf ./maven2
mv ./apache-maven-$(MAVEN_RELEASE) ./maven2
./rudder-sources.tar.bz2:
$(WGET) -O rudder-sources.tar.bz2 http://www.rudder-project.org/archives/rudder-sources-${RUDDER_VERSION_TO_PACKAGE}.tar.bz2
./rudder-sources: ./rudder-sources.tar.bz2
tar -xjf rudder-sources.tar.bz2
mv rudder-sources-*/ rudder-sources/
./rudder-sources/helloworld-plugin: ./rudder-sources
mkdir -p ./rudder-sources/helloworld-plugin
cp -a ../../src/ ./rudder-sources/helloworld-plugin/
cp -a ../../pom.xml ./rudder-sources/helloworld-plugin
localclean:
rm -rf ./rudder-sources
rm -rf ./maven2/
veryclean:
rm -f ./rudder-sources.tar.bz2
rm -rf ./maven.tgz
.PHONY: localclean localdepends veryclean