]> git.pld-linux.org Git - packages/gem2rpm.git/blame - gem2rpm.spec
up to 0.11.1
[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
b4f912cc
ER
7Version: 0.11.1
8Release: 1
f0d3c1e6
ER
9License: GPL v2+
10Group: Development/Languages
26fbd092 11Source0: https://github.com/fedora-ruby/gem2rpm/archive/v%{version}/%{name}-%{version}.tar.gz
b4f912cc 12# Source0-md5: b1b60ade93fd61c22c17cfe4b95c3609
7d625e4e 13Source2: pld.spec.erb
f51775da 14Patch0: gems.patch
bf1dd385 15Patch2: style.patch
26fbd092 16URL: https://github.com/fedora-ruby/gem2rpm
e8e50a98
ER
17BuildRequires: rpm-rubyprov
18BuildRequires: rpmbuild(macros) >= 1.656
749a1624
ER
19%if %{with tests}
20%if %(locale -a | grep -q '^en_US$'; echo $?)
21BuildRequires: glibc-localedb-all
22%endif
23%endif
624d0b83 24Requires: ruby-rubygems
f0d3c1e6
ER
25BuildArch: noarch
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29Generate source rpms and rpm spec files from a Ruby Gem. The spec file
30tries to follow the gem as closely as possible, and be compliant with
31the Fedora rubygem packaging guidelines
32
33%package doc
34Summary: Documentation for %{name}
35Group: Documentation
36Requires: %{name} = %{version}-%{release}
37
38%description doc
39Documentation for %{name}.
40
41%prep
e8e50a98 42%setup -q
b59b10ce 43%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
f51775da 44%patch0 -p1
bf1dd385 45%patch2 -p1
7d625e4e 46cp -p %{SOURCE2} templates
f0d3c1e6 47
b59b10ce
ER
48# cleanup backups after patching
49find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
b978c369 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
575f7dc5 60install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}}
f0d3c1e6
ER
61
62cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
575f7dc5 63cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
f0d3c1e6 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)
b4f912cc 73%doc README.md AUTHORS
f0d3c1e6 74%attr(755,root,root) %{_bindir}/gem2rpm
575f7dc5
ER
75%{ruby_vendorlibdir}/gem2rpm.rb
76%{ruby_vendorlibdir}/gem2rpm
c2e552c8 77%{_datadir}/ruby/templates
This page took 0.071626 seconds and 4 git commands to generate.