]>
Commit | Line | Data |
---|---|---|
2657f333 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
5 | %define pkgname childprocess | |
0ae67ce7 | 6 | Summary: A simple and reliable gem for controlling external programs |
2657f333 | 7 | Name: ruby-%{pkgname} |
39901cfd | 8 | Version: 0.5.0 |
5dc1cd9c | 9 | Release: 4 |
0ae67ce7 ER |
10 | License: MIT |
11 | Group: Development/Languages | |
2657f333 | 12 | Source0: http://rubygems.org/gems/%{pkgname}-%{version}.gem |
39901cfd | 13 | # Source0-md5: 195ada0b8ac5264be9b3df3416f3462a |
0ae67ce7 ER |
14 | URL: http://github.com/jarib/childprocess |
15 | BuildRequires: rpm-rubyprov | |
2657f333 ER |
16 | BuildRequires: rpmbuild(macros) >= 1.665 |
17 | %if %{with tests} | |
18 | BuildRequires: ruby-rake < 0.10 | |
19 | BuildRequires: ruby-rake >= 0.9.2 | |
20 | BuildRequires: ruby-rspec >= 2.0.0 | |
21 | BuildRequires: ruby-yard | |
22 | %endif | |
0ae67ce7 | 23 | Requires: ruby-ffi < 2 |
757fb06e | 24 | Requires: ruby-ffi >= 1.0.11 |
0ae67ce7 ER |
25 | BuildArch: noarch |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | This gem aims at being a simple and reliable solution for controlling | |
30 | external programs running in the background on any Ruby / OS | |
31 | combination. | |
32 | ||
33 | %package doc | |
34 | Summary: Documentation for %{name} | |
35 | Group: Documentation | |
36 | Requires: %{name} = %{version}-%{release} | |
37 | ||
38 | %description doc | |
2657f333 | 39 | Documentation for %{name}. |
0ae67ce7 ER |
40 | |
41 | %prep | |
2657f333 | 42 | %setup -q -n %{pkgname}-%{version} |
0ae67ce7 | 43 | |
5dc1cd9c ER |
44 | rm lib/childprocess/windows.rb |
45 | rm -r lib/childprocess/windows | |
46 | rm lib/childprocess/unix/platform/*-solaris.rb | |
47 | rm lib/childprocess/unix/platform/*-macosx.rb | |
48 | ||
0ae67ce7 | 49 | %build |
2657f333 ER |
50 | %__gem_helper spec |
51 | ||
0ae67ce7 ER |
52 | %if %{with tests} |
53 | rspec spec | |
54 | %endif | |
55 | ||
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
2657f333 | 58 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}} |
0ae67ce7 | 59 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
2657f333 | 60 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
0ae67ce7 ER |
61 | |
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %doc README.md LICENSE | |
2657f333 ER |
68 | %{ruby_vendorlibdir}/%{pkgname}.rb |
69 | %{ruby_vendorlibdir}/%{pkgname} | |
70 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |