summaryrefslogtreecommitdiff
path: root/packaging/RPMS
diff options
context:
space:
mode:
authorDavid Wragg <dpw@lshift.net>2009-08-11 12:28:26 +0100
committerDavid Wragg <dpw@lshift.net>2009-08-11 12:28:26 +0100
commit87b29da1dcca2256cce5607769f97ca949dbad45 (patch)
tree2465ebdd23daad5129e6236f75dd948c2aeb47db /packaging/RPMS
parent6e279cd7b249aaf648d15bce65e9429d3c3f316f (diff)
downloadrabbitmq-server-87b29da1dcca2256cce5607769f97ca949dbad45.tar.gz
Reconcile the Deian and Fedora package Makefiles a littlebug20978
The Debian package makefile has the useful feature that, if VERSION is not provided, it will guess the value from the source tarball file name. Make the Fedora Makefile do the same, and adapt the common code to use make-builtins rather than $(shell ...) commands where possible.
Diffstat (limited to 'packaging/RPMS')
-rw-r--r--packaging/RPMS/Fedora/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/packaging/RPMS/Fedora/Makefile b/packaging/RPMS/Fedora/Makefile
index c74d4533..89b73841 100644
--- a/packaging/RPMS/Fedora/Makefile
+++ b/packaging/RPMS/Fedora/Makefile
@@ -1,7 +1,8 @@
-VERSION=0.0.0
-SOURCE_TARBALL_DIR=../../../dist
+TARBALL_DIR=../../../dist
+TARBALL=$(notdir $(wildcard $(TARBALL_DIR)/rabbitmq-server-[0-9.]*.tar.gz))
COMMON_DIR=../../common
-TARBALL=$(SOURCE_TARBALL_DIR)/rabbitmq-server-$(VERSION).tar.gz
+VERSION=$(shell echo $(TARBALL) | sed -e 's:rabbitmq-server-\(.*\)\.tar\.gz:\1:g')
+
TOP_DIR=$(shell pwd)
#Under debian we do not want to check build dependencies, since that
#only checks build-dependencies using rpms, not debs
@@ -23,7 +24,7 @@ rpms: clean server
prepare:
mkdir -p BUILD SOURCES SPECS SRPMS RPMS tmp
- cp $(TOP_DIR)/$(TARBALL) SOURCES
+ cp $(TARBALL_DIR)/$(TARBALL) SOURCES
cp rabbitmq-server.spec SPECS
sed -i 's|%%VERSION%%|$(VERSION)|;s|%%REQUIRES%%|$(REQUIRES)|' \
SPECS/rabbitmq-server.spec