]> git.pld-linux.org Git - packages/ruby-mixlib-shellout.git/blob - ruby-mixlib-shellout.spec
e6f41cb03375e8b960071a04115024a31f466a89
[packages/ruby-mixlib-shellout.git] / ruby-mixlib-shellout.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %if 0
6 # Tests for this package are not in the gem. To update:
7 V=1.4.0
8 git clone https://github.com/opscode/mixlib-shellout.git
9 GIT_DIR=mixlib-shellout/.git git fetch origin tag $V
10 GIT_DIR=mixlib-shellout/.git git archive $V spec/ | bzip2 -9 > mixlib-shellout-specs-$V.tar.bz2
11 ./dropin mixlib-shellout-specs-$V.tar.bz2 &
12 %endif
13
14 %define pkgname mixlib-shellout
15 Summary:        Run external commands on Unix or Windows
16 Name:           ruby-%{pkgname}
17 Version:        1.4.0
18 Release:        2
19 License:        Apache v2.0
20 Group:          Development/Languages
21 Source0:        http://rubygems.org/gems/%{pkgname}-%{version}.gem
22 # Source0-md5:  1f5d0e776ef20332634f31ada8022d66
23 Source1:        %{pkgname}-specs-%{version}.tar.bz2
24 # Source1-md5:  e1c9c7aefba7f9db112e903f7b2f8824
25 URL:            https://github.com/opscode/mixlib-shellout
26 BuildRequires:  rpm-rubyprov
27 BuildRequires:  rpmbuild(macros) >= 1.656
28 BuildRequires:  ruby-rubygems
29 %if %{with tests}
30 BuildRequires:  ruby-rspec < 3
31 BuildRequires:  ruby-rspec >= 2.0
32 %endif
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 Run external commands on Unix or Windows
38
39 %package doc
40 Summary:        Documentation for %{name}
41 Group:          Documentation
42 Requires:       %{name} = %{version}-%{release}
43
44 %description doc
45 Documentation for %{name}
46
47 %prep
48 %setup -q -n %{pkgname}-%{version} -a1
49
50 %build
51 %__gem_helper spec
52
53 %if %{with tests}
54 # One of the tests involves a fork && sleep 10 that may not finish before mock
55 rspec
56 sleep 10
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}}
62 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
63 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
69 %defattr(644,root,root,755)
70 %doc README.md LICENSE
71 %{ruby_vendorlibdir}/mixlib/shellout.rb
72 %{ruby_vendorlibdir}/mixlib/shellout
73 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
This page took 0.130423 seconds and 2 git commands to generate.