3 %bcond_without tests # build without tests
5 Summary: Generate rpm specfiles from gems
10 Group: Development/Languages
11 Source0: https://github.com/lutter/gem2rpm/archive/v%{version}.tar.gz
12 # Source0-md5: 133c4cae2e26c24a5db0453e2cbe2a72
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
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Generate source rpms and rpm spec files from a Ruby Gem. The spec file
30 tries to follow the gem as closely as possible, and be compliant with
31 the Fedora rubygem packaging guidelines
34 Summary: Documentation for %{name}
36 Requires: %{name} = %{version}-%{release}
39 Documentation for %{name}.
46 cp -p %{SOURCE2} templates
48 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
52 # tests need UTF-8 locale
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{_bindir}}
61 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
62 cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
64 install -d $RPM_BUILD_ROOT%{_datadir}/ruby/templates
65 cp -a templates/* $RPM_BUILD_ROOT%{_datadir}/ruby/templates
68 rm -rf $RPM_BUILD_ROOT
71 %defattr(644,root,root,755)
73 %attr(755,root,root) %{_bindir}/gem2rpm
74 %{ruby_rubylibdir}/gem2rpm.rb
75 %{ruby_rubylibdir}/gem2rpm
76 %{_datadir}/ruby/templates