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