]>
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} | |
492d07f6 | 8 | Version: 2.1.0 |
a42297fb | 9 | Release: 2 |
1e41923d ER |
10 | License: Apache v2.0 |
11 | Group: Development/Languages | |
12 | Source0: http://gems.rubyforge.org/gems/%{pkgname}-%{version}.gem | |
492d07f6 | 13 | # Source0-md5: ca4a97d3f5eeeb09afeb7fb5b884305f |
1e41923d ER |
14 | URL: http://github.com/opscode/mixlib-config |
15 | BuildRequires: rpm-rubyprov | |
f9f2d55b | 16 | BuildRequires: rpmbuild(macros) >= 1.665 |
8c126815 ER |
17 | %if %{with tests} |
18 | BuildRequires: ruby-rspec | |
19 | %endif | |
1e41923d ER |
20 | BuildArch: noarch |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | A class based config mix-in, similar to the one found in Chef. | |
25 | ||
26 | %package doc | |
27 | Summary: Documentation for %{name} | |
28 | Group: Documentation | |
29 | Requires: %{name} = %{version}-%{release} | |
30 | ||
31 | %description doc | |
32 | This package contains documentation for %{name}. | |
33 | ||
34 | %prep | |
35 | %setup -q | |
36 | ||
37 | %build | |
f9f2d55b ER |
38 | %__gem_helper spec |
39 | ||
1e41923d ER |
40 | %if %{with tests} |
41 | rspec | |
42 | %endif | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
f9f2d55b | 46 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}} |
1e41923d | 47 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
f9f2d55b | 48 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
1e41923d ER |
49 | |
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
8c126815 | 55 | %doc README.md NOTICE |
1e41923d | 56 | %{ruby_vendorlibdir}/mixlib/config.rb |
8c126815 | 57 | %{ruby_vendorlibdir}/mixlib/config |
f9f2d55b | 58 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |
1e41923d ER |
59 | |
60 | # FIXME, who owns the dir? | |
61 | %dir %{ruby_vendorlibdir}/mixlib |