Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add SRPMS and make RPM version field fully compatible #43

Merged
merged 1 commit into from

1 participant

@jaredmorrow

No description provided.

@jaredmorrow

Tested on Centos 5, 6, Fedora 17

@jaredmorrow jaredmorrow merged commit 54bbda3 into master
@jaredmorrow jaredmorrow deleted the jem-riak-support branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 10 deletions.
  1. +13 −10 priv/templates/rpm/Makefile
View
23 priv/templates/rpm/Makefile
@@ -3,20 +3,23 @@ PWD = $(shell pwd)
DISTRO = $(shell head -1 /etc/redhat-release| awk \
'{if ($$0 ~ /CentOS release 5/) { print ".el5."} else { print "." }} ')
+# No hyphens are allowed in the _version field in RPM
+PKG_VERSION_NO_H ?= $(shell echo $(PKG_VERSION) | tr - .)
+
default:
mkdir -p BUILD
mkdir -p packages
rpmbuild --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}$(DISTRO)%%{ARCH}.rpm" \
- --define '_topdir $(PWD)' \
- --define '_sourcedir $(PWD)' \
- --define '_specdir $(PWD)' \
- --define '_rpmdir $(PWD)/packages' \
- --define '_srcrpmdir $(PWD)' \
- --define "_revision $(PKG_VERSION)" \
- --define "_version $(PKG_VERSION)" \
- --define "_release $(PKG_BUILD)" \
- --define "_tarname $(PKG_ID).tar.gz" \
- -ba $(PWD)/specfile
+ --define '_topdir $(PWD)' \
+ --define '_sourcedir $(PWD)' \
+ --define '_specdir $(PWD)' \
+ --define '_rpmdir $(PWD)/packages' \
+ --define '_srcrpmdir $(PWD)/packages' \
+ --define "_revision $(PKG_VERSION)" \
+ --define "_version $(PKG_VERSION_NO_H)" \
+ --define "_release $(PKG_BUILD)" \
+ --define "_tarname $(PKG_ID).tar.gz" \
+ -ba $(PWD)/specfile
cd packages && \
for rpmfile in `ls *.rpm`; do \
sha256sum $${rpmfile} > $${rpmfile}.sha \
Something went wrong with that request. Please try again.