forked from globocom/groot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (41 loc) · 1.23 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
# Groot Makefile
GROOT_VERSION ?= 2.0.9
VERSION=${GROOT_VERSION}
RPM_VER=${GROOT_VERSION}
RELEASE=1
PORT ?= 8090
.PHONY: all test clean run
groot: clean
mvn package -DskipTests
test:
mvn test
clean:
mvn clean
run:
java -Dserver.port=${PORT} -jar target/groot.jar
dist: groot
type fpm > /dev/null 2>&1 && \
cd target && \
mkdir -p lib conf logs/tmp && \
echo "#version ${VERSION}" > lib/VERSION && \
git show --summary >> lib/VERSION && \
cp -av ../dist/wrapper lib/ && \
cp -v ../dist/wrapper.conf conf/ && \
[ -f ../dist/logback.xml ] && cp -v ../dist/logback.xml conf/ || true && \
cp -av ../dist/scripts . || true && \
cp -v groot.jar lib/ && \
cp -av ../dist/initscript lib/wrapper/bin/ && \
fpm -s dir \
--rpm-rpmbuild-define '_binaries_in_noarch_packages_terminate_build 0' \
-t rpm \
-n "groot2" \
-v ${RPM_VER} \
--iteration ${RELEASE}.el7 \
-a noarch \
--rpm-os linux \
--prefix /opt/groot2 \
-m '<[email protected]>' \
--vendor 'Globo.com' \
--description 'Groot2 service' \
--after-install scripts/postinstall \
-f -p ../groot2-${RPM_VER}-${RELEASE}.el7.noarch.rpm lib conf logs scripts