summaryrefslogtreecommitdiffstats
path: root/pybugz.spec
diff options
context:
space:
mode:
Diffstat (limited to 'pybugz.spec')
-rw-r--r--pybugz.spec94
1 files changed, 94 insertions, 0 deletions
diff --git a/pybugz.spec b/pybugz.spec
new file mode 100644
index 0000000..56e6c5d
--- /dev/null
+++ b/pybugz.spec
@@ -0,0 +1,94 @@
+Name: pybugz
+Summary: Command line interface for Bugzilla written in Python
+Version: 0.10git69cd7
+Release: 1%{?dist}
+Group: Applications/Communications
+License: GPLv2
+URL: https://github.com/williamh/pybugz
+BuildArch: noarch
+
+Requires: python2
+BuildRequires: python2
+
+# we don't need debuginfo package
+%global debug_package %{nil}
+
+%if ! 0%{?rhel}
+# no bash-completion for RHEL
+%define bash_completion 1
+%endif
+
+%if %{?bash_completion}
+BuildRequires: bash-completion pkgconfig
+%endif
+
+# There is possible to download upstream tarball generated by github, but it is
+# quite old now. For HOWTO obtain correct tarball see the "prepare-tarball.sh"
+# script.
+Source0: %{name}-%{version}.tar.gz
+
+# use the 'pybugz' binary in bash completion
+Patch0: %{name}-%{version}-bash-complete.patch
+# follow https://github.com/praiskup/pybugz changes (until accepted by upstream)
+Patch1: %{name}-%{version}-downstream.patch
+
+%description
+Pybugz was conceived as a tool to speed up the work-flow for Gentoo Linux
+contributors when dealing with bugs using Bugzilla. By avoiding the clunky web
+interface, the user can search, isolate and contribute to the project very
+quickly. Developers alike can easily extract attachments and close bugs
+comfortably from the command line.
+
+%prep
+%setup -q
+%patch0 -p1 -b .bash-complete
+%patch1 -p1 -b .downstream
+
+%build
+%{__python} setup.py build
+
+%install
+# use rather 'pybugz' than just 'bugz'
+%define pybugz_binary pybugz
+
+# default install process
+%{__python} setup.py install --root=%{buildroot}
+
+mv %{buildroot}%{_bindir}/bugz %{buildroot}%{_bindir}/%{pybugz_binary}
+%global bash_cmpl_dir %(pkg-config --variable=completionsdir bash-completion)
+%if %{?bash_completion}
+ # find the proper directory to install bash-completion script
+ mkdir -p %{buildroot}%{bash_cmpl_dir}
+ cp %{_builddir}/%{name}-%{version}/contrib/bash-completion \
+ %{buildroot}%{bash_cmpl_dir}/pybugz
+%endif
+
+mkdir -p %{buildroot}%{_mandir}/man1
+mv man/bugz.1 %{buildroot}%{_mandir}/man1/pybugz.1
+mkdir -p %{buildroot}%{_docdir}
+
+%clean
+
+%files
+%{_bindir}/%{pybugz_binary}
+%{python_sitelib}/bugz
+%if %{?bash_completion}
+ %{bash_cmpl_dir}/pybugz
+%endif
+%{python_sitelib}/%{name}-*.egg-info
+%{_mandir}/man1/pybugz.1.gz
+%config %{_sysconfdir}/pybugz
+%doc README LICENSE
+
+%changelog
+* Sun Jan 20 2013 Pavel Raiskup <praiskup@redhat.com> - 0.10-2
+- apply downstream patches to reflect https://github.com/praiskup/pybugz
+ it allows hierarchy of configuration files and a bit better error handling
+- update URL as upstream is now on github
+
+* Mon Oct 01 2012 Pavel Raiskup <praiskup@redhat.com> - 0.10-1
+- rebase to 0.10
+- use the 'pybugz' rather then bugz which collides a little with 'bugzilla'
+
+* Tue Nov 30 2010 Pierre Carrier <prc@redhat.com> - 0.8.0-1
+- Initial packaging