]>
Commit | Line | Data |
---|---|---|
f9f2d55b ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
1e41923d ER |
5 | %define pkgname mixlib-config |
6 | Summary: Simple ruby config mix-in | |
7 | Name: ruby-%{pkgname} | |
8c126815 | 8 | Version: 2.0.0 |
c6a96222 | 9 | Release: 1 |
1e41923d ER |
10 | License: Apache v2.0 |
11 | Group: Development/Languages | |
12 | Source0: http://gems.rubyforge.org/gems/%{pkgname}-%{version}.gem | |
8c126815 | 13 | # Source0-md5: 95a69a41f70d5f0c64a93bbc982df7a9 |
1e41923d ER |
14 | # Silence verbose test output. Fixed upstream in master but not yet released |
15 | # https://github.com/opscode/mixlib-config/commit/fa42def234f3a2d69229340733131b93a887be8d | |
16 | Patch0: mixlib-config-silence-tests.patch | |
17 | URL: http://github.com/opscode/mixlib-config | |
18 | BuildRequires: rpm-rubyprov | |
f9f2d55b | 19 | BuildRequires: rpmbuild(macros) >= 1.665 |
8c126815 ER |
20 | %if %{with tests} |
21 | BuildRequires: ruby-rspec | |
22 | %endif | |
1e41923d ER |
23 | BuildArch: noarch |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | A class based config mix-in, similar to the one found in Chef. | |
28 | ||
29 | %package doc | |
30 | Summary: Documentation for %{name} | |
31 | Group: Documentation | |
32 | Requires: %{name} = %{version}-%{release} | |
33 | ||
34 | %description doc | |
35 | This package contains documentation for %{name}. | |
36 | ||
37 | %prep | |
38 | %setup -q | |
39 | ||
40 | %build | |
f9f2d55b ER |
41 | %__gem_helper spec |
42 | ||
1e41923d ER |
43 | %if %{with tests} |
44 | rspec | |
45 | %endif | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
f9f2d55b | 49 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}} |
1e41923d | 50 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
f9f2d55b | 51 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
1e41923d ER |
52 | |
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %files | |
57 | %defattr(644,root,root,755) | |
8c126815 | 58 | %doc README.md NOTICE |
1e41923d | 59 | %{ruby_vendorlibdir}/mixlib/config.rb |
8c126815 | 60 | %{ruby_vendorlibdir}/mixlib/config |
f9f2d55b | 61 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |
1e41923d ER |
62 | |
63 | # FIXME, who owns the dir? | |
64 | %dir %{ruby_vendorlibdir}/mixlib |