rpm.mk | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 684f8c5f10226ce4328a37c510a1ef0a61db4e69
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Jul 21 11:28:33 2015 -0600
Ticket #48227 rpm.mk doesn't build srpms for 389-ds and nunc-stans
https://fedorahosted.org/389/ticket/48227
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Add makefile macros for the nunc stans tarball name
and url. Grab the nunc stans tarball from the url with wget and
copy it to the SOURCES.
Platforms tested: Fedora 21
Flag Day: no
Doc impact: no
diff --git a/rpm.mk b/rpm.mk
index fffc528..aa397b7 100644
--- a/rpm.mk
+++ b/rpm.mk
@@ -4,6 +4,8 @@ RPM_RELEASE ?= $(shell $(PWD)/rpm/rpmverrel.sh release)
PACKAGE = 389-ds-base
RPM_NAME_VERSION = $(PACKAGE)-$(RPM_VERSION)
TARBALL = $(RPM_NAME_VERSION).tar.bz2
+NUNC_STANS_URL ?= $(shell rpmspec -P -D 'use_nunc_stans 1'
$(PWD)/rpm/389-ds-base.spec.in | awk '/^Source3:/ {print $$2}')
+NUNC_STANS_TARBALL ?= $(shell basename "$(NUNC_STANS_URL)")
clean:
rm -rf dist
@@ -17,6 +19,7 @@ tarballs: local-archive
-mkdir -p dist/sources
cd dist; tar cfj sources/$(TARBALL) $(RPM_NAME_VERSION)
rm -rf dist/$(RPM_NAME_VERSION)
+ cd dist/sources; wget $(NUNC_STANS_URL)
rpmroot:
rm -rf $(RPMBUILD)
@@ -34,6 +37,7 @@ srpmdistdir:
rpmbuildprep:
cp dist/sources/$(TARBALL) $(RPMBUILD)/SOURCES/
+ cp dist/sources/$(NUNC_STANS_TARBALL) $(RPMBUILD)/SOURCES/
cp rpm/$(PACKAGE)-* $(RPMBUILD)/SOURCES/
sed -e s/__VERSION__/$(RPM_VERSION)/ -e s/__RELEASE__/$(RPM_RELEASE)/ \
rpm/$(PACKAGE).spec.in > $(RPMBUILD)/SPECS/$(PACKAGE).spec