summaryrefslogtreecommitdiff
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
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.
-rw-r--r--packaging/RPMS/Fedora/Makefile9
-rw-r--r--packaging/debs/Debian/Makefile5
2 files changed, 8 insertions, 6 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
diff --git a/packaging/debs/Debian/Makefile b/packaging/debs/Debian/Makefile
index 67fabae0..7ab8b659 100644
--- a/packaging/debs/Debian/Makefile
+++ b/packaging/debs/Debian/Makefile
@@ -1,8 +1,9 @@
TARBALL_DIR=../../../dist
-TARBALL=$(shell (cd $(TARBALL_DIR); echo rabbitmq-server-[0-9]*.tar.gz))
+TARBALL=$(notdir $(wildcard $(TARBALL_DIR)/rabbitmq-server-[0-9.]*.tar.gz))
COMMON_DIR=../../common
-DEBIAN_ORIG_TARBALL=$(shell echo $(TARBALL) | sed -e 's:\(.*\)-\(.*\)\(\.tar\.gz\):\1_\2\.orig\3:g')
VERSION=$(shell echo $(TARBALL) | sed -e 's:rabbitmq-server-\(.*\)\.tar\.gz:\1:g')
+
+DEBIAN_ORIG_TARBALL=$(shell echo $(TARBALL) | sed -e 's:\(.*\)-\(.*\)\(\.tar\.gz\):\1_\2\.orig\3:g')
UNPACKED_DIR=rabbitmq-server-$(VERSION)
PACKAGENAME=rabbitmq-server
SIGNING_KEY_ID=056E8E56