]> git.pld-linux.org Git - packages/gem2rpm.git/blame - gem2rpm.spec
disable tests, they require networking to fetch gem specs
[packages/gem2rpm.git] / gem2rpm.spec
CommitLineData
749a1624
ER
1#
2# Conditional build:
48ec4e40 3%bcond_with tests # tests require networking
749a1624 4
f0d3c1e6 5Summary: Generate rpm specfiles from gems
e8e50a98 6Name: gem2rpm
a0c08b44 7Version: 0.9.2
624d0b83 8Release: 3
f0d3c1e6
ER
9License: GPL v2+
10Group: Development/Languages
749a1624
ER
11Source0: https://github.com/lutter/gem2rpm/archive/v%{version}.tar.gz
12# Source0-md5: 133c4cae2e26c24a5db0453e2cbe2a72
7d625e4e 13Source2: pld.spec.erb
f51775da 14Patch0: gems.patch
7d625e4e 15Patch1: pld.patch
bf1dd385 16Patch2: style.patch
e8e50a98
ER
17URL: https://github.com/lutter/gem2rpm/
18BuildRequires: rpm-rubyprov
19BuildRequires: rpmbuild(macros) >= 1.656
749a1624
ER
20%if %{with tests}
21%if %(locale -a | grep -q '^en_US$'; echo $?)
22BuildRequires: glibc-localedb-all
23%endif
24%endif
624d0b83 25Requires: ruby-rubygems
f0d3c1e6
ER
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
e8e50a98 43%setup -q
f51775da 44%patch0 -p1
7d625e4e 45%patch1 -p1
bf1dd385 46%patch2 -p1
7d625e4e 47cp -p %{SOURCE2} templates
f0d3c1e6 48
b978c369
ER
49%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
50
f0d3c1e6
ER
51%build
52%if %{with tests}
749a1624
ER
53# tests need UTF-8 locale
54LC_ALL=en_US.UTF-8 \
f0d3c1e6
ER
55testrb -Itest test/
56%endif
57
58%install
59rm -rf $RPM_BUILD_ROOT
60install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{_bindir}}
61
62cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
63cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
64
c2e552c8
ER
65install -d $RPM_BUILD_ROOT%{_datadir}/ruby/templates
66cp -a templates/* $RPM_BUILD_ROOT%{_datadir}/ruby/templates
67
f0d3c1e6
ER
68%clean
69rm -rf $RPM_BUILD_ROOT
70
71%files
72%defattr(644,root,root,755)
73%doc README AUTHORS
74%attr(755,root,root) %{_bindir}/gem2rpm
75%{ruby_rubylibdir}/gem2rpm.rb
76%{ruby_rubylibdir}/gem2rpm
c2e552c8 77%{_datadir}/ruby/templates
This page took 0.069358 seconds and 4 git commands to generate.