Build: allow to build only py2 rpms for fedora

This is more or less for testing purposes of py2/py3 compatibility

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
Martin Basti
2017-02-07 14:56:39 +01:00
parent f3537297be
commit 4eec2f5e57
3 changed files with 9 additions and 2 deletions

View File

@@ -36,6 +36,11 @@ It may be possible to do a simple make install but this has not been
well-tested. Additional work is done in pre/post install scripts in the ipa well-tested. Additional work is done in pre/post install scripts in the ipa
spec file. spec file.
To build only python2 packages on fedora following steps are required:
$ autoreconf -i
$ ./configure
$ make rpms RPMBUILD_OPTS="--define 'with_python3 0'"
Developing plugins Developing plugins
------------------ ------------------

View File

@@ -122,7 +122,7 @@ rpms: $(VERSION_UPDATE_TARGET)
$(MAKE) _rpms-body $(MAKE) _rpms-body
_rpms-body: _rpms-prep _rpms-body: _rpms-prep
rpmbuild --define "_topdir $(RPMBUILD)" -ba $(top_builddir)/$(PACKAGE).spec rpmbuild --define "_topdir $(RPMBUILD)" -ba $(top_builddir)/$(PACKAGE).spec $(RPMBUILD_OPTS)
cp $(RPMBUILD)/RPMS/*/*$$(cat $(top_builddir)/.version)*.rpm $(top_builddir)/dist/rpms/ cp $(RPMBUILD)/RPMS/*/*$$(cat $(top_builddir)/.version)*.rpm $(top_builddir)/dist/rpms/
cp $(RPMBUILD)/SRPMS/*$$(cat $(top_builddir)/.version)*.src.rpm $(top_builddir)/dist/srpms/ cp $(RPMBUILD)/SRPMS/*$$(cat $(top_builddir)/.version)*.src.rpm $(top_builddir)/dist/srpms/
rm -f rm -f $(top_builddir)/.version rm -f rm -f $(top_builddir)/.version
@@ -131,7 +131,7 @@ srpms: $(VERSION_UPDATE_TARGET)
$(MAKE) _srpms-body $(MAKE) _srpms-body
_srpms-body: _rpms-prep _srpms-body: _rpms-prep
rpmbuild --define "_topdir $(RPMBUILD)" -bs $(top_builddir)/$(PACKAGE).spec rpmbuild --define "_topdir $(RPMBUILD)" -bs $(top_builddir)/$(PACKAGE).spec $(RPMBUILD_OPTS)
cp $(RPMBUILD)/SRPMS/*$$(cat $(top_builddir)/.version)*.src.rpm $(top_builddir)/dist/srpms/ cp $(RPMBUILD)/SRPMS/*$$(cat $(top_builddir)/.version)*.src.rpm $(top_builddir)/dist/srpms/
rm -f rm -f $(top_builddir)/.version rm -f rm -f $(top_builddir)/.version

View File

@@ -17,11 +17,13 @@
%global with_ipatests_option --without-ipatests %global with_ipatests_option --without-ipatests
%endif %endif
%if 0%{!?with_python3:1}
%if 0%{?rhel} %if 0%{?rhel}
%global with_python3 0 %global with_python3 0
%else %else
%global with_python3 1 %global with_python3 1
%endif %endif
%endif
# lint is not executed during rpmbuild # lint is not executed during rpmbuild
# %%global with_lint 1 # %%global with_lint 1