3 %bcond_with tests # tests require networking
5 Summary: Generate rpm specfiles from gems
10 Group: Development/Languages
11 Source0: https://github.com/lutter/gem2rpm/archive/v%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5: a22be828b4aeff0387a735daae969c5c
17 URL: https://github.com/lutter/gem2rpm/
18 BuildRequires: rpm-rubyprov
19 BuildRequires: rpmbuild(macros) >= 1.656
21 %if %(locale -a | grep -q '^en_US$'; echo $?)
22 BuildRequires: glibc-localedb-all
25 Requires: ruby-rubygems
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Generate source rpms and rpm spec files from a Ruby Gem. The spec file
31 tries to follow the gem as closely as possible, and be compliant with
32 the Fedora rubygem packaging guidelines
35 Summary: Documentation for %{name}
37 Requires: %{name} = %{version}-%{release}
40 Documentation for %{name}.
44 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
48 cp -p %{SOURCE2} templates
50 # cleanup backups after patching
51 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
55 # tests need UTF-8 locale
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{_bindir}}
64 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
65 cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
67 install -d $RPM_BUILD_ROOT%{_datadir}/ruby/templates
68 cp -a templates/* $RPM_BUILD_ROOT%{_datadir}/ruby/templates
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
76 %attr(755,root,root) %{_bindir}/gem2rpm
77 %{ruby_rubylibdir}/gem2rpm.rb
78 %{ruby_rubylibdir}/gem2rpm
79 %{_datadir}/ruby/templates