浏览代码

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
Rich Megginson 10 年之前
父节点
当前提交
684f8c5f10
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      rpm.mk

+ 4 - 0
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