%if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif # The server, lab controller, and integration test subpackages can be conditionally built. # Use rpmbuild --without to override. %global _lc_services beaker-proxy beaker-provision beaker-watchdog beaker-transfer # systemd? %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %global with_systemd 1 %else %global with_systemd 0 %endif # This will not necessarily match the RPM Version if the real version number is # not representable in RPM. For example, a release candidate might be 0.15.0rc1 # but that is not usable for the RPM Version because it sorts higher than # 0.15.0, so the RPM will have Version 0.15.0 and Release 0.rc1 in that case. %global upstream_version 23.3 %global upstream_name beaker Name: python-%{upstream_name} Version: 23.3 Release: 1%{?dist} Summary: Full-stack software and hardware integration testing system Group: Applications/Internet License: GPLv2+ and BSD URL: https://beaker-project.org/ Source0: https://beaker-project.org/releases/%{upstream_name}-%{upstream_version}.tar.xz BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python-nose >= 0.10 BuildRequires: python-unittest2 BuildRequires: python-mock BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-docutils >= 0.6 # These are needed just to build the server manpages #BuildRequires: python-sqlalchemy #BuildRequires: TurboGears #BuildRequires: python-flask #BuildRequires: python2-decorator #BuildRequires: python-webassets #BuildRequires: python-netaddr #BuildRequires: python-ldap #BuildRequires: cracklib-python #BuildRequires: python2-passlib #BuildRequires: rpm-python %if 0%{?rhel} == 5 || 0%{?rhel} == 6 BuildRequires: python-sphinx10 %else BuildRequires: python-sphinx >= 1.0 %endif BuildRequires: python-sphinxcontrib-httpdomain BuildRequires: python-prettytable # setup.py uses pkg-config to find the right installation paths %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: pkgconfig(bash-completion) %endif %if %{with_systemd} BuildRequires: pkgconfig(systemd) %endif %if 0%{?rhel} >= 6 || 0%{?fedora} # some client commands use requests, they are unsupported on RHEL5 BuildRequires: python-requests %endif # As above, these client dependencies are needed in build because of sphinx BuildRequires: python-krbV BuildRequires: python-lxml BuildRequires: libxslt-python %package common Summary: Common components for Beaker packages Group: Applications/Internet Provides: %{name} = %{version}-%{release} %package client Summary: Command-line client for interacting with Beaker Group: Applications/Internet Requires: python Requires: python-setuptools Requires: %{name}-common = %{version}-%{release} Requires: python-krbV Requires: python-lxml %if 0%{?rhel} >= 6 || 0%{?fedora} # some client commands use requests, they are unsupported on RHEL5 Requires: python-requests %endif Requires: libxslt-python %if !(0%{?rhel} >= 6 || 0%{?fedora} >= 14) Requires: python-simplejson %endif Requires: libxml2-python Requires: python-prettytable Requires: python-jinja2 # beaker-wizard was moved from rhts-devel to here in 4.52 Conflicts: rhts-devel < 4.52 %description Beaker is a full stack software and hardware integration testing system, with the ability to manage a globally distributed network of test labs. %description common Python modules which are used by other Beaker packages. %description client The bkr client is a command-line tool for interacting with Beaker servers. You can use it to submit Beaker jobs, fetch results, and perform many other tasks. %prep %setup -q -n %{upstream_name}-%{upstream_version} # The server relies on a great many packages which are intended to be bundled # source, and its documentation greatly inflates the number of BR packages # required. Until those are packaged separately, building those subpackages is # unnnecessary rm -r Server documentation/server-api %build make %install DESTDIR=%{buildroot} make install %check make check %files common %doc README.md %license COPYING %dir %{python2_sitelib}/bkr/ %{python2_sitelib}/bkr/__init__.py* %{python2_sitelib}/bkr/timeout_xmlrpclib.py* %{python2_sitelib}/bkr/common/ %{python2_sitelib}/bkr/log.py* %{python2_sitelib}/bkr-*.egg-info/ %{_mandir}/man8/beaker-import.8.gz %exclude %{_mandir}/man8/beaker-create-ipxe-image.8.gz %exclude %{_mandir}/man8/beaker-create-kickstart.8.gz %exclude %{_mandir}/man8/beaker-init.8.gz %exclude %{_mandir}/man8/beaker-repo-update.8.gz %exclude %{_mandir}/man8/beaker-usage-reminder.8.gz %files client %dir %{_sysconfdir}/%{upstream_name} %doc Client/client.conf.example %{python2_sitelib}/bkr/client/ %{python2_sitelib}/bkr.client-*-nspkg.pth %{python2_sitelib}/bkr.client-*.egg-info/ %{_bindir}/beaker-wizard %{_bindir}/bkr %{_mandir}/man1/beaker-wizard.1.gz %{_mandir}/man1/bkr.1.gz %{_mandir}/man1/bkr-*.1.gz %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 %{_datadir}/bash-completion %else %{_sysconfdir}/bash_completion.d %endif %changelog * Wed Dec 21 2016 Greg Hellings - 23.3-1 - Initial build