3 %bcond_with tests # build without tests
6 Summary: Option gathering made easy
10 License: GPL v2+ or Ruby
11 Group: Development/Languages
12 Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem
14 URL: http://github.com/injekt/slop
15 BuildRequires: rpm-rubyprov
16 BuildRequires: rpmbuild(macros) >= 1.656
17 BuildRequires: sed >= 4.0
19 BuildRequires: ruby-minitest
20 BuildRequires: ruby-rake
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 A simple DSL for gathering options and parsing the command line.
29 Summary: Documentation for %{name}
31 Requires: %{name} = %{version}-%{release}
34 Documentation for %{name}.
37 %setup -q -n %{pkgname}-%{version}
41 # if running via testrb, modify the check for invoked testing binary
42 sed -i 's|Usage: rake_test_loader \[options\]|Usage: testrb: SlopTest#test_printing_help_with__help____true [options]|' test/slop_test.rb
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir}
49 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
52 rm -rf $RPM_BUILD_ROOT
55 %defattr(644,root,root,755)
56 %doc README.md CHANGES.md LICENSE
57 %{ruby_vendorlibdir}/slop.rb
58 %{ruby_vendorlibdir}/slop