]>
Commit | Line | Data |
---|---|---|
03a9b319 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
5 | Summary: Self-contained, easy-setup, fast-start in-memory Chef server for testing and solo setup purposes | |
6 | Name: chef-zero | |
7 | Version: 1.7.2 | |
8 | Release: 0.1 | |
9 | License: Apache v2.0 | |
10 | Group: Development/Languages | |
11 | Source0: http://rubygems.org/downloads/%{name}-%{version}.gem | |
12 | # Source0-md5: 884fb6ca2e75ae515ffec97f1fc77793 | |
13 | URL: https://github.com/opscode/chef-zero | |
14 | BuildRequires: rpm-rubyprov | |
15 | BuildRequires: rpmbuild(macros) >= 1.656 | |
16 | BuildRequires: sed >= 4.0 | |
17 | %if %{with tests} | |
18 | BuildRequires: ruby-rake | |
19 | BuildRequires: ruby-rspec | |
20 | %endif | |
21 | Requires: ruby-hashie < 3 | |
22 | Requires: ruby-hashie >= 2.0 | |
23 | Requires: ruby-json | |
24 | Requires: ruby-mixlib-log < 2 | |
25 | Requires: ruby-mixlib-log >= 1.3 | |
26 | Requires: ruby-moneta < 0.7.0 | |
27 | Requires: ruby-rack | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | Self-contained, easy-setup, fast-start in-memory Chef server for | |
33 | testing and solo setup purposes. | |
34 | ||
35 | %prep | |
36 | %setup -q | |
37 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* | |
38 | ||
39 | %build | |
40 | # write .gemspec | |
41 | %__gem_helper spec | |
42 | ||
43 | %if %{with tests} | |
44 | rspec | |
45 | %endif | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}} | |
50 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
51 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
52 | ||
53 | # install gemspec | |
54 | install -d $RPM_BUILD_ROOT%{ruby_specdir} | |
55 | cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} | |
56 | ||
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
62 | %attr(755,root,root) %{_bindir}/chef-zero | |
63 | %{ruby_vendorlibdir}/chef_zero.rb | |
64 | %{ruby_vendorlibdir}/chef_zero | |
65 | %{ruby_specdir}/%{name}-%{version}.gemspec |