Commits

Spyplane committed 70d00a8

Merge needed package changes from 'dss-pkging-fixes' branch

  • Participants
  • Parent commits 4964693

Comments (0)

Files changed (4)

File package/Makefile

 OS		= $(shell uname -s)
 KERNEL		= $(shell uname -r)
+ERLANG_BIN	= $(shell dirname $(shell which erl))
 ifeq ($(OS),Linux)
 PKGER		= $(shell cat /etc/redhat-release 2> /dev/null)
 ifeq ($(PKGER),)
 ifeq ($(OS),SunOS)
 PKGER		= make
 PKGERDIR	= solaris
-DISTRO		= $(shell awk '{ if (NR==1) print $$1; };' /etc/release)
+DISTRO		= $(shell head -1 /etc/release|awk \
+                   '{if ($$1 == "OpenSolaris") {print $$1} else {print "Solaris"}}')
 endif
 
 APP		 = $(shell echo "$(REPO)" | sed -e 's/_/-/g')

File package/deb/Makefile

 	dch  --noquery -c $(BUILDPATH)/debian/changelog \
 		-b -v "$(REVISION)-$(RELEASE)" "pants on head"
 	cd $(BUILDPATH) && debuild --no-lintian \
+	        --prepend-path=$(ERLANG_BIN) \
 		-e REVISION=$(REVISION) \
 		-e RELEASE=$(RELEASE) \
 		-e CLASSPATH=$${CLASSPATH} \

File package/rpm/Makefile

+
+DISTRO = $(shell head -1 /etc/redhat-release| awk \
+           '{if ($$0 ~ /CentOS/) { print ".el5."} else { print "." }} ')
 
 build: $(PKGERDIR)/SOURCES/$(APP)-$(REVISION).tar.gz rpmbuild
+	@echo "DISTRO = $(DISTRO)"
 	@echo "SEARCH_TAG = $(SEARCH_TAG)"
 	@echo "REVISION = $(REVISION)"
 	@echo "RELEASE  = $(RELEASE)"
-	rpmbuild --define '_topdir $(CURDIR)/rpmbuild' \
+	rpmbuild --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}$(DISTRO)%%{ARCH}.rpm" \
+		 --define '_topdir $(CURDIR)/rpmbuild' \
 		 --define '_sourcedir $(CURDIR)/$(PKGERDIR)/SOURCES' \
 		 --define '_specdir $(CURDIR)/$(PKGERDIR)/SPECS' \
 		 --define '_rpmdir $(CURDIR)/packages' \
 		 --define "_version $(PKG_VERSION)" \
 		 --define "_release $(RELEASE)" \
 		 -ba $(PKGERDIR)/SPECS/$(APP).spec
-	mv packages/*/$(APP)-$(PKG_VERSION)-$(RELEASE)*.rpm packages
-	rm -rf packages/i?86 packages/x86_64
 
 rpmbuild:
 	@mkdir -p rpmbuild/BUILD

File package/solaris/Makefile

 	echo "i r.preserve" >> prototype
 	echo '' >> prototype
 	pkgproto $(SEARCH_PATH)/rel/$(APP_PATH)=$(APP_PATH) >> prototype
-	sed -i -e 's/basho other/riak riak/' \
-	       -e 's/buildbot other/riak riak/' \
+	sed -i -e "s/ $(LOGNAME) .*$$/ riak riak/" \
 	       -e 's/f none riak\/etc/e preserve riak\/etc/' prototype
 
 $(PKGERDIR)/pkgclean: