]> git.pld-linux.org Git - SPECS.git/blob - ruby-hpricot.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ruby-hpricot.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define pkgname hpricot
6 Summary:        A fast and easy HTML parser
7 Summary(pl.UTF-8):      Szybki i prosty analizator HTML-a
8 Name:           ruby-%{pkgname}
9 Version:        0.8.6
10 Release:        7
11 License:        MIT
12 Group:          Development/Languages
13 #Source0Download: https://github.com/hpricot/hpricot/releases
14 Source0:        https://github.com/hpricot/hpricot/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  22cb09304283a1b9590385850bd462c1
16 URL:            https://rubygems.org/gems/hpricot
17 BuildRequires:  rpmbuild(macros) >= 1.665
18 BuildRequires:  ruby-devel
19 BuildRequires:  ruby-modules
20 BuildRequires:  setup.rb >= 3.4.1-6
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Hpricot is a very flexible HTML parser, based on Tanaka Akira's HTree
25 and John Resig's JQuery, but with the scanner recoded in C (using
26 Ragel for scanning.) I've borrowed what I believe to be the best ideas
27 from these wares to make Hpricot heaps of fun to use.
28
29 %description -l pl.UTF-8
30 Hpricot to bardzo elastyczny analizator HTML-a, oparty na HTree Tanaka
31 Akiry i JQuery Johna Resiga, ale ze skanerem napisanym w C
32 (wykorzystującym Ragela). Z tych wyrobów zapożyczono najlepsze
33 pomysły, aby uczynić Hpricota najprzyjemniejszym w użyciu.
34
35 %prep
36 %setup -q -n hpricot-%{version}
37
38 cp %{_datadir}/setup.rb .
39
40 cd ext/hpricot_scan
41 ls *.c *.h > MANIFEST
42
43 %build
44 # make gemspec self-contained
45 ruby -r rubygems -e 'spec = eval(File.read("%{pkgname}.gemspec"))
46         File.open("%{pkgname}-%{version}.gemspec", "w") do |file|
47         file.puts spec.to_ruby_for_cache
48 end'
49
50 %{__ruby} setup.rb config \
51         --rbdir=%{ruby_vendorlibdir} \
52         --sodir=%{ruby_vendorarchdir}
53
54 %{__ruby} setup.rb setup
55
56 %if %{with tests}
57 %{__ruby} -Ilib -Iext/fast_xs -Iext/hpricot_scan -r hpricot -e 1
58 %endif
59
60 # rdoc crashes on _why's craaazy code.
61 #rdoc --op rdoc lib
62 #rdoc --ri --op ri lib
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{ruby_specdir},%{ruby_ridir}}
67 %{__ruby} setup.rb install \
68         --prefix=$RPM_BUILD_ROOT
69
70 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
71
72 #cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
78 %defattr(644,root,root,755)
79 %{ruby_vendorlibdir}/hpricot.rb
80 %{ruby_vendorlibdir}/hpricot
81 %attr(755,root,root) %{ruby_vendorarchdir}/fast_xs.so
82 %attr(755,root,root) %{ruby_vendorarchdir}/hpricot_scan.so
83 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
This page took 0.972782 seconds and 3 git commands to generate.