# Enable Python 3 builds for Fedora %if 0%{?fedora} %bcond_without python3 # If the definition isn't available for python3_pkgversion, define it %{?!python3_pkgversion:%global python3_pkgversion 3} %else %bcond_with python3 %endif Name: koji-sidetag-plugin Version: 0.1 Release: 2%{?dist} Summary: Koji support for sidetags Group: Applications/System License: GPLv2 URL: https://pagure.io/sidetag-koji-plugin Source0: %{name}-%{version}.tar.bz2 # generated by # git archive --format=tar --prefix=$(name)-$(version)/ HEAD |bzip2 > $(name)-$(version).tar.bz2 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python BuildRequires: python2-devel %if 0%{with python3} BuildRequires: python3-devel %endif BuildRequires: python-setuptools %description Koji support for sidetags %package -n python2-%{name}-hub Summary: Sidetag plugin for koji hub Requires: python2-koji-hub %description -n python2-%{name}-hub Koji hub plugin for handling sidetags. %if 0%{with python3} %package -n python%{python3_pkgversion}-%{name}-hub %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}-hub} Summary: Sidetag plugin for koji hub Provides: koji-containerbuild-hub Requires: python%{python3_pkgversion}-koji-hub %description -n python%{python3_pkgversion}-%{name}-hub Koji hub plugin for handling sidetags. %endif %package -n python2-%{name}-cli %{?python_provide:%python_provide python2-%{name}-cli} Summary: Sidetag plugin for koji CLI Provides: koji-containerbuild-cli Requires: python2-koji %description -n python2-%{name}-cli Koji CLI plugin for handling sidetags. %if 0%{with python3} %package -n python%{python3_pkgversion}-%{name}-cli %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}-cli} Summary: Sidetag plugin for koji CLI Provides: koji-containerbuild-cli Requires: python%{python3_pkgversion}-koji %description -n python%{python3_pkgversion}-%{name}-cli Koji CLI plugin for handling sidetags. %endif %if 0%{with python3} %package -n python%{python3_pkgversion}-%{name}-tools %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}-tools} Summary: Sidetag plugin tools Provides: koji-containerbuild-tools Requires: python%{python3_pkgversion}-koji %description -n python%{python3_pkgversion}-%{name}-tools Koji sidetag plugin's tools. %endif %prep %setup -q %build %install %{__install} -d $RPM_BUILD_ROOT/etc/koji-hub/plugins %{__install} -p -m 0644 sidetag.conf $RPM_BUILD_ROOT/etc/koji-hub/plugins/sidetag.conf %{__install} -d $RPM_BUILD_ROOT%{_prefix}/lib/koji-hub-plugins %{__install} -p -m 0644 sidetag_hub.py $RPM_BUILD_ROOT%{_prefix}/lib/koji-hub-plugins/sidetag_hub.py %{__install} -d $RPM_BUILD_ROOT%{_prefix}/lib/koji-hub-plugins %{__install} -d $RPM_BUILD_ROOT%{python2_sitelib}/koji_cli_plugins %{__install} -p -m 0644 sidetag_cli.py $RPM_BUILD_ROOT%{python2_sitelib}/koji_cli_plugins/sidetag_cli.py %if 0%{with python3} %{__install} -d $RPM_BUILD_ROOT%{python3_sitelib}/koji_cli_plugins %{__install} -p -m 0644 sidetag_cli.py $RPM_BUILD_ROOT%{python3_sitelib}/koji_cli_plugins/sidetag_cli.py %{__install} -d $RPM_BUILD_ROOT%{_prefix}/bin %{__install} -p -m 0755 koji-sidetag-cleanup $RPM_BUILD_ROOT%{_prefix}/bin/koji-sidetag-cleanup %endif %clean rm -rf $RPM_BUILD_ROOT %files -n python2-%{name}-cli %{python2_sitelib}/koji_cli_plugins %files -n python2-%{name}-hub %config(noreplace) /etc/koji-hub/plugins/sidetag.conf %{_prefix}/lib/koji-hub-plugins %if 0%{with python3} %files -n python%{python3_pkgversion}-%{name}-cli %{python3_sitelib}/koji_cli_plugins %files -n python%{python3_pkgversion}-%{name}-hub %config(noreplace) /etc/koji-hub/plugins/sidetag.conf %{_prefix}/lib/koji-hub-plugins/sidetag_hub.py %files -n python%{python3_pkgversion}-%{name}-tools %{_prefix}/bin/koji-sidetag-cleanup %endif %changelog * Tue Aug 13 2019 Tomas Kopecek - 0.1-1 * copy arches from basetag