From 748d3b70839feaf3983617334085080bc36c9a9e Mon Sep 17 00:00:00 2001 From: mprahl Date: Nov 07 2017 20:04:18 +0000 Subject: Add support for building without EPEL --- diff --git a/module-build-service.spec b/module-build-service.spec index a15e2e8..0b130c0 100644 --- a/module-build-service.spec +++ b/module-build-service.spec @@ -1,6 +1,8 @@ +# Set this to 0 if you don't have access to EPEL packages while building +%global with_epel 1 Name: module-build-service Version: 1.4.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Module Build Service for Modularity Group: Development/Tools @@ -16,6 +18,7 @@ ExclusiveArch: %{ix86} x86_64 noarch BuildRequires: python2-devel +%if 0%{?with_epel} BuildRequires: python2-mock BuildRequires: python-vcrpy BuildRequires: fedmsg @@ -42,9 +45,11 @@ BuildRequires: python-ldap3 BuildRequires: python-requests-kerberos BuildRequires: python2-koji +%endif %if 0%{?rhel} && 0%{?rhel} <= 7 BuildRequires: python-setuptools +%if 0%{?with_epel} BuildRequires: python-flask-sqlalchemy BuildRequires: python-flask-migrate BuildRequires: python-nose @@ -58,8 +63,10 @@ BuildRequires: python-flask BuildRequires: systemd-python BuildRequires: python-dogpile-cache BuildRequires: python-backports-ssl_match_hostname +%endif %else BuildRequires: python2-setuptools +%if 0%{?with_epel} BuildRequires: python2-flask-sqlalchemy BuildRequires: python2-flask-migrate BuildRequires: python2-nose @@ -70,14 +77,17 @@ BuildRequires: python2-futures BuildRequires: python2-flask BuildRequires: python2-systemd BuildRequires: python2-dogpile-cache +%endif %if 0%{?fedora} && 0%{?fedora} <= 25 BuildRequires: pyOpenSSL BuildRequires: python-sqlalchemy %else +%if 0%{?with_epel} BuildRequires: python2-pyOpenSSL BuildRequires: python2-sqlalchemy %endif +%endif %endif @@ -177,6 +187,7 @@ rm -f module_build_service/.mbs_local_build.db %install %py2_install +%if 0%{?with_epel} export PYTHONPATH=%{buildroot}%{python2_sitelib} mkdir -p %{buildroot}/%{_mandir}/man1 for command in mbs-manager mbs-frontend mbs-upgradedb ; do @@ -185,6 +196,7 @@ MBS_CONFIG_FILE=conf/config.py help2man -N --version-string=%{version} \ %{buildroot}/%{_bindir}/$command > \ %{buildroot}/%{_mandir}/man1/$command.1 done +%endif %check @@ -197,7 +209,6 @@ done %license LICENSE %{python2_sitelib}/module_build_service* %{_bindir}/mbs-* -%{_mandir}/man1/mbs-*.1* %dir %{_sysconfdir}/module-build-service %config(noreplace) %{_sysconfdir}/module-build-service/config.py %config(noreplace) %{_sysconfdir}/module-build-service/koji.conf @@ -213,7 +224,15 @@ done %exclude %{python2_sitelib}/conf/ %exclude %{python2_sitelib}/tests/ +%if 0%{?with_epel} +%{_mandir}/man1/mbs-*.1* +%endif + + %changelog +* Tue Nov 07 2017 mprahl - 1.4.5-2 +- Support building without EPEL + * Mon Nov 06 2017 mprahl - 1.4.5-1 - new version