File osc-plugin-qam.spec of Package osc-plugin-qam
#
# spec file for package osc-plugin-qam
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define OSCQAMPATH %{python3_sitelib}/oscqam/
Name: osc-plugin-qam
Version: 1.0.0
Release: 0
Summary: Plugin for OSC to support the workflow of the QA maintenance department
License: GPL-2.0-or-later
Group: Productivity/Other
URL: https://qam.suse.de
Source0: %{name}-%{version}.tar.xz
BuildRequires: osc
BuildRequires: python3-setuptools
Requires: osc >= 1.1.0
Requires: python3-PrettyTable
Requires: python3-python-dateutil
Requires: python3-requests
Conflicts: python-oscqam
Conflicts: python2-oscqam
Conflicts: python3-oscqam
Provides: oscqam >= %{version}
Obsoletes: oscqam <= 0.30.5
Obsoletes: python3-oscqam
Obsoletes: python2-oscqam
Obsoletes: python-oscqam
BuildArch: noarch
%description
Plugin for OSC to support the workflow of the QA maintenance department for SLE.
%prep
%autosetup
%build
python3 setup.py build
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
install -d %{buildroot}%{osc_plugin_dir}
ln -s %{OSCQAMPATH}cli.py %{buildroot}%{osc_plugin_dir}/qam.py
ln -s %{OSCQAMPATH}cli_my.py %{buildroot}%{osc_plugin_dir}/qam_my.py
ln -s %{OSCQAMPATH}cli_info.py %{buildroot}%{osc_plugin_dir}/qam_info.py
ln -s %{OSCQAMPATH}cli_assign.py %{buildroot}%{osc_plugin_dir}/qam_assign.py
ln -s %{OSCQAMPATH}cli_unassign.py %{buildroot}%{osc_plugin_dir}/qam_unassign.py
ln -s %{OSCQAMPATH}cli_version.py %{buildroot}%{osc_plugin_dir}/qam_version.py
ln -s %{OSCQAMPATH}cli_approve.py %{buildroot}%{osc_plugin_dir}/qam_approve.py
ln -s %{OSCQAMPATH}cli_reject.py %{buildroot}%{osc_plugin_dir}/qam_reject.py
ln -s %{OSCQAMPATH}cli_comment.py %{buildroot}%{osc_plugin_dir}/qam_comment.py
ln -s %{OSCQAMPATH}cli_rmcomment.py %{buildroot}%{osc_plugin_dir}/qam_rmcomment.py
ln -s %{OSCQAMPATH}cli_list.py %{buildroot}%{osc_plugin_dir}/qam_list.py
ln -s %{OSCQAMPATH}cli_assigned.py %{buildroot}%{osc_plugin_dir}/qam_assigned.py
%files
%doc README.rst
%{python3_sitelib}/oscqam
%{python3_sitelib}/osc_plugin_qam-*
%{osc_plugin_dir}/*.py
%changelog