File pybugz.spec of Package pybugz
#
# spec file for package pybugz
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
Name: pybugz
Version: 0.11.x
Release: 0
Summary: Python Bugzilla Interface
License: GPL-2.0
Group: Productivity/Networking/Web/Utilities
Url: http://www.liquidx.net/pybugz/
Source0: https://github.com/williamh/%{name}/archive/%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python3-devel
Requires: python3
%description
PyBugz is a python and command line interface to Bugzilla.
It was conceived as a tool to speed up the workflow for Gentoo Linux developers and contributors when dealing with bugs using Bugzilla. By avoiding the clunky web interface, the user quickly search, isolate and contribute to the project very quickly. Developers alike can easily extract attachments and close bugs all from the comfort of the command line.
%package bash-completion
Summary: Bash completion for %{name}
License: GPL-3.0+
Group: Productivity/Networking/Web/Utilities
Requires: %{name} = %{version}
Requires: bash-completion
BuildArch: noarch
%description bash-completion
Bash command line completion support for %{name}
%package zsh-completion
Summary: Zsh completion for %{name}
License: GPL-3.0+
Group: Productivity/Networking/Web/Utilities
Requires: %{name} = %{version}
Requires: zsh
BuildArch: noarch
%description zsh-completion
Zsh command line completion support for %{name}
%prep
%setup -q
%build
python3 setup.py build
%install
python3 setup.py install --prefix=%{_prefix} --optimize=2 --root=%{buildroot}
%fdupes %{buildroot}
install -D -m 0644 contrib/bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
install -D -m 0644 contrib/zsh-completion %{buildroot}%{_sysconfdir}/zsh_completion.d/%{name}
%files
%defattr(-,root,root,-)
%{_bindir}/bugz
%{python3_sitelib}/*
%{_mandir}/man1/*
%doc LICENSE README
%files bash-completion
%defattr(-,root,root)
%config %{_sysconfdir}/bash_completion.d/%{name}
%doc LICENSE README
%files zsh-completion
%defattr(-,root,root)
%dir %{_sysconfdir}/zsh_completion.d
%config %{_sysconfdir}/zsh_completion.d/%{name}
%doc LICENSE README
%changelog