]> git.pld-linux.org Git - packages/gem2rpm.git/blame_incremental - gem2rpm.spec
verbose rake
[packages/gem2rpm.git] / gem2rpm.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_with tests # tests require minitest >= 5.0
4
5Summary: Generate rpm specfiles from gems
6Name: gem2rpm
7Version: 0.11.3
8Release: 1
9License: GPL v2+
10Group: Development/Languages
11Source0: https://github.com/fedora-ruby/gem2rpm/archive/v%{version}/%{name}-%{version}.tar.gz
12# Source0-md5: 5d81c9a3a9849f905819781fb61f86aa
13Source2: pld.spec.erb
14Patch0: gems.patch
15Patch1: os-release-quotes.patch
16Patch2: style.patch
17URL: https://github.com/fedora-ruby/gem2rpm
18BuildRequires: rpm-rubyprov
19BuildRequires: rpmbuild(macros) >= 1.656
20%if %{with tests}
21BuildRequires: ruby-minitest >= 5.0
22BuildRequires: ruby-rake
23%endif
24Requires: pld-release
25Requires: ruby-rubygems
26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30Generate source rpms and rpm spec files from a Ruby Gem. The spec file
31tries to follow the gem as closely as possible, and be compliant with
32the Fedora rubygem packaging guidelines
33
34%package doc
35Summary: Documentation for %{name}
36Group: Documentation
37Requires: %{name} = %{version}-%{release}
38
39%description doc
40Documentation for %{name}.
41
42%prep
43%setup -q
44%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
45%patch0 -p1
46%patch1 -p1
47%patch2 -p1
48cp -p %{SOURCE2} templates
49
50# cleanup backups after patching
51find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
52
53%build
54%if %{with tests}
55rake TESTOPTS='-v' test
56%endif
57
58%install
59rm -rf $RPM_BUILD_ROOT
60install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}}
61
62cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
63cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
64
65install -d $RPM_BUILD_ROOT%{_datadir}/ruby/templates
66cp -a templates/* $RPM_BUILD_ROOT%{_datadir}/ruby/templates
67
68%clean
69rm -rf $RPM_BUILD_ROOT
70
71%files
72%defattr(644,root,root,755)
73%doc README.md AUTHORS
74%attr(755,root,root) %{_bindir}/gem2rpm
75%{ruby_vendorlibdir}/gem2rpm.rb
76%{ruby_vendorlibdir}/gem2rpm
77%{_datadir}/ruby/templates
This page took 0.023742 seconds and 4 git commands to generate.