hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [2/2] incubator-hawq git commit: HAWQ-1067. Append hawq version number to plr-hawq rpm pakcage name.
Date Mon, 26 Sep 2016 03:56:25 GMT
HAWQ-1067. Append hawq version number to plr-hawq rpm pakcage name.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/23d36f28
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/23d36f28
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/23d36f28

Branch: refs/heads/vplr
Commit: 23d36f28a25ef3a4205e40bf480160310a4b82cc
Parents: 5515de9
Author: rlei <rlei@pivotal.io>
Authored: Thu Sep 22 14:55:09 2016 +0800
Committer: rlei <rlei@pivotal.io>
Committed: Mon Sep 26 11:56:09 2016 +0800

----------------------------------------------------------------------
 src/pl/Makefile  | 18 +++++++++++++++++-
 src/pl/plr.spec  |  7 ++++---
 src/pl/vplr.spec | 24 ++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/23d36f28/src/pl/Makefile
----------------------------------------------------------------------
diff --git a/src/pl/Makefile b/src/pl/Makefile
index 0792f49..2147635 100644
--- a/src/pl/Makefile
+++ b/src/pl/Makefile
@@ -50,12 +50,28 @@ plr_prepare: plr_prepare_timestamp
 	fi
 
 ABS_PLR_SRCDIR = $(abs_top_srcdir)/$(subdir)/plr
+HAWQ_VERSION := $(shell cat $(abs_top_srcdir)/VERSION | awk '{print $$1}')
+HAWQ_VERSION_STR := $(shell cat $(abs_top_srcdir)/VERSION | awk '{print $$1}' | sed 's/\./_/g')
+HAWQ_BUILD_NUMBER := $(shell cat $(abs_top_srcdir)/VERSION | awk '{print $$3}')
+REDHAT_MAJOR_VERSION := $(shell cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//
| awk -F '.' '{print $$1}')
 
 # rpm only so far.
 plr_pkgbuild: plr_prepare
 	if [ ! -f /etc/redhat-release ]; then echo "rpm build is not supported on the platform.";
exit 1; fi
+	if [ ! -f $(abs_top_srcdir)/VERSION ]; then echo "VERSION file is missing. Forgot to run
configure?"; exit 1; fi
 	rm -rf plr/build; mkdir -p plr/build;
-	rpmbuild -bb plr.spec --define 'plr_srcdir $(ABS_PLR_SRCDIR)' --define '_topdir $(ABS_PLR_SRCDIR)/build'
--define '__os_install_post \%{nil}'
+	rpmbuild -bb plr.spec --define 'plr_srcdir $(ABS_PLR_SRCDIR)' \
+        --define 'hawq_version $(HAWQ_VERSION)' \
+        --define 'hawq_version_str $(HAWQ_VERSION_STR)' \
+        --define 'hawq_build_number $(HAWQ_BUILD_NUMBER)' \
+        --define 'redhat_major_version $(REDHAT_MAJOR_VERSION)' \
+        --define '_topdir $(ABS_PLR_SRCDIR)/build' --define '__os_install_post \%{nil}'
+	rpmbuild -bb vplr.spec \
+        --define 'hawq_version $(HAWQ_VERSION)' \
+        --define 'hawq_version_str $(HAWQ_VERSION_STR)' \
+        --define 'hawq_build_number $(HAWQ_BUILD_NUMBER)' \
+        --define 'redhat_major_version $(REDHAT_MAJOR_VERSION)' \
+        --define '_topdir $(ABS_PLR_SRCDIR)/build' --define '__os_install_post \%{nil}'
 
 ifeq ($(with_r), yes)
 plr_prepare2: plr_prepare

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/23d36f28/src/pl/plr.spec
----------------------------------------------------------------------
diff --git a/src/pl/plr.spec b/src/pl/plr.spec
index 23af95b..6648933 100644
--- a/src/pl/plr.spec
+++ b/src/pl/plr.spec
@@ -1,11 +1,12 @@
 Summary:        PL/R module for HAWQ
-Name:           plr-hawq
-Version:        08.03.00.14
-Release:		0
+Name:           plr-hawq_%{hawq_version_str}
+Version:        08.03.00.14.%{hawq_version}
+Release:		%{hawq_build_number}.el%{redhat_major_version}
 Prefix:         /usr/local
 License:		GPL
 BuildRequires:  R-core-devel
 Requires:       R
+Provides:       plr-hawq
 
 %define _unpackaged_files_terminate_build 0
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/23d36f28/src/pl/vplr.spec
----------------------------------------------------------------------
diff --git a/src/pl/vplr.spec b/src/pl/vplr.spec
new file mode 100644
index 0000000..3931c98
--- /dev/null
+++ b/src/pl/vplr.spec
@@ -0,0 +1,24 @@
+Name:       plr-hawq
+Summary:    PL/R module for HAWQ
+Version:    08.03.00.14.%{hawq_version}
+Release:    %{hawq_build_number}.el%{redhat_major_version}
+License:    GPL
+Prefix:     /usr/local
+Requires:   plr-hawq_%{hawq_version_str}
+
+AutoReqProv:    no
+
+%description
+This is the virtual rpm package of plr-hawq.
+
+%prep
+
+%install
+
+%clean
+
+%post
+
+%postun
+
+%files


Mime
View raw message