]> git.pld-linux.org Git - SPECS.git/blob - ruby-thor.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ruby-thor.spec
1 %define         pkgname thor
2 Summary:        A scripting framework that replaces rake, sake and rubigen
3 Summary(pl.UTF-8):      Szkielet skryptowy zastępujący rake, sake i rubigen
4 Name:           ruby-%{pkgname}
5 Version:        0.20.0
6 Release:        2
7 License:        MIT
8 #Source0:       http://rubygems.org/downloads/%{pkgname}-%{version}.gem
9 Source0:        https://github.com/erikhuda/thor/archive/v%{version}/%{pkgname}-%{version}.tar.gz
10 # Source0-md5:  2ae540058dcefcee5afef33ed1a66538
11 Group:          Development/Languages
12 URL:            http://whatisthor.com/
13 BuildRequires:  rpm-rubyprov
14 BuildRequires:  rpmbuild(macros) >= 1.665
15 BuildRequires:  sed >= 4.0
16 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
17 BuildRequires:  glibc-localedb-all
18 %endif
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 A scripting framework that replaces rake, sake and rubigen.
24
25 %description -l pl.UTF-8
26 Szkielet skryptowy zastępujący rake, sake i rubigen.
27
28 %package rdoc
29 Summary:        HTML documentation for %{pkgname}
30 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu thor
31 Group:          Documentation
32 Requires:       ruby >= 1:1.8.7-4
33
34 %description rdoc
35 HTML documentation for %{pkgname}.
36
37 %description rdoc -l pl.UTF-8
38 Dokumentacja w formacie HTML dla pakietu thor.
39
40 %package ri
41 Summary:        ri documentation for Ruby thor module
42 Summary(pl.UTF-8):      Dokumentacja w formacie ri dla modułu thor języka Ruby
43 Group:          Documentation
44 Requires:       ruby
45
46 %description ri
47 ri documentation for Ruby thor module.
48
49 %description ri -l pl.UTF-8
50 Dokumentacja w formacie ri dla modułu thor języka Ruby.
51
52 %prep
53 %setup -q -n %{pkgname}-%{version}
54 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
55
56 %build
57 # make gemspec self-contained
58 ruby -r rubygems -e 'spec = eval(File.read("thor.gemspec"))
59         File.open("thor-%{version}.gemspec", "w") do |file|
60                 file.puts spec.to_ruby_for_cache
61         end'
62
63 # UTF8 locale needed for doc generation
64 export LC_ALL=C.UTF-8
65 rdoc --ri --op ri lib
66 rdoc --op rdoc lib
67 %{__rm} ri/created.rid
68 %{__rm} ri/cache.ri
69 # foreign docs
70 %{__rm} -r ri/Object
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir},%{_bindir}}
75 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
76 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
77 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
78 cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
79
80 install -d $RPM_BUILD_ROOT%{ruby_specdir}
81 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}/%{pkgname}-%{version}.gemspec
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %files
87 %defattr(644,root,root,755)
88 %doc CHANGELOG.md README.md LICENSE.md
89 %attr(755,root,root) %{_bindir}/thor
90 %{ruby_vendorlibdir}/%{pkgname}.rb
91 %{ruby_vendorlibdir}/%{pkgname}
92 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
93
94 %files rdoc
95 %defattr(644,root,root,755)
96 %{ruby_rdocdir}/%{name}-%{version}
97
98 %files ri
99 %defattr(644,root,root,755)
100 %{ruby_ridir}/Thor
This page took 0.994519 seconds and 3 git commands to generate.