%global app_root %{_datadir}/%{name} %global gem_name hub Summary: A command-line wrapper for git with github shortcuts Name: hub Version: 1.12.0 Release: 1%{?dist} Group: Development/Languages License: MIT URL: http://hub.github.com/ Source0: https://github.com/github/hub/archive/v1.12.0.tar.gz BuildArch: noarch BuildRequires: ruby-devel BuildRequires: rubygems-devel BuildRequires: rubygem(rspec) 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 %prep tar -xzvf %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} %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}-%{version}/ # Remove spurious executable permission chmod -x %{buildroot}%{_defaultdocdir}/%{name}-%{version}/images/*.png %{__install} -d -m 755 %{buildroot}%{_mandir}/man1/ cp -p man/hub.1* %{buildroot}%{_mandir}/man1/. %files %doc LICENSE README.md CONTRIBUTING.md %{_bindir}/hub %{_mandir}/man1/hub.1* %{gem_spec} %{gem_instdir} %{_defaultdocdir}/%{name}-%{version}/ %exclude %{gem_cache} %changelog * Mon Mar 31 2014 Ralph Bean - 1.12.0-1 - Initial packaging for Fedora