From b642ca8058ea5ca8cd44ba32fe4045a59818f820 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: May 28 2014 17:53:47 +0000 Subject: Initial commit (#1083344) --- diff --git a/.gitignore b/.gitignore index e69de29..827bdea 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/hub-635646f7f39c7747f9cb06cf15c3c0c37520706b.tar.gz diff --git a/hub.spec b/hub.spec new file mode 100644 index 0000000..9e3f4e3 --- /dev/null +++ b/hub.spec @@ -0,0 +1,116 @@ +%global app_root %{_datadir}/%{name} +%global gem_name hub + +# https://fedoraproject.org/wiki/Packaging:SourceURL#Github +# For a number of reasons (immutability, availability, uniqueness), you must +# use the full commit revision hash when referring to the sources. +%global commit 635646f7f39c7747f9cb06cf15c3c0c37520706b +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Summary: A command-line wrapper for git with github shortcuts +Name: hub +Version: 1.12.0 +Release: 4%{?dist} +Group: Development/Languages +License: MIT +URL: http://hub.github.com/ + +# https://fedoraproject.org/wiki/Packaging:SourceURL#Github +# Keep in mind that github tarballs are generated on-demand, so their +# modification dates will vary and cause checksum tests to fail. Reviewers will +# need to use diff -r to verify the tarballs. +Source0: https://github.com/github/hub/archive/%{commit}/hub-%{commit}.tar.gz + +BuildArch: noarch + +BuildRequires: ruby-devel +BuildRequires: rubygems-devel +BuildRequires: rubygem(rspec) + +## For the test suite. +#BuildRequires: rubygem-minitest +#BuildRequires: rubygem-webmock +#BuildRequires: rubygem-bundler +#BuildRequires: rubygem-rake>=10.1.1 +#BuildRequires: rubygem-cucumber +#BuildRequires: tmux +#BuildRequires: zsh + +Requires: ruby(rubygems) +Requires: ruby(release) + +%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. + + $ hub clone rtomayko/tilt + + # expands to: + $ git clone git://github.com/rtomayko/tilt.git + +%package doc +Summary: API documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} + +%description doc +Documentation for %{name} generated by rdoc. + +%prep +%setup -qn %{name}-%{commit} + +%build +gem build %{gem_name}.gemspec +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/ +rm -rf %{buildroot}%{gem_dir}/doc/ + +mkdir -p %{buildroot}%{_bindir} +cp -a ./%{_bindir}/hub %{buildroot}%{_bindir}/hub + +rdoc --op %{buildroot}%{_defaultdocdir}/%{name}/ +# But then, it gets installed twice in that directory; remove the nested one. +rm -rf %{buildroot}%{_defaultdocdir}/%{name}/usr/ + +# Remove spurious executable permission +chmod -x %{buildroot}%{_defaultdocdir}/%{name}/images/*.png + +install -d -m 755 %{buildroot}%{_mandir}/man1/ +cp -p man/hub.1 %{buildroot}%{_mandir}/man1/. + +# Tests are commented out for now since they require rubygem-rake>=10.1.1 which +# isn't available in rawhide yet. +#%%check +#./script/test + +%files +%doc LICENSE README.md CONTRIBUTING.md +%{_bindir}/hub +%{_mandir}/man1/hub.1.gz +%{gem_spec} +%{gem_instdir} +%exclude %{gem_cache} + +%files doc +%{_defaultdocdir}/%{name}/ + +%changelog +* Thu May 22 2014 Ralph Bean - 1.12.0-4 +- Add -doc subpackage with rdoc product. +- Add check section, but left it commented out due to dep issues. +- Remove spurious man files. +- Remove weirdly nested docs from rdoc. + +* Wed Apr 02 2014 Ralph Bean - 1.12.0-3 +- Update Source0 URL to use the github guidelines. +- Replace weird %%prep %%setup stuff with something more familiar. + +* Wed Apr 02 2014 Ralph Bean - 1.12.0-2 +- Remove version from the doc directory. +- Replace install macro with just "install". + +* Mon Mar 31 2014 Ralph Bean - 1.12.0-1 +- Initial packaging for Fedora diff --git a/sources b/sources index e69de29..fcb81ec 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +e33fee7e215a00938b26541fd9b21b61 hub-635646f7f39c7747f9cb06cf15c3c0c37520706b.tar.gz