]>
Commit | Line | Data |
---|---|---|
238af4ba ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
e6cc7344 | 5 | %define pkgname net-scp |
199c6f54 | 6 | Summary: A pure Ruby implementation of the SCP client protocol |
e6cc7344 | 7 | Name: ruby-%{pkgname} |
909ed46e | 8 | Version: 1.1.0 |
2b48db9f | 9 | Release: 3 |
199c6f54 ER |
10 | License: MIT |
11 | Group: Development/Languages | |
e6cc7344 | 12 | Source0: http://rubygems.org/gems/%{pkgname}-%{version}.gem |
909ed46e ER |
13 | # Source0-md5: a7d4ae6a696222a2f4af9fe89bd44886 |
14 | URL: http://rubygems.org/gems/net-scp | |
199c6f54 | 15 | BuildRequires: rpm-rubyprov |
e6cc7344 | 16 | BuildRequires: rpmbuild(macros) >= 1.665 |
199c6f54 | 17 | %if %{with tests} |
199c6f54 | 18 | BuildRequires: ruby-mocha |
909ed46e ER |
19 | BuildRequires: ruby-net-ssh >= 2.6.5 |
20 | BuildRequires: ruby-test-unit | |
199c6f54 | 21 | %endif |
909ed46e | 22 | Requires: ruby-net-ssh >= 2.6.5 |
199c6f54 ER |
23 | BuildArch: noarch |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | A pure Ruby implementation of the SCP client protocol | |
28 | ||
29 | %package doc | |
30 | Summary: Documentation for %{name} | |
31 | Group: Documentation | |
32 | Requires: %{name} = %{version}-%{release} | |
33 | ||
34 | %description doc | |
35 | Documentation for %{name} | |
36 | ||
37 | %prep | |
e6cc7344 | 38 | %setup -q -n %{pkgname}-%{version} |
199c6f54 ER |
39 | |
40 | %build | |
e6cc7344 ER |
41 | # write .gemspec |
42 | %__gem_helper spec | |
43 | ||
199c6f54 ER |
44 | %if %{with tests} |
45 | ruby -Itest test/test_all.rb | |
46 | %endif | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
e6cc7344 | 50 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}} |
199c6f54 | 51 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
e6cc7344 | 52 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
199c6f54 ER |
53 | |
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %files | |
58 | %defattr(644,root,root,755) | |
909ed46e | 59 | %doc README.rdoc CHANGES.txt LICENSE.txt |
199c6f54 ER |
60 | %dir %{ruby_vendorlibdir}/net |
61 | %{ruby_vendorlibdir}/net/scp.rb | |
62 | %{ruby_vendorlibdir}/net/scp/ | |
63 | %dir %{ruby_vendorlibdir}/uri | |
64 | %{ruby_vendorlibdir}/uri/open-scp.rb | |
65 | %{ruby_vendorlibdir}/uri/scp.rb | |
e6cc7344 | 66 | %{ruby_specdir}/net-scp-%{version}.gemspec |
199c6f54 ER |
67 | |
68 | %if 0 | |
69 | %files doc | |
70 | %defattr(644,root,root,755) | |
71 | %endif |