Build: add make srpms target

https://fedorahosted.org/freeipa/ticket/6418

Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
This commit is contained in:
Petr Spacek 2016-11-10 10:14:32 +01:00 committed by Martin Basti
parent a691b7d183
commit 0023fb5924

View File

@ -38,7 +38,7 @@ clean-local:
# convenience targets for RPM build
.PHONY: rpmroot rpmdistdir version-update _dist-version-bakein _rpms-prep \
rpms _rpms-body
rpms _rpms-body srpms _srpms-body
RPMBUILD ?= $(abs_builddir)/rpmbuild
TARBALL = $(PACKAGE)-$(VERSION).tar.gz
rpmroot:
@ -94,6 +94,14 @@ _rpms-body: _rpms-prep
cp $(RPMBUILD)/SRPMS/*$$(cat $(top_builddir)/.version)*.src.rpm $(top_builddir)/dist/srpms/
rm -f rm -f $(top_builddir)/.version
srpms: $(VERSION_UPDATE_TARGET)
$(MAKE) _srpms-body
_srpms-body: _rpms-prep
rpmbuild --define "_topdir $(RPMBUILD)" -bs $(top_builddir)/$(PACKAGE).spec
cp $(RPMBUILD)/SRPMS/*$$(cat $(top_builddir)/.version)*.src.rpm $(top_builddir)/dist/srpms/
rm -f rm -f $(top_builddir)/.version
.PHONY: lint
if WITH_POLINT
POLINT_TARGET = polint