]>
Commit | Line | Data |
---|---|---|
7536636c ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
efa408c4 ER |
5 | %define pkgname mixlib-log |
6 | Summary: Ruby mix-in for log functionality | |
7 | Name: ruby-%{pkgname} | |
e3b97c6f | 8 | Version: 1.6.0 |
bef5b95f | 9 | Release: 4 |
efa408c4 ER |
10 | License: Apache v2.0 |
11 | Group: Development/Languages | |
e3b97c6f ER |
12 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem |
13 | # Source0-md5: 98bafe9409a72fd24782d77794b5adf5 | |
7536636c | 14 | URL: http://github.com/opscode/mixlib-log |
efa408c4 | 15 | BuildRequires: rpm-rubyprov |
7536636c | 16 | BuildRequires: rpmbuild(macros) >= 1.665 |
e3b97c6f ER |
17 | %if %{with tests} |
18 | BuildRequires: ruby-cucumber | |
19 | BuildRequires: ruby-rake | |
20 | BuildRequires: ruby-rspec < 3 | |
21 | BuildRequires: ruby-rspec >= 2.10 | |
22 | %endif | |
efa408c4 ER |
23 | BuildArch: noarch |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | A gem that provides a simple mix-in for log functionality. | |
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 | ||
7536636c ER |
40 | %build |
41 | %__gem_helper spec | |
42 | ||
efa408c4 ER |
43 | %if %{with tests} |
44 | # need RSpec2 | |
45 | rspec | |
46 | %endif | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
7536636c | 50 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}} |
efa408c4 | 51 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
7536636c | 52 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
efa408c4 ER |
53 | |
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %files | |
58 | %defattr(644,root,root,755) | |
59 | %doc README.rdoc NOTICE | |
60 | %{ruby_vendorlibdir}/mixlib/log.rb | |
61 | %{ruby_vendorlibdir}/mixlib/log | |
7536636c | 62 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |
efa408c4 ER |
63 | |
64 | # FIXME, who owns the dir? | |
65 | %dir %{ruby_vendorlibdir}/mixlib | |
66 | ||
67 | %if 0 | |
68 | %files doc | |
69 | %defattr(644,root,root,755) | |
70 | %endif |