forked from vivostar/spark-rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (41 loc) · 1.41 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
# Dolphinscheduler
SHELL := /bin/bash
version = 3.2.2
name = spark
full_name = $(name)-$(version)-bin-hadoop3.2
download_url = "https://repo.huaweicloud.com/apache/$(name)/$(name)-$(version)/$(full_name).tgz"
all: rpm
clean:
rm -rf rpmbuild
mkdir: clean
mkdir -p rpmbuild
mkdir -p rpmbuild/BUILD
mkdir -p rpmbuild/BUILDROOT
mkdir -p rpmbuild/RPMS
mkdir -p rpmbuild/SOURCES
mkdir -p rpmbuild/SRPMS
download: mkdir
[ ! -f "${full_name}.tgz" ] && curl -L -o ./$(full_name).tgz $(download_url); \
cp ./$(full_name).tgz rpmbuild/SOURCES; cp libs/* scripts/* rpmbuild/SOURCES;
rpm: download
rpmbuild $(RPM_OPTS) \
--define "_topdir %(pwd)" \
--define "_builddir %{_topdir}/rpmbuild/BUILD" \
--define "_buildrootdir %{_topdir}/rpmbuild/BUILDROOT" \
--define "_rpmdir %{_topdir}/rpmbuild/RPMS" \
--define "_srcrpmdir %{_topdir}/rpmbuild/SRPMS" \
--define "_specdir %{_topdir}" \
--define "_sourcedir %{_topdir}/rpmbuild/SOURCES" \
--define "VERSION $(version)" \
-ba spark.spec
spark3: download
rpmbuild $(RPM_OPTS) \
--define "_topdir %(pwd)" \
--define "_builddir %{_topdir}/rpmbuild/BUILD" \
--define "_buildrootdir %{_topdir}/rpmbuild/BUILDROOT" \
--define "_rpmdir %{_topdir}/rpmbuild/RPMS" \
--define "_srcrpmdir %{_topdir}/rpmbuild/SRPMS" \
--define "_specdir %{_topdir}" \
--define "_sourcedir %{_topdir}/rpmbuild/SOURCES" \
--define "VERSION $(version)" \
-ba spark3.spec