incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1298248 - /incubator/bigtop/trunk/package.mk
Date Thu, 08 Mar 2012 01:17:31 GMT
Author: bmahe
Date: Thu Mar  8 01:17:31 2012
New Revision: 1298248

URL: http://svn.apache.org/viewvc?rev=1298248&view=rev
Log:
BIGTOP-403. RPM Packages should display the GNU/Linux distribution they are supposed to be
installed on

Modified:
    incubator/bigtop/trunk/package.mk

Modified: incubator/bigtop/trunk/package.mk
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/package.mk?rev=1298248&r1=1298247&r2=1298248&view=diff
==============================================================================
--- incubator/bigtop/trunk/package.mk (original)
+++ incubator/bigtop/trunk/package.mk Thu Mar  8 01:17:31 2012
@@ -35,24 +35,26 @@ $(BUILD_DIR)/%/.srpm:
 	rpmbuild --define "_topdir $(PKG_BUILD_DIR)/rpm/" \
 						--define "$${PKG_NAME_FOR_PKG}_base_version $($(PKG)_BASE_VERSION)" \
 						--define "$${PKG_NAME_FOR_PKG}_version $($(PKG)_PKG_VERSION)$(BIGTOP_BUILD_STAMP)"
\
-						--define "$${PKG_NAME_FOR_PKG}_release $($(PKG)_RELEASE_VERSION)" \
+						--define "$${PKG_NAME_FOR_PKG}_release $($(PKG)_RELEASE_VERSION)%{?dist}" \
 						-bs \
 						--nodeps \
 						--buildroot="$(PKG_BUILD_DIR)/rpm/INSTALL" \
 						$(PKG_BUILD_DIR)/rpm/SPECS/$($(PKG)_NAME).spec
 	mkdir -p $($(PKG)_OUTPUT_DIR)/
-	cp $(PKG_BUILD_DIR)/rpm/SRPMS/$($(PKG)_PKG_NAME)-$($(PKG)_PKG_VERSION)$(BIGTOP_BUILD_STAMP)-$($(PKG)_RELEASE_VERSION).src.rpm
\
+	$(PKG)_RELEASE_DIST=$(shell rpmbuild --eval '%{?dist}' 2>/dev/null); \
+	cp $(PKG_BUILD_DIR)/rpm/SRPMS/$($(PKG)_PKG_NAME)-$($(PKG)_PKG_VERSION)$(BIGTOP_BUILD_STAMP)-$($(PKG)_RELEASE_VERSION)$${$(PKG)_RELEASE_DIST}.src.rpm
\
 	   $($(PKG)_OUTPUT_DIR)/
 	touch $@
 
 # Make binary RPMs
-$(BUILD_DIR)/%/.rpm: SRCRPM=$($(PKG)_OUTPUT_DIR)/$($(PKG)_PKG_NAME)-$($(PKG)_PKG_VERSION)$(BIGTOP_BUILD_STAMP)-$($(PKG)_RELEASE_VERSION).src.rpm
 $(BUILD_DIR)/%/.rpm:
+	$(PKG)_RELEASE_DIST=$(shell rpmbuild --eval '%{?dist}' 2>/dev/null); \
+	SRCRPM=$($(PKG)_OUTPUT_DIR)/$($(PKG)_PKG_NAME)-$($(PKG)_PKG_VERSION)$(BIGTOP_BUILD_STAMP)-$($(PKG)_RELEASE_VERSION)$${$(PKG)_RELEASE_DIST}.src.rpm;
\
 	rpmbuild --define "_topdir $(PKG_BUILD_DIR)/rpm/" \
 						--define "$($(PKG)_NAME)_base_version $($(PKG)_BASE_VERSION)" \
 						--define "$($(PKG)_NAME)_version $($(PKG)_PKG_VERSION)$(BIGTOP_BUILD_STAMP)" \
-						--define "$($(PKG)_NAME)_release $($(PKG)_RELEASE_VERSION)" \
-						--rebuild $(SRCRPM)
+						--define "$($(PKG)_NAME)_release $($(PKG)_RELEASE_VERSION)%{?dist}" \
+						--rebuild $${SRCRPM}
 	cp -r $(PKG_BUILD_DIR)/rpm/RPMS/*/* $($(PKG)_OUTPUT_DIR)/
 	touch $@
 



Mime
View raw message