# HG changeset patch # User Mads Kiilerich <m...@kiilerich.com> # Date 1572198921 -3600 # Sun Oct 27 18:55:21 2019 +0100 # Branch stable # Node ID 467d582886f688e01fe59b1d6f2de244d7be1458 # Parent 32dbdaffb2ae030119890e05b87c4677706e7c6a packaging: introduce generic local rpm build target using python3
It is unnecessary extra work to explicitly add Makefile targets for a random selection of Fedora versions. Generally, it just works. If not, the root cause should be fixed. diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -208,7 +208,8 @@ packaging_targets := \ linux-wheels \ linux-wheels-x86_64 \ linux-wheels-i686 \ - ppa + ppa \ + rpm # Forward packaging targets for convenience. $(packaging_targets): diff --git a/contrib/packaging/Makefile b/contrib/packaging/Makefile --- a/contrib/packaging/Makefile +++ b/contrib/packaging/Makefile @@ -56,6 +56,9 @@ help: @echo 'ppa' @echo ' Build a Debian source package locally targeting the current system' @echo '' + @echo 'rpm' + @echo ' Build a RPM targeting the current system using Python 3' + @echo '' @echo 'centos{$(strip $(CENTOS_RELEASES))}' @echo ' Build an RPM for a specific CentOS version locally' @echo '' @@ -96,6 +99,14 @@ endef $(foreach codename,$(UBUNTU_CODENAMES),$(eval $(call ubuntu_targets,$(codename)))) +# Generic RPM target, mainly for Fedora/CentOS/RHEL. +rpm: + mkdir -p $$(HGROOT)/packages/rpm + ./buildrpm --python3 + cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/rpm + cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/rpm + rm -rf $(HGROOT)/rpmbuild + # Fedora targets. define fedora_targets .PHONY: fedora$(1) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel