]>
Commit | Line | Data |
---|---|---|
9cb06394 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static library | |
da5c947e | 4 | |
9cb06394 | 5 | Summary: HTML5 compliant parsing library |
a0409436 | 6 | Summary(pl.UTF-8): Biblioteka analizująca HTML5 |
9cb06394 | 7 | Name: libhubbub |
05c129a0 WF |
8 | Version: 0.3.1 |
9 | Release: 1 | |
9cb06394 | 10 | License: MIT |
11 | Group: Libraries | |
12 | Source0: http://download.netsurf-browser.org/libs/releases/%{name}-%{version}-src.tar.gz | |
05c129a0 | 13 | # Source0-md5: bb32083b2c036dab25278968014be746 |
c5c8b2dc | 14 | Patch0: %{name}-build.patch |
9cb06394 | 15 | URL: http://www.netsurf-browser.org/projects/libhubbub/ |
05c129a0 WF |
16 | BuildRequires: libparserutils-devel >= 0.2.1 |
17 | BuildRequires: netsurf-buildsystem >= 1.3 | |
18 | Requires: libparserutils >= 0.2.1 | |
9cb06394 | 19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
22 | Hubbub is an HTML5 compliant parsing library, written in C. It was | |
23 | developed as part of the NetSurf project and is available for use by | |
24 | other software under the MIT licence. | |
25 | ||
26 | The HTML5 specification defines a parsing algorithm, based on the | |
27 | behaviour of mainstream browsers, which provides instructions for how | |
28 | to parse all markup, both valid and invalid. As a result, Hubbub | |
29 | parses web content well. | |
30 | ||
31 | If you are looking for an HTML5 parser in Python or Ruby, you may wish | |
32 | to look at html5lib. | |
33 | ||
34 | Features: | |
9cb06394 | 35 | - Parses HTML, good and bad |
36 | - Simple C API | |
37 | - Fast | |
38 | - Character encoding detection | |
39 | - Well-tested (~90% test coverage) | |
40 | - Portable | |
41 | - Shared library | |
42 | ||
a0409436 JB |
43 | %description -l pl.UTF-8 |
44 | Hubbub to napisana w C biblioteka analizująca HTML5. Powstała jako | |
45 | część projektu NetSurf i można jej używać w innych programach na | |
46 | licencji MIT. | |
47 | ||
48 | Specyfikacja HTML definiuje algorytm analizy w oparciu o zachowanie | |
49 | głównych przeglądarek, które dostarczają instrukcje, jak analizować | |
50 | znaczniki, zarówno poprawne, jak i niepoprawne. W efekcie Hubbub | |
51 | dobrze analizuje treści WWW. | |
52 | ||
53 | W razie potrzeby analizowania HTML5 w języku Python lub Ruby, można | |
54 | rozważyć użycie html5lib. | |
55 | ||
56 | Cechy biblioteki: | |
57 | - analizuje HTML, dobry i wadliwy | |
58 | - proste API dla języka C | |
59 | - szybka | |
60 | - wykrywanie kodowania znaków | |
61 | - dobrze przetestowana (~90% pokrycia testami) | |
62 | - przenośna | |
63 | - współdzielona | |
64 | ||
9cb06394 | 65 | %package devel |
66 | Summary: libhubbub library headers | |
67 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libhubbub | |
68 | Group: Development/Libraries | |
69 | Requires: %{name} = %{version}-%{release} | |
a0409436 | 70 | Requires: libparserutils-devel >= 0.2.0 |
9cb06394 | 71 | |
72 | %description devel | |
a0409436 JB |
73 | This package contains the include files and other resources you can |
74 | use to incorporate libhubbub into applications. | |
9cb06394 | 75 | |
76 | %description devel -l pl.UTF-8 | |
77 | Pliki nagłówkowe pozwalające na używanie biblioteki libhubbub w swoich | |
78 | programach. | |
79 | ||
80 | %package static | |
a0409436 JB |
81 | Summary: libhubbub static library |
82 | Summary(pl.UTF-8): Statyczna biblioteka libhubbub | |
9cb06394 | 83 | Group: Development/Libraries |
84 | Requires: %{name}-devel = %{version}-%{release} | |
85 | ||
86 | %description static | |
a0409436 | 87 | This is package with static libhubbub library. |
9cb06394 | 88 | |
89 | %description static -l pl.UTF-8 | |
90 | Statyczna biblioteka libhubbub. | |
91 | ||
92 | %prep | |
93 | %setup -q | |
c5c8b2dc | 94 | %patch0 -p1 |
9cb06394 | 95 | |
96 | %build | |
da5c947e | 97 | export CC="%{__cc}" |
c5c8b2dc | 98 | export CFLAGS="%{rpmcflags} %{rpmcppflags}" |
da5c947e ER |
99 | export LDFLAGS="%{rpmldflags}" |
100 | ||
a0409436 JB |
101 | %{__make} \ |
102 | Q= \ | |
da5c947e | 103 | PREFIX=%{_prefix} \ |
a0409436 | 104 | LIBDIR=%{_lib} \ |
da5c947e | 105 | COMPONENT_TYPE=lib-shared |
9cb06394 | 106 | |
9cb06394 | 107 | %if %{with static_libs} |
a0409436 JB |
108 | %{__make} \ |
109 | Q= \ | |
da5c947e | 110 | PREFIX=%{_prefix} \ |
a0409436 | 111 | LIBDIR=%{_lib} \ |
da5c947e | 112 | COMPONENT_TYPE=lib-static |
9cb06394 | 113 | %endif |
114 | ||
115 | %install | |
116 | rm -rf $RPM_BUILD_ROOT | |
a0409436 JB |
117 | %{__make} install \ |
118 | Q= \ | |
9cb06394 | 119 | PREFIX=%{_prefix} \ |
a0409436 | 120 | LIBDIR=%{_lib} \ |
9cb06394 | 121 | COMPONENT_TYPE=lib-shared \ |
da5c947e | 122 | DESTDIR=$RPM_BUILD_ROOT |
9cb06394 | 123 | |
124 | %if %{with static_libs} | |
a0409436 JB |
125 | %{__make} install \ |
126 | Q= \ | |
9cb06394 | 127 | PREFIX=%{_prefix} \ |
a0409436 | 128 | LIBDIR=%{_lib} \ |
9cb06394 | 129 | COMPONENT_TYPE=lib-static \ |
da5c947e | 130 | DESTDIR=$RPM_BUILD_ROOT |
9cb06394 | 131 | %endif |
132 | ||
133 | %clean | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | %post -p /sbin/ldconfig | |
137 | %postun -p /sbin/ldconfig | |
138 | ||
139 | %files | |
140 | %defattr(644,root,root,755) | |
a0409436 | 141 | %doc COPYING README |
6204307b | 142 | %attr(755,root,root) %{_libdir}/libhubbub.so.*.*.* |
a0409436 | 143 | %attr(755,root,root) %ghost %{_libdir}/libhubbub.so.0 |
9cb06394 | 144 | |
145 | %files devel | |
146 | %defattr(644,root,root,755) | |
a0409436 | 147 | %attr(755,root,root) %{_libdir}/libhubbub.so |
9cb06394 | 148 | %{_includedir}/hubbub |
6204307b | 149 | %{_pkgconfigdir}/libhubbub.pc |
9cb06394 | 150 | |
151 | %if %{with static_libs} | |
152 | %files static | |
153 | %defattr(644,root,root,755) | |
6204307b | 154 | %{_libdir}/libhubbub.a |
9cb06394 | 155 | %endif |