3 %bcond_without tests # build without tests
6 # Tests for this package are not in the gem. To update:
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 &
14 %define pkgname mixlib-shellout
15 Summary: Run external commands on Unix or Windows
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
30 BuildRequires: ruby-rspec < 3
31 BuildRequires: ruby-rspec >= 2.0
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Run external commands on Unix or Windows
40 Summary: Documentation for %{name}
42 Requires: %{name} = %{version}-%{release}
45 Documentation for %{name}
48 %setup -q -n %{pkgname}-%{version} -a1
54 # One of the tests involves a fork && sleep 10 that may not finish before mock
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}
66 rm -rf $RPM_BUILD_ROOT
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