3 %bcond_without tests # build without tests
5 Summary: A fast and easy HTML parser
6 Summary(pl.UTF-8): Szybki i prosty analizator HTML-a
11 Group: Development/Languages
12 Source0: http://github.com/hpricot/hpricot/tarball/%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5: def40ba2aeb04511df9ec47d3bcecf0e
14 URL: http://hpricot.com/
15 BuildRequires: rpm-rubyprov
16 BuildRequires: rpmbuild(macros) >= 1.665
17 BuildRequires: ruby-devel
18 BuildRequires: ruby-modules
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
27 %description -l pl.UTF-8
28 Hpricot to bardzo elastyczny analizator HTML-a, oparty na HTree Tanaka
29 Akiry i JQuery Johna Resiga, ale ze skanerem napisanym w C
30 (wykorzystującym Ragela). Z tych wyrobów zapożyczono najlepsze
31 pomysły, aby uczynić Hpricota najprzyjemniejszym w użyciu.
35 mv hpricot-hpricot-*/* .
41 %{__ruby} setup.rb config \
42 --rbdir=%{ruby_vendorlibdir} \
43 --sodir=%{ruby_vendorarchdir}
45 %{__ruby} setup.rb setup
48 %{__ruby} -Ilib -Iext/fast_xs -Iext/hpricot_scan -r hpricot -e 1
51 # rdoc crashes on _why's craaazy code.
53 #rdoc --ri --op ri lib
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{ruby_archdir},%{ruby_ridir}}
58 %{__ruby} setup.rb install \
59 --prefix=$RPM_BUILD_ROOT
61 #cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
64 rm -rf $RPM_BUILD_ROOT
67 %defattr(644,root,root,755)
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