a75cd20
%global gitrev 3459d
d2826e3
%global posttag git%{gitrev}
d2826e3
%global snapshot %{version}-%{posttag}
d2826e3
d2826e3
Name:       pybugz
d2826e3
Summary:    Command line interface for Bugzilla written in Python
a75cd20
Version:    0.11
d94673f
Release:    9.%{posttag}%{?dist}
d2826e3
Group:      Applications/Communications
d2826e3
License:    GPLv2
d2826e3
URL:        https://github.com/williamh/pybugz
d2826e3
BuildArch:  noarch
d2826e3
a75cd20
Requires:       python3
a75cd20
BuildRequires:  python3-devel
d2826e3
84d47d3
Patch0:     rh-default.patch
84d47d3
d2826e3
%if ! 0%{?rhel}
d2826e3
# no bash-completion for RHEL
d2826e3
%global bash_completion 1
d2826e3
%endif
d2826e3
7fcb169
%if 0%{?bash_completion}
d2826e3
BuildRequires: bash-completion pkgconfig
d2826e3
%endif
d2826e3
d2826e3
# There is possible to download upstream tarball generated by github, but it is
d2826e3
# quite old now.  For HOWTO obtain correct tarball see the "prepare-tarball.sh"
d2826e3
# script (in dist-git).
d2826e3
Source0: %{name}-%{snapshot}.tar.gz
d2826e3
d2826e3
%description
d2826e3
Pybugz was conceived as a tool to speed up the work-flow for Gentoo Linux
d2826e3
contributors when dealing with bugs using Bugzilla.  By avoiding the clunky web
d2826e3
interface, the user can search, isolate and contribute to the project very
d2826e3
quickly.  Developers alike can easily extract attachments and close bugs
d2826e3
comfortably from the command line.
d2826e3
d2826e3
%prep
84d47d3
%autosetup -p1 -n %{name}-%{snapshot}
d2826e3
d2826e3
%build
a75cd20
%{__python3} setup.py build
d2826e3
d2826e3
%install
d2826e3
# default install process
a75cd20
%{__python3} setup.py install --root=%{buildroot}
d2826e3
d2826e3
%global bash_cmpl_dir %(pkg-config --variable=completionsdir bash-completion)
7fcb169
%if 0%{?bash_completion}
d2826e3
  # find the proper directory to install bash-completion script
d2826e3
  mkdir -p %{buildroot}%{bash_cmpl_dir}
d2826e3
  cp %{_builddir}/%{name}-%{snapshot}/contrib/bash-completion \
d2826e3
     %{buildroot}%{bash_cmpl_dir}/bugz
d2826e3
%endif
d2826e3
d2826e3
mkdir -p %{buildroot}%{_mandir}/man1
5a41d5d
cp man/bugz.1 %{buildroot}%{_mandir}/man1/bugz.1
d2826e3
mkdir -p %{buildroot}%{_docdir}
d2826e3
d2826e3
%clean
d2826e3
d2826e3
%files
d2826e3
%{_bindir}/bugz
a75cd20
%{python3_sitelib}/bugz
7fcb169
%if 0%{?bash_completion}
d2826e3
  %{bash_cmpl_dir}/bugz
d2826e3
%endif
a75cd20
%{python3_sitelib}/%{name}-*.egg-info
d2826e3
%{_mandir}/man1/bugz.1.gz
a75cd20
%{_datadir}/pybugz.d/
a75cd20
%{_mandir}/man5/*
a75cd20
%doc README LICENSE
d2826e3
d2826e3
%changelog
d94673f
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-9.git3459d
d94673f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d94673f
101a9ff
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.11-8.git3459d
101a9ff
- Rebuild for Python 3.6
101a9ff
81b2a09
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-7.git3459d
81b2a09
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
81b2a09
fa1f9b4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-6.git3459d
fa1f9b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
fa1f9b4
5a41d5d
* Thu Dec 03 2015 Pavel Raiskup <praiskup@redhat.com> - 0.11-5.git3459d
5a41d5d
- fix rpmbuild --short-circuit
5a41d5d
4fdae04
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-4.git3459d
4fdae04
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
4fdae04
84d47d3
* Mon Oct 19 2015 Pavel Raiskup <praiskup@redhat.com> - 0.11-3.git3459d
84d47d3
- setup default connection to 'RedHat'
84d47d3
ef83ac8
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2.git3459d
ef83ac8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ef83ac8
a75cd20
* Thu Dec 18 2014 Pavel Raiskup <praiskup@redhat.com> - 0.11-1.git3459d
a75cd20
- rebase to recent git HEAD pybugz version
a75cd20
62fcfd6
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-6.git683dd
62fcfd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
62fcfd6
ae833f5
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-5.git683dd
ae833f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ae833f5
7fcb169
* Wed Mar 13 2013 Pavel Raiskup <praiskup@redhat.com> - 0.10-4.git683dd
7fcb169
- fix the macro problem for epel
7fcb169
96a1e34
* Wed Mar 13 2013 Pavel Raiskup <praiskup@redhat.com> - 0.10-3.git683dd
96a1e34
- remove downstream patches for now - I'll reapply again if it becomes upstream
96a1e34
- package the latest git version
96a1e34
d57b44d
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-2.git89df2
d57b44d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d57b44d
d2826e3
* Sun Jan 20 2013 Pavel Raiskup <praiskup@redhat.com> - 0.10-1.git89df2
d2826e3
- changes for problems spotted/fixed by Scott Tsai in merge-review bug:
d2826e3
- important change - move git revision behind the release number
d2826e3
- reflect that ^^^ change in changelog
d2826e3
- remove statement disabling debuginfo (it is not needed)
d2826e3
d2826e3
* Sun Jan 20 2013 Pavel Raiskup <praiskup@redhat.com> - 0.10git69cd7-1
d2826e3
- apply downstream patches to reflect https://github.com/praiskup/pybugz
d2826e3
  it allows hierarchy of configuration files and a bit better error handling
d2826e3
- update URL as upstream is now on github
d2826e3
- make the RedHat bugzilla default, s/bugz/pybugz/ in manpage
d2826e3
- fedora-review fixes: s/define/global/, BR python2-devel, noreplace
d2826e3
- mention in documentation the ~/.bugzrc file
d2826e3
- switch the binary name to 'bugz' again, it would mislead users (see merge
d2826e3
  review bug comment)
d2826e3
d2826e3
* Mon Oct 01 2012 Pavel Raiskup <praiskup@redhat.com> - 0.10-1
d2826e3
- rebase to 0.10
d2826e3
- use the 'pybugz' rather then bugz which collides a little with 'bugzilla'
d2826e3
d2826e3
* Tue Nov 30 2010 Pierre Carrier <prc@redhat.com> - 0.8.0-1
d2826e3
- Initial packaging