]>
Commit | Line | Data |
---|---|---|
728bf4d0 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python # any Python | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | %bcond_without static_libs # static library | |
7 | ||
8 | %if %{without python} | |
9 | %undefine with_python2 | |
10 | %undefine with_python3 | |
11 | %endif | |
1b17948e | 12 | Summary: Google's HTML5 parser library for C99 |
728bf4d0 | 13 | Summary(pl.UTF-8): Biblioteka Google'a do analizy HTML5 dla C99 |
1b17948e | 14 | Name: gumbo-parser |
490492b9 | 15 | Version: 0.10.1 |
728bf4d0 | 16 | Release: 2 |
f3e01f51 | 17 | Epoch: 1 |
101092fb | 18 | License: Apache v2.0 |
728bf4d0 JB |
19 | Group: Libraries |
20 | #Source0Download: https://github.com/google/gumbo-parser/releases | |
21 | # TODO: https://github.com/google/gumbo-parser/archive/v%{version}/%{name}-%{version}.tar.gz | |
f3e01f51 | 22 | Source0: https://github.com/google/gumbo-parser/archive/v%{version}.tar.gz |
490492b9 | 23 | # Source0-md5: c6f75c9eda65e897c242f8958a34aed0 |
101092fb | 24 | URL: http://github.com/google/gumbo-parser |
728bf4d0 | 25 | BuildRequires: autoconf >= 2.65 |
1b17948e AM |
26 | BuildRequires: automake |
27 | BuildRequires: libstdc++-devel | |
728bf4d0 JB |
28 | BuildRequires: libtool >= 2:2 |
29 | %if %{with python2} | |
30 | BuildRequires: python-devel >= 1:2.7 | |
31 | BuildRequires: python-setuptools | |
32 | %endif | |
33 | %if %{with python3} | |
34 | BuildRequires: python3-devel >= 1:3.4 | |
35 | BuildRequires: python3-setuptools | |
36 | %endif | |
37 | BuildRequires: rpm-pythonprov | |
38 | BuildRequires: rpmbuild(macros) >= 1.714 | |
1b17948e AM |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
42 | Gumbo is an implementation of the HTML5 parsing algorithm implemented | |
43 | as a C99 library. It is fully conformant with the HTML5 specification, | |
44 | robust and resilient to bad input, supports source locations and | |
45 | pointers back to the original text. | |
46 | ||
728bf4d0 JB |
47 | %description -l pl.UTF-8 |
48 | Gumbo to implementacja algorytmu analizy HTML5 jako biblioteka C99. | |
49 | Jest w pełni zgodna ze specyfikacją HTML5, potężna i odporna na błędne | |
50 | wejście; obsługuje położenia źródłowe i wskaźniki powrotne do | |
51 | pierwotnego tekstu. | |
52 | ||
1b17948e AM |
53 | %package devel |
54 | Summary: Development files for Google's C99 HTML5 parser | |
728bf4d0 | 55 | Summary(pl.UTF-8): Pliki programistyczne C99 analizatora HTML5 Google'a |
1b17948e | 56 | Group: Development/Libraries |
f3e01f51 | 57 | Requires: %{name} = %{epoch}:%{version}-%{release} |
1b17948e AM |
58 | |
59 | %description devel | |
728bf4d0 JB |
60 | This subpackage contains the header files for developing applications |
61 | that want to make use of gumbo-parser. | |
1b17948e | 62 | |
728bf4d0 JB |
63 | %description devel -l pl.UTF-8 |
64 | Ten podpakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
65 | wykorzystujących gumbo-parser. | |
66 | ||
67 | %package static | |
68 | Summary: Static Gumbo parser library | |
69 | Summary(pl.UTF-8): Statyczna biblioteka analizatora Gumbo | |
70 | Group: Development/Libraries | |
71 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
72 | ||
73 | %description static | |
74 | Static Gumbo parser library. | |
75 | ||
76 | %description static -l pl.UTF-8 | |
77 | Statyczna biblioteka analizatora Gumbo. | |
78 | ||
79 | %package -n python-gumbo | |
80 | Summary: Python 2 interface to Gumbo HTML5 parser | |
81 | Summary(pl.UTF-8): Interfejs Pythona 2 do analizatora HTML5 Gumbo | |
82 | Group: Libraries/Python | |
83 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
84 | ||
85 | %description -n python-gumbo | |
86 | Python 2 interface to Gumbo HTML5 parser. | |
87 | ||
88 | %description -n python-gumbo -l pl.UTF-8 | |
89 | Interfejs Pythona 2 do analizatora HTML5 Gumbo. | |
90 | ||
91 | %package -n python3-gumbo | |
92 | Summary: Python 3 interface to Gumbo HTML5 parser | |
93 | Summary(pl.UTF-8): Interfejs Pythona 3 do analizatora HTML5 Gumbo | |
94 | Group: Libraries/Python | |
95 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
96 | ||
97 | %description -n python3-gumbo | |
98 | Python 3 interface to Gumbo HTML5 parser. | |
99 | ||
100 | %description -n python3-gumbo -l pl.UTF-8 | |
101 | Interfejs Pythona 3 do analizatora HTML5 Gumbo. | |
1b17948e AM |
102 | |
103 | %prep | |
f3e01f51 | 104 | %setup -q |
1b17948e AM |
105 | |
106 | %build | |
107 | %{__libtoolize} | |
108 | %{__aclocal} | |
109 | %{__autoconf} | |
110 | %{__automake} | |
111 | %configure \ | |
112 | --disable-silent-rules \ | |
728bf4d0 | 113 | %{!?with_static_libs:--disable-static} |
1b17948e AM |
114 | |
115 | %{__make} | |
116 | ||
728bf4d0 JB |
117 | %if %{with python2} |
118 | %py_build | |
119 | %endif | |
120 | ||
121 | %if %{with python3} | |
122 | %py3_build | |
123 | %endif | |
124 | ||
1b17948e AM |
125 | %install |
126 | rm -rf $RPM_BUILD_ROOT | |
728bf4d0 | 127 | |
1b17948e AM |
128 | %{__make} install \ |
129 | DESTDIR=$RPM_BUILD_ROOT | |
130 | ||
101092fb ER |
131 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgumbo.la |
132 | ||
728bf4d0 JB |
133 | %if %{with python2} |
134 | %py_install | |
135 | ||
136 | %py_postclean | |
137 | %endif | |
138 | ||
139 | %if %{with python3} | |
140 | %py3_install | |
141 | %endif | |
142 | ||
1b17948e AM |
143 | %clean |
144 | rm -rf $RPM_BUILD_ROOT | |
145 | ||
146 | %post -p /sbin/ldconfig | |
147 | %postun -p /sbin/ldconfig | |
148 | ||
149 | %files | |
150 | %defattr(644,root,root,755) | |
101092fb | 151 | %attr(755,root,root) %{_libdir}/libgumbo.so.*.*.* |
728bf4d0 | 152 | %attr(755,root,root) %ghost %{_libdir}/libgumbo.so.1 |
1b17948e AM |
153 | |
154 | %files devel | |
155 | %defattr(644,root,root,755) | |
728bf4d0 | 156 | %attr(755,root,root) %{_libdir}/libgumbo.so |
1b17948e | 157 | %{_includedir}/gumbo.h |
490492b9 | 158 | %{_includedir}/tag_enum.h |
1b17948e | 159 | %{_pkgconfigdir}/gumbo.pc |
728bf4d0 JB |
160 | |
161 | %if %{with static_libs} | |
162 | %files static | |
163 | %defattr(644,root,root,755) | |
164 | %{_libdir}/libgumbo.a | |
165 | %endif | |
166 | ||
167 | %if %{with python2} | |
168 | %files -n python-gumbo | |
169 | %defattr(644,root,root,755) | |
170 | %{py_sitescriptdir}/gumbo-%{version}-py*.egg-info | |
171 | %{py_sitescriptdir}/gumbo | |
172 | %endif | |
173 | ||
174 | %if %{with python3} | |
175 | %files -n python3-gumbo | |
176 | %defattr(644,root,root,755) | |
177 | %{py3_sitescriptdir}/gumbo-%{version}-py*.egg-info | |
178 | %{py3_sitescriptdir}/gumbo | |
179 | %endif |