]>
Commit | Line | Data |
---|---|---|
997220a1 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
bde3aa1a | 5 | Summary: A fast and easy HTML parser |
494cf97a | 6 | Summary(pl.UTF-8): Szybki i prosty analizator HTML-a |
bde3aa1a | 7 | Name: ruby-hpricot |
80343966 | 8 | Version: 0.8.2 |
b56780e9 | 9 | Release: 4 |
a9ccac66 | 10 | License: MIT |
bde3aa1a | 11 | Group: Development/Languages |
1143cc7a | 12 | Source0: http://github.com/hpricot/hpricot/tarball/%{version}/%{name}-%{version}.tar.gz |
80343966 | 13 | # Source0-md5: def40ba2aeb04511df9ec47d3bcecf0e |
14 | URL: http://hpricot.com/ | |
1143cc7a ER |
15 | BuildRequires: rpm-rubyprov |
16 | BuildRequires: rpmbuild(macros) >= 1.665 | |
76d17343 | 17 | BuildRequires: ruby-devel |
18 | BuildRequires: ruby-modules | |
bde3aa1a | 19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
22 | Hpricot is a very flexible HTML parser, based on Tanaka Akira's HTree | |
23 | and John Resig's JQuery, but with the scanner recoded in C (using | |
24 | Ragel for scanning.) I've borrowed what I believe to be the best ideas | |
25 | from these wares to make Hpricot heaps of fun to use. | |
26 | ||
1c104ed2 | 27 | %description -l pl.UTF-8 |
886e8aaa JB |
28 | Hpricot to bardzo elastyczny analizator HTML-a, oparty na HTree Tanaka |
29 | Akiry i JQuery Johna Resiga, ale ze skanerem napisanym w C | |
1c104ed2 JR |
30 | (wykorzystującym Ragela). Z tych wyrobów zapożyczono najlepsze |
31 | pomysły, aby uczynić Hpricota najprzyjemniejszym w użyciu. | |
886e8aaa | 32 | |
bde3aa1a | 33 | %prep |
1143cc7a | 34 | %setup -qc |
80343966 | 35 | mv hpricot-hpricot-*/* . |
bde3aa1a | 36 | |
bde3aa1a | 37 | cd ext/hpricot_scan |
38 | ls *.c *.h > MANIFEST | |
bde3aa1a | 39 | |
1143cc7a ER |
40 | %build |
41 | %{__ruby} setup.rb config \ | |
42 | --rbdir=%{ruby_vendorlibdir} \ | |
43 | --sodir=%{ruby_vendorarchdir} | |
44 | ||
45 | %{__ruby} setup.rb setup | |
bde3aa1a | 46 | |
997220a1 ER |
47 | %if %{with tests} |
48 | %{__ruby} -Ilib -Iext/fast_xs -Iext/hpricot_scan -r hpricot -e 1 | |
49 | %endif | |
50 | ||
bde3aa1a | 51 | # rdoc crashes on _why's craaazy code. |
52 | #rdoc --op rdoc lib | |
53 | #rdoc --ri --op ri lib | |
54 | ||
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | install -d $RPM_BUILD_ROOT{%{ruby_archdir},%{ruby_ridir}} | |
1143cc7a | 58 | %{__ruby} setup.rb install \ |
bde3aa1a | 59 | --prefix=$RPM_BUILD_ROOT |
60 | ||
3c1b2e7f | 61 | #cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} |
bde3aa1a | 62 | |
63 | %clean | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
1143cc7a ER |
68 | %{ruby_vendorlibdir}/hpricot.rb |
69 | %{ruby_vendorlibdir}/hpricot | |
70 | %attr(755,root,root) %{ruby_vendorarchdir}/fast_xs.so | |
71 | %attr(755,root,root) %{ruby_vendorarchdir}/hpricot_scan.so |