]> git.pld-linux.org Git - packages/ruby-netrc.git/blob - ruby-netrc.spec
b5502b8353b575128f6c1fb03637413d236732ce
[packages/ruby-netrc.git] / ruby-netrc.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define gem_name netrc
6 Summary:        Library to read and write netrc files
7 Name:           ruby-%{gem_name}
8 Version:        0.7.7
9 Release:        2
10 License:        MIT
11 Group:          Development/Languages
12 Source0:        http://rubygems.org/gems/%{gem_name}-%{version}.gem
13 # Source0-md5:  1322b2053484eec64992e00c7f71cd69
14 Patch0: https://github.com/glensc/netrc/commit/c4967ef0b3e6a9d4ffd491009e9caccdfb552a02.patch
15 # Patch0-md5:   1f865973c16d590a8be9c6b69282e7dc
16 URL:            https://github.com/geemus/netrc
17 BuildRequires:  rpm-rubyprov
18 BuildRequires:  rpmbuild(macros) >= 1.656
19 %if %{with tests}
20 BuildRequires:  gnupg
21 BuildRequires:  ruby-minitest
22 %endif
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 This library can read and update netrc files, preserving formatting
28 including comments and whitespace.
29
30 %package doc
31 Summary:        Documentation for %{name}
32 Group:          Documentation
33 Requires:       %{name} = %{version}-%{release}
34
35 %description doc
36 Documentation for %{name}
37
38 %prep
39 %setup -q -n %{gem_name}-%{version}
40 %patch0 -p1
41
42 chmod 600 data/newlineless.netrc
43
44 # cleanup backups after patching
45 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
46
47 %build
48 %if %{with tests}
49 testrb -Ilib test
50 %endif
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir}
55 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %files
61 %defattr(644,root,root,755)
62 %doc Readme.md LICENSE changelog.txt
63 %{ruby_vendorlibdir}/netrc.rb
This page took 0.056008 seconds and 2 git commands to generate.