Add support for rpm builds through mock

release1.6.4
James Laska 11 years ago committed by James Cammarata
parent 2c6c1b99c7
commit 84c40fc111

@ -16,7 +16,7 @@
########################################################
# variable section
NAME = "ansible"
NAME = ansible
OS = $(shell uname -s)
# Manpages are currently built with asciidoc -- would like to move to markdown
@ -80,6 +80,10 @@ ifeq ($(OFFICIAL),)
endif
RPMNVR = "$(NAME)-$(VERSION)-$(RPMRELEASE)$(RPMDIST)"
# MOCK build parameters
MOCK_BIN ?= mock
MOCK_CFG ?=
NOSETESTS ?= nosetests
########################################################
@ -154,6 +158,20 @@ rpmcommon: $(MANPAGES) sdist
@cp dist/*.gz rpm-build/
@sed -e 's#^Version:.*#Version: $(VERSION)#' -e 's#^Release:.*#Release: $(RPMRELEASE)%{?dist}#' $(RPMSPEC) >rpm-build/$(NAME).spec
mock-srpm: /etc/mock/$(MOCK_CFG).cfg rpmcommon
$(MOCK_BIN) -r $(MOCK_CFG) --resultdir rpm-build/ --buildsrpm --spec rpm-build/$(NAME).spec --sources rpm-build/
@echo "#############################################"
@echo "Ansible SRPM is built:"
@echo rpm-build/*.src.rpm
@echo "#############################################"
mock-rpm: mock-srpm
$(MOCK_BIN) -r $(MOCK_CFG) --resultdir rpm-build/ --rebuild rpm-build/$(NAME)-*.src.rpm
@echo "#############################################"
@echo "Ansible RPM is built:"
@echo rpm-build/*.noarch.rpm
@echo "#############################################"
srpm: rpmcommon
@rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define "_builddir %{_topdir}" \

Loading…
Cancel
Save