]>
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} |
09950891 JB |
9 | Version: 1.3 |
10 | Release: 1 | |
11 | License: GPL v2+ or MIT or Artistic v2 | |
5f0081fd | 12 | Group: Development/Libraries |
0003e579 | 13 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem |
09950891 | 14 | # Source0-md5: 9b1664d1bdf336f4309343c2a640d9e8 |
9d042803 | 15 | URL: http://diff-lcs.rubyforge.org/ |
ab2c93af ER |
16 | BuildRequires: rpm-rubyprov |
17 | BuildRequires: rpmbuild(macros) >= 1.656 | |
09950891 JB |
18 | BuildRequires: ruby >= 1:1.8 |
19 | BuildRequires: ruby-rdoc | |
89f4b6f3 ER |
20 | %if %{with tests} |
21 | BuildRequires: ruby-hoe < 4 | |
09950891 | 22 | BuildRequires: ruby-hoe >= 3.16 |
89f4b6f3 ER |
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 | |
09950891 | 30 | BuildRequires: ruby-hoe-git >= 1.6 |
89f4b6f3 ER |
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 | |
09950891 | 35 | BuildRequires: ruby-rake < 12 |
89f4b6f3 | 36 | BuildRequires: ruby-rake >= 10.0 |
09950891 | 37 | BuildRequires: ruby-rspec < 4 |
89f4b6f3 | 38 | BuildRequires: ruby-rspec >= 2.0 |
89f4b6f3 | 39 | %endif |
31bb25c7 | 40 | Provides: ruby-Diff-LCS |
ab2c93af ER |
41 | Obsoletes: ruby-Diff-LCS |
42 | BuildArch: noarch | |
5f0081fd | 43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
45 | %description | |
01a14220 JB |
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, | |
cf3bf93f | 50 | 1993) and Ned Konz's Perl version (Algorithm::Diff). |
01a14220 | 51 | |
134b4604 JR |
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 | |
01a14220 JB |
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). | |
5f0081fd | 59 | |
0003e579 | 60 | %package rdoc |
160d33a5 JB |
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 | |
0003e579 JR |
63 | Group: Documentation |
64 | Requires: ruby >= 1:1.8.7-4 | |
65 | ||
66 | %description rdoc | |
160d33a5 | 67 | HTML documentation for Ruby Diff::LCS module. |
0003e579 JR |
68 | |
69 | %description rdoc -l pl.UTF-8 | |
160d33a5 | 70 | Dokumentacja w formacie HTML dla modułu języka Ruby Diff::LCS |
0003e579 JR |
71 | |
72 | %package ri | |
160d33a5 JB |
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 | |
0003e579 JR |
75 | Group: Documentation |
76 | Requires: ruby | |
77 | ||
78 | %description ri | |
160d33a5 | 79 | ri documentation for Rubty Diff::LCS module. |
0003e579 JR |
80 | |
81 | %description ri -l pl.UTF-8 | |
160d33a5 | 82 | Dokumentacja w formacie ri dla modułu języka Ruby Diff::LCS. |
0003e579 | 83 | |
5f0081fd | 84 | %package -n htmldiff |
85 | Summary: Tool to find differences in HTML files | |
7fe66e3f | 86 | Summary(pl.UTF-8): Narzędzie do znajdowania różnic w plikach HTML |
01a14220 | 87 | Group: Applications/Text |
2ae0241c | 88 | Requires: ruby-text-format >= 0.64 |
5f0081fd | 89 | |
90 | %description -n htmldiff | |
01a14220 JB |
91 | Tool to find differences in HTML files. |
92 | ||
134b4604 JR |
93 | %description -n htmldiff -l pl.UTF-8 |
94 | Narzędzie do znajdowania różnic w plikach HTML. | |
5f0081fd | 95 | |
96 | %package ldiff | |
97 | Summary: Ruby Diff tool | |
7fe66e3f | 98 | Summary(pl.UTF-8): Narzędzie Ruby Diff |
01a14220 | 99 | Group: Applications/Text |
5f0081fd | 100 | |
101 | %description ldiff | |
01a14220 JB |
102 | Ruby Diff tool. |
103 | ||
134b4604 JR |
104 | %description ldiff -l pl.UTF-8 |
105 | Narzędzie Ruby Diff. | |
5f0081fd | 106 | |
107 | %prep | |
ab2c93af ER |
108 | %setup -q -n %{pkgname}-%{version} |
109 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* | |
cf3bf93f ER |
110 | |
111 | %build | |
168e8f7d ER |
112 | # write .gemspec |
113 | %__gem_helper spec | |
114 | ||
5f0081fd | 115 | rdoc --ri --op ri lib |
0003e579 | 116 | rdoc --op rdoc lib |
160d33a5 JB |
117 | %{__rm} -r ri/{Array,String} |
118 | %{__rm} ri/created.rid | |
119 | %{__rm} ri/cache.ri | |
5f0081fd | 120 | |
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
168e8f7d | 123 | install -d $RPM_BUILD_ROOT{%{_bindir},%{ruby_vendorlibdir},%{ruby_specdir},%{ruby_ridir},%{ruby_rdocdir}} |
ab2c93af ER |
124 | install -p bin/* $RPM_BUILD_ROOT%{_bindir} |
125 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
48d01448 | 126 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} |
168e8f7d ER |
127 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
128 | ||
0003e579 | 129 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} |
5f0081fd | 130 | |
131 | %clean | |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | ||
134 | %files | |
135 | %defattr(644,root,root,755) | |
09950891 | 136 | %doc History.md License.md README.rdoc |
ab2c93af | 137 | %dir %{ruby_vendorlibdir}/diff |
9d042803 | 138 | %{ruby_vendorlibdir}/diff-lcs.rb |
ab2c93af ER |
139 | %{ruby_vendorlibdir}/diff/lcs.rb |
140 | %{ruby_vendorlibdir}/diff/lcs | |
168e8f7d | 141 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |
0003e579 JR |
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 | |
5f0081fd | 150 | |
151 | %files -n htmldiff | |
01a14220 JB |
152 | %defattr(644,root,root,755) |
153 | %attr(755,root,root) %{_bindir}/htmldiff | |
7b574f37 | 154 | |
5f0081fd | 155 | %files ldiff |
01a14220 JB |
156 | %defattr(644,root,root,755) |
157 | %attr(755,root,root) %{_bindir}/ldiff |