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