]> git.pld-linux.org Git - packages/ruby-hpricot.git/blob - ruby-hpricot.spec
add tests, trivial load test for now
[packages/ruby-hpricot.git] / ruby-hpricot.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        A fast and easy HTML parser
6 Summary(pl.UTF-8):      Szybki i prosty analizator HTML-a
7 Name:           ruby-hpricot
8 Version:        0.8.2
9 Release:        4
10 License:        MIT
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)
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
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.
32
33 %prep
34 %setup -qc
35 mv hpricot-hpricot-*/* .
36
37 cd ext/hpricot_scan
38 ls *.c *.h > MANIFEST
39
40 %build
41 %{__ruby} setup.rb config \
42         --rbdir=%{ruby_vendorlibdir} \
43         --sodir=%{ruby_vendorarchdir}
44
45 %{__ruby} setup.rb setup
46
47 %if %{with tests}
48 %{__ruby} -Ilib -Iext/fast_xs -Iext/hpricot_scan -r hpricot -e 1
49 %endif
50
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}}
58 %{__ruby} setup.rb install \
59         --prefix=$RPM_BUILD_ROOT
60
61 #cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %files
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
This page took 0.105456 seconds and 3 git commands to generate.