]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with tests # tests [actually not run] | |
4 | ||
5 | %define pkgname diff-lcs | |
6 | Summary: a Ruby port of Algorithm::Diff | |
7 | Summary(pl.UTF-8): Port Algorithm::Diff dla języka Ruby | |
8 | Name: ruby-%{pkgname} | |
9 | Version: 1.3 | |
10 | Release: 2 | |
11 | License: GPL v2+ or MIT or Artistic v2 | |
12 | Group: Development/Libraries | |
13 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem | |
14 | # Source0-md5: 9b1664d1bdf336f4309343c2a640d9e8 | |
15 | URL: http://diff-lcs.rubyforge.org/ | |
16 | BuildRequires: rpm-rubyprov | |
17 | BuildRequires: rpmbuild(macros) >= 1.656 | |
18 | BuildRequires: ruby >= 1:1.8 | |
19 | BuildRequires: ruby-rdoc | |
20 | %if %{with tests} | |
21 | BuildRequires: ruby-hoe < 4 | |
22 | BuildRequires: ruby-hoe >= 3.16 | |
23 | BuildRequires: ruby-hoe-bundler < 2 | |
24 | BuildRequires: ruby-hoe-bundler >= 1.2 | |
25 | BuildRequires: ruby-hoe-doofus < 2 | |
26 | BuildRequires: ruby-hoe-doofus >= 1.0 | |
27 | BuildRequires: ruby-hoe-gemspec2 < 2 | |
28 | BuildRequires: ruby-hoe-gemspec2 >= 1.1 | |
29 | BuildRequires: ruby-hoe-git < 2 | |
30 | BuildRequires: ruby-hoe-git >= 1.6 | |
31 | BuildRequires: ruby-hoe-rubygems < 2 | |
32 | BuildRequires: ruby-hoe-rubygems >= 1.0 | |
33 | BuildRequires: ruby-hoe-travis < 2 | |
34 | BuildRequires: ruby-hoe-travis >= 1.2 | |
35 | BuildRequires: ruby-rake < 12 | |
36 | BuildRequires: ruby-rake >= 10.0 | |
37 | BuildRequires: ruby-rspec < 4 | |
38 | BuildRequires: ruby-rspec >= 2.0 | |
39 | %endif | |
40 | Provides: ruby-Diff-LCS | |
41 | Obsoletes: ruby-Diff-LCS | |
42 | BuildArch: noarch | |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
45 | %description | |
46 | Diff::LCS is a port of Algorithm::Diff that uses the McIlroy-Hunt | |
47 | longest common subsequence (LCS) algorithm to compute intelligent | |
48 | differences between two sequenced enumerable containers. The | |
49 | implementation is based on Mario I. Wolczko's Smalltalk version (1.2, | |
50 | 1993) and Ned Konz's Perl version (Algorithm::Diff). | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | Diff::LCS to port Algorithm::Diff używający algorytmu najdłuższego | |
54 | wspólnego podciągu (LCS - longest common subsequence) McIlroya-Hunta | |
55 | do obliczania inteligentnych różnic między dwoma uporządkowanymi | |
56 | kontenerami. Implementacja jest oparta na wersji dla Smalltalka | |
57 | autorstwa Mario I. Wolczko (1.2 z roku 1993) i wersji dla Perla | |
58 | autorstwa Neda Konza (Algorithm::Diff). | |
59 | ||
60 | %package rdoc | |
61 | Summary: HTML documentation for Ruby Diff::LCS module | |
62 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla modułu języka Ruby Diff::LCS | |
63 | Group: Documentation | |
64 | Requires: ruby >= 1:1.8.7-4 | |
65 | ||
66 | %description rdoc | |
67 | HTML documentation for Ruby Diff::LCS module. | |
68 | ||
69 | %description rdoc -l pl.UTF-8 | |
70 | Dokumentacja w formacie HTML dla modułu języka Ruby Diff::LCS | |
71 | ||
72 | %package ri | |
73 | Summary: ri documentation for Rubty Diff::LCS module | |
74 | Summary(pl.UTF-8): Dokumentacja w formacie ri dla modułu języka Ruby Diff::LCS | |
75 | Group: Documentation | |
76 | Requires: ruby | |
77 | ||
78 | %description ri | |
79 | ri documentation for Rubty Diff::LCS module. | |
80 | ||
81 | %description ri -l pl.UTF-8 | |
82 | Dokumentacja w formacie ri dla modułu języka Ruby Diff::LCS. | |
83 | ||
84 | %package -n htmldiff | |
85 | Summary: Tool to find differences in HTML files | |
86 | Summary(pl.UTF-8): Narzędzie do znajdowania różnic w plikach HTML | |
87 | Group: Applications/Text | |
88 | Requires: ruby-text-format >= 0.64 | |
89 | ||
90 | %description -n htmldiff | |
91 | Tool to find differences in HTML files. | |
92 | ||
93 | %description -n htmldiff -l pl.UTF-8 | |
94 | Narzędzie do znajdowania różnic w plikach HTML. | |
95 | ||
96 | %package ldiff | |
97 | Summary: Ruby Diff tool | |
98 | Summary(pl.UTF-8): Narzędzie Ruby Diff | |
99 | Group: Applications/Text | |
100 | ||
101 | %description ldiff | |
102 | Ruby Diff tool. | |
103 | ||
104 | %description ldiff -l pl.UTF-8 | |
105 | Narzędzie Ruby Diff. | |
106 | ||
107 | %prep | |
108 | %setup -q -n %{pkgname}-%{version} | |
109 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* | |
110 | ||
111 | %build | |
112 | # write .gemspec | |
113 | %__gem_helper spec | |
114 | ||
115 | rdoc --ri --op ri lib | |
116 | rdoc --op rdoc lib | |
117 | %{__rm} -r ri/{Array,String} | |
118 | %{__rm} ri/created.rid | |
119 | %{__rm} ri/cache.ri | |
120 | ||
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | install -d $RPM_BUILD_ROOT{%{_bindir},%{ruby_vendorlibdir},%{ruby_specdir},%{ruby_ridir},%{ruby_rdocdir}} | |
124 | install -p bin/* $RPM_BUILD_ROOT%{_bindir} | |
125 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
126 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} | |
127 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} | |
128 | ||
129 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} | |
130 | ||
131 | %clean | |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | ||
134 | %files | |
135 | %defattr(644,root,root,755) | |
136 | %doc History.md License.md README.rdoc | |
137 | %dir %{ruby_vendorlibdir}/diff | |
138 | %{ruby_vendorlibdir}/diff-lcs.rb | |
139 | %{ruby_vendorlibdir}/diff/lcs.rb | |
140 | %{ruby_vendorlibdir}/diff/lcs | |
141 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec | |
142 | ||
143 | %files rdoc | |
144 | %defattr(644,root,root,755) | |
145 | %{ruby_rdocdir}/%{name}-%{version} | |
146 | ||
147 | %files ri | |
148 | %defattr(644,root,root,755) | |
149 | %{ruby_ridir}/Diff | |
150 | ||
151 | %files -n htmldiff | |
152 | %defattr(644,root,root,755) | |
153 | %attr(755,root,root) %{_bindir}/htmldiff | |
154 | ||
155 | %files ldiff | |
156 | %defattr(644,root,root,755) | |
157 | %attr(755,root,root) %{_bindir}/ldiff |