File hub.spec of Package hub
#
# spec file for package hub
#
# Copyright (c) 2018 SUSE LINUX 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/
#
Name: hub
Version: 2.3.0_pre10
%define ver 2.3.0-pre10
Release: 0
Summary: Command-line wrapper for git and GitHub
License: MIT
Group: Development/Tools/Version Control
Url: https://github.com/github/hub
Source: https://github.com/github/%{name}/archive/v%{ver}.tar.gz
BuildRequires: fish
BuildRequires: go
BuildRequires: groff
BuildRequires: rubygem(ronn)
BuildRequires: zsh
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
hub is a command line tool that wraps git in order to extend it with extra features and commands that make working with GitHub easier.
%prep
%setup -q -n %{name}-%{ver}
sed -i -e 's#bin/ronn --#ronn --#' -e 's#script/bootstrap#true#' Makefile
chmod +x script/install.sh
sed -i -e 's#cd .*#true#' script/install.sh
%build
make bin/hub man-pages
%install
prefix=%{buildroot}%{_prefix} script/install.sh
install -Dm0644 etc/hub.bash_completion.sh %{buildroot}%{_datadir}/bash-completion/completions/hub
install -Dm0644 etc/hub.fish_completion %{buildroot}%{_datadir}/fish/vendor_completions.d/hub.fish
install -Dm0644 etc/hub.zsh_completion %{buildroot}%{_datadir}/zsh/site-functions/_hub
%check
#make test
#make test-all
%files
%defattr(-,root,root)
%{_bindir}/hub
%{_mandir}/man1/hub.1.gz
%{_mandir}/man1/hub-*.1.gz
%{_datadir}/bash-completion/completions/hub
%{_datadir}/fish/vendor_completions.d/hub.fish
%{_datadir}/zsh/site-functions/_hub
%changelog