]> git.pld-linux.org Git - packages/ruby-slop.git/blob - ruby-slop.spec
b4c355e16ecbe84c92b95687b9fccdf33e2a2a8d
[packages/ruby-slop.git] / ruby-slop.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 %define pkgname slop
6 Summary:        Option gathering made easy
7 Name:           ruby-%{pkgname}
8 Version:        3.4.3
9 Release:        1
10 License:        GPL v2+ or Ruby
11 Group:          Development/Languages
12 Source0:        http://rubygems.org/downloads/%{pkgname}-%{version}.gem
13 # Source0-md5:  -
14 URL:            http://github.com/injekt/slop
15 BuildRequires:  rpm-rubyprov
16 BuildRequires:  rpmbuild(macros) >= 1.656
17 BuildRequires:  sed >= 4.0
18 %if %{with tests}
19 BuildRequires:  ruby-minitest
20 BuildRequires:  ruby-rake
21 %endif
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 A simple DSL for gathering options and parsing the command line.
27
28 %package doc
29 Summary:        Documentation for %{name}
30 Group:          Documentation
31 Requires:       %{name} = %{version}-%{release}
32
33 %description doc
34 Documentation for %{name}.
35
36 %prep
37 %setup -q -n %{pkgname}-%{version}
38
39 %build
40 %if %{with tests}
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
43 testrb test/*_test.rb
44 %endif
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir}
49 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %files
55 %defattr(644,root,root,755)
56 %doc README.md CHANGES.md LICENSE
57 %{ruby_vendorlibdir}/slop.rb
58 %{ruby_vendorlibdir}/slop
This page took 0.051118 seconds and 2 git commands to generate.