incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1204645 - in /incubator/bigtop/branches/hadoop-0.23: bigtop-packages/src/common/hadoop/series package.mk
Date Mon, 21 Nov 2011 18:40:46 GMT
Author: rvs
Date: Mon Nov 21 18:40:46 2011
New Revision: 1204645

URL: http://svn.apache.org/viewvc?rev=1204645&view=rev
Log:
BIGTOP-267. Need to implement implement makefiles logic for tarball builds

Modified:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/series
    incubator/bigtop/branches/hadoop-0.23/package.mk

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/series
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/series?rev=1204645&r1=1204644&r2=1204645&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/series (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/series Mon Nov
21 18:40:46 2011
@@ -1,7 +1,7 @@
 HADOOP-7787.patch
 HADOOP-7801.patch
-HDFS-2543.patch
-MAPREDUCE-3372.patch
 HADOOP-7802.patch
-HDFS-2544.patch
+MAPREDUCE-3372.patch
+HDFS-2543.patch
 MAPREDUCE-3373.patch
+HDFS-2544.patch

Modified: incubator/bigtop/branches/hadoop-0.23/package.mk
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/package.mk?rev=1204645&r1=1204644&r2=1204645&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/package.mk (original)
+++ incubator/bigtop/branches/hadoop-0.23/package.mk Mon Nov 21 18:40:46 2011
@@ -23,6 +23,27 @@ $(BUILD_DIR)/%/.download:
 	[ -z "$($(PKG)_TARBALL_SRC)" -o -f $($(PKG)_DOWNLOAD_DST) ] || (cd $(DL_DIR) &&
curl --retry 5 -# -L -k -o $($(PKG)_TARBALL_DST) $($(PKG)_DOWNLOAD_URL))
 	touch $@
 
+# Untar and patch
+$(BUILD_DIR)/%/.tar:
+	-rm -rf $(PKG_BUILD_DIR)/tar/
+	mkdir -p $(PKG_BUILD_DIR)/tar/$($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP)
+	if [ -n "$($(PKG)_TARBALL_SRC)" ]; then \
+	  cp $($(PKG)_DOWNLOAD_DST) $(PKG_BUILD_DIR)/tar/$($(PKG)_PKG_NAME)_$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP).orig.tar.gz
;\
+	  tar -C $(PKG_BUILD_DIR)/tar/$($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP) \
+              --strip-components 1 -xzvf $(PKG_BUILD_DIR)/tar/$($(PKG)_PKG_NAME)_$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP).orig.tar.gz;
\
+	fi
+	if [ -f $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/series ]; then    \
+	  PATCHES="`cat $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/series`" ;\
+	elif [ -f $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/patch ]; then   \
+	  PATCHES="patch"                                                              ;\
+	else                                                                            \
+	  PATCHES="/dev/null"                                                          ;\
+	fi ; (cd $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME); cat $$PATCHES)| \
+             (cd $(PKG_BUILD_DIR)/tar/$($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP)
; patch -p0)
+	tar -C $(PKG_BUILD_DIR)/tar -czf $(PKG_BUILD_DIR)/tar/$($(PKG)_PKG_NAME)_$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP).patched.tar.gz
\
+               $($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP)
+	touch $@
+
 # Make source RPMs
 $(BUILD_DIR)/%/.srpm:
 	-rm -rf $(PKG_BUILD_DIR)/rpm/
@@ -141,6 +162,7 @@ $(2)_DOWNLOAD_DST = $(DL_DIR)/$($(2)_TAR
 
 # Define the file stamps
 $(2)_TARGET_DL       = $$($(2)_BUILD_DIR)/.download
+$(2)_TARGET_TAR      = $$($(2)_BUILD_DIR)/.tar
 $(2)_TARGET_SRPM     = $$($(2)_BUILD_DIR)/.srpm
 $(2)_TARGET_RPM      = $$($(2)_BUILD_DIR)/.rpm
 $(2)_TARGET_YUM      = $$($(2)_BUILD_DIR)/.yum
@@ -152,6 +174,9 @@ $(2)_TARGET_RELNOTES = $$($(2)_BUILD_DIR
 # We download target when the source is not in the download directory
 $(1)-download: $$($(2)_TARGET_DL)
 
+# Make a patched tarball (patch could be null)
+$(1)-tar: $(1)-download $$($(2)_TARGET_TAR)
+
 # To make srpms, we need to build the package
 $(1)-srpm: $(1)-download $$($(2)_TARGET_SRPM)
 
@@ -203,11 +228,11 @@ $(1)-info:
 
 # Implicit rules with PKG variable
 $$($(2)_TARGET_DL):       PKG=$(2)
-$$($(2)_TARGET_APT) $$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB) $$($(2)_TARGET_DEB):
PKG=$(2)
-$$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB) $$($(2)_TARGET_DEB): PKG_BASE_VERSION=$$($(2)_BASE_VERSION)
-$$($(2)_TARGET_APT) $$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB) $$($(2)_TARGET_DEB):
PKG_PKG_VERSION=$$($(2)_PKG_VERSION)
-$$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB) $$($(2)_TARGET_DEB): PKG_SOURCE_DIR=$$($(2)_SOURCE_DIR)
-$$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB) $$($(2)_TARGET_DEB): PKG_BUILD_DIR=$$($(2)_BUILD_DIR)
+$$($(2)_TARGET_TAR) $$($(2)_TARGET_APT) $$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB)
$$($(2)_TARGET_DEB): PKG=$(2)
+$$($(2)_TARGET_TAR) $$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB) $$($(2)_TARGET_DEB):
PKG_BASE_VERSION=$$($(2)_BASE_VERSION)
+$$($(2)_TARGET_TAR) $$($(2)_TARGET_APT) $$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB)
$$($(2)_TARGET_DEB): PKG_PKG_VERSION=$$($(2)_PKG_VERSION)
+$$($(2)_TARGET_TAR) $$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB) $$($(2)_TARGET_DEB):
PKG_SOURCE_DIR=$$($(2)_SOURCE_DIR)
+$$($(2)_TARGET_TAR) $$($(2)_TARGET_RPM) $$($(2)_TARGET_SRPM) $$($(2)_TARGET_SDEB) $$($(2)_TARGET_DEB):
PKG_BUILD_DIR=$$($(2)_BUILD_DIR)
 
 
 TARGETS += $(1)



Mime
View raw message