]> git.pld-linux.org Git - packages/libhubbub.git/blob - libhubbub.spec
- rel 2; warnings are acceptable now
[packages/libhubbub.git] / libhubbub.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # don't build static library
4
5 Summary:        HTML5 compliant parsing library
6 Summary(pl.UTF-8):      Biblioteka analizująca HTML5
7 Name:           libhubbub
8 Version:        0.3.0
9 Release:        2
10 License:        MIT
11 Group:          Libraries
12 Source0:        http://download.netsurf-browser.org/libs/releases/%{name}-%{version}-src.tar.gz
13 # Source0-md5:  9baf3f765e25336ab1b64da8968270f7
14 Patch0:         %{name}-build.patch
15 URL:            http://www.netsurf-browser.org/projects/libhubbub/
16 BuildRequires:  libparserutils-devel >= 0.2.0
17 BuildRequires:  netsurf-buildsystem >= 1.1
18 Requires:       libparserutils >= 0.2.0
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:
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
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
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}
70 Requires:       libparserutils-devel >= 0.2.0
71
72 %description devel
73 This package contains the include files and other resources you can
74 use to incorporate libhubbub into applications.
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
81 Summary:        libhubbub static library
82 Summary(pl.UTF-8):      Statyczna biblioteka libhubbub
83 Group:          Development/Libraries
84 Requires:       %{name}-devel = %{version}-%{release}
85
86 %description static
87 This is package with static libhubbub library.
88
89 %description static -l pl.UTF-8
90 Statyczna biblioteka libhubbub.
91
92 %prep
93 %setup -q
94 %patch0 -p1
95
96 %build
97 export CC="%{__cc}"
98 export CFLAGS="%{rpmcflags} %{rpmcppflags}"
99 export LDFLAGS="%{rpmldflags}"
100
101 %{__make} \
102         Q= \
103         PREFIX=%{_prefix} \
104         LIBDIR=%{_lib} \
105         COMPONENT_TYPE=lib-shared
106
107 %if %{with static_libs}
108 %{__make} \
109         Q= \
110         PREFIX=%{_prefix} \
111         LIBDIR=%{_lib} \
112         COMPONENT_TYPE=lib-static
113 %endif
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117 %{__make} install \
118         Q= \
119         PREFIX=%{_prefix} \
120         LIBDIR=%{_lib} \
121         COMPONENT_TYPE=lib-shared \
122         DESTDIR=$RPM_BUILD_ROOT
123
124 %if %{with static_libs}
125 %{__make} install \
126         Q= \
127         PREFIX=%{_prefix} \
128         LIBDIR=%{_lib} \
129         COMPONENT_TYPE=lib-static \
130         DESTDIR=$RPM_BUILD_ROOT
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)
141 %doc COPYING README
142 %attr(755,root,root) %{_libdir}/libhubbub.so.*.*.*
143 %attr(755,root,root) %ghost %{_libdir}/libhubbub.so.0
144
145 %files devel
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_libdir}/libhubbub.so
148 %{_includedir}/hubbub
149 %{_pkgconfigdir}/libhubbub.pc
150
151 %if %{with static_libs}
152 %files static
153 %defattr(644,root,root,755)
154 %{_libdir}/libhubbub.a
155 %endif
This page took 0.053136 seconds and 3 git commands to generate.