]>
Commit | Line | Data |
---|---|---|
17158ae4 JB |
1 | # |
2 | # Conditional build: | |
9f8bb137 | 3 | %bcond_with gstreamer # GStreamer-based video support |
5a1b1220 | 4 | %bcond_without js # JavaScript support |
e6835455 | 5 | %bcond_without libjxl # JPEG-XL image support via libjxl |
17158ae4 JB |
6 | %bcond_with pdf # PDF export and GTK+ printing support via libharu [needs update?] |
7 | %bcond_without webp # WebP image support | |
8 | # | |
9 | Summary: Light WWW browser with CSS support | |
10 | Summary(pl.UTF-8): Lekka przeglądarka WWW z obsługą CSS | |
5c67da6c | 11 | Name: netsurf |
e94064eb | 12 | Version: 3.11 |
ecfed9c5 | 13 | Release: 2 |
17158ae4 | 14 | License: GPL v2 with OpenSSL exception (code), MIT (artwork) |
5c67da6c | 15 | Group: Applications/Networking |
6c09c25d | 16 | Source0: http://download.netsurf-browser.org/netsurf/releases/source/%{name}-%{version}-src.tar.gz |
e94064eb | 17 | # Source0-md5: d4a8c61cea7d507aa6633f4ab99980c9 |
17e5188e | 18 | Source1: %{name}.desktop |
e49db766 | 19 | Patch0: nsfb-ldflags.patch |
17158ae4 | 20 | Patch1: %{name}-link.patch |
0bb73e36 | 21 | Patch3: optflags.patch |
128c42bd | 22 | Patch4: fixes.patch |
2cb0de42 | 23 | Patch5: %{name}-utf8proc.patch |
5c67da6c | 24 | URL: http://netsurf-browser.org/ |
5c67da6c | 25 | BuildRequires: curl-devel |
17158ae4 JB |
26 | BuildRequires: freetype-devel >= 2 |
27 | %{?with_gstreamer:BuildRequires: gstreamer0.10-devel >= 0.10} | |
28 | BuildRequires: gtk+2-devel >= 2.0 | |
e94064eb WF |
29 | BuildRequires: libCSS-devel >= 0.9.2 |
30 | BuildRequires: libdom-devel >= 0.4.2 | |
17158ae4 | 31 | %{?with_pdf:BuildRequires: libharu-devel} |
e94064eb | 32 | BuildRequires: libhubbub-devel >= 0.3.8 |
e6835455 | 33 | %{?with_libjxl:BuildRequires: libjxl-devel} |
5c67da6c | 34 | BuildRequires: libjpeg-devel |
e94064eb | 35 | BuildRequires: libnsbmp-devel >= 0.1.7 |
f36ce874 | 36 | BuildRequires: libnsfb-devel >= 0.2.2 |
e94064eb | 37 | BuildRequires: libnsgif-devel >= 1.0.0 |
f36ce874 | 38 | BuildRequires: libnslog-devel >= 0.1.3 |
e94064eb WF |
39 | BuildRequires: libnspsl-devel >= 0.1.7 |
40 | BuildRequires: libnsutils-devel >= 0.1.1 | |
41 | BuildRequires: libparserutils-devel >= 0.2.5 | |
5c67da6c | 42 | BuildRequires: libpng-devel |
43 | BuildRequires: librsvg-devel | |
e94064eb | 44 | BuildRequires: libsvgtiny-devel >= 0.1.8 |
958c626c | 45 | BuildRequires: libutf8proc-devel >= 2.4.0 |
f36ce874 | 46 | BuildRequires: libwapcaplet-devel >= 0.4.3 |
17158ae4 JB |
47 | %{?with_webp:BuildRequires: libwebp-devel} |
48 | BuildRequires: openssl-devel | |
e94064eb WF |
49 | BuildRequires: netsurf-buildsystem >= 1.10 |
50 | BuildRequires: nsgenbind >= 0.9 | |
6c09c25d | 51 | BuildRequires: perl-HTML-Parser |
5c67da6c | 52 | BuildRequires: pkgconfig |
17158ae4 | 53 | BuildRequires: sed >= 4.0 |
5c67da6c | 54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
55 | ||
56 | %description | |
17158ae4 JB |
57 | NetSurf is a multi-platform lightweight web browser. Its aim is to |
58 | provide comprehensive rendering of HTML 5 with CSS 2 in a small | |
59 | resource footprint while remaining fast. | |
60 | ||
61 | %description -l pl.UTF-8 | |
62 | NetSurf to wieloplatformowa, lekka przeglądarka WWW. Celem jest | |
63 | zapewnienie kompletnego renderowania HTML 5 z CSS 2 przy małym | |
64 | wykorzystanie zasobów, z zachowaniem dużej szybkości. | |
5c67da6c | 65 | |
66 | %package common | |
17158ae4 JB |
67 | Summary: NetSurf - common files |
68 | Summary(pl.UTF-8): NetSurf - pliki wspólne | |
5c67da6c | 69 | Group: Applications/Networking |
70 | ||
71 | %description common | |
17158ae4 | 72 | NetSurf - common files. |
5c67da6c | 73 | |
74 | %description common -l pl.UTF-8 | |
17158ae4 | 75 | NetSurf - wspólne pliki. |
5c67da6c | 76 | |
77 | %package gtk | |
17158ae4 JB |
78 | Summary: NetSurf web browser - GTK+ version |
79 | Summary(pl.UTF-8): Wersja GTK+ przeglądarki WWW NetSurf | |
5c67da6c | 80 | Group: Applications/Networking |
81 | Requires: %{name}-common = %{version}-%{release} | |
e94064eb WF |
82 | Requires: libCSS >= 0.9.2 |
83 | Requires: libdom >= 0.4.2 | |
84 | Requires: libhubbub >= 0.3.8 | |
85 | Requires: libnsbmp >= 0.1.7 | |
86 | Requires: libnsgif >= 1.0.0 | |
87 | Requires: libnspsl >= 0.1.7 | |
88 | Requires: libparserutils >= 0.2.5 | |
89 | Requires: libsvgtiny >= 0.1.8 | |
958c626c | 90 | Requires: libutf8proc >= 2.4.0 |
f36ce874 | 91 | Requires: libwapcaplet >= 0.4.3 |
5c67da6c | 92 | |
93 | %description gtk | |
17158ae4 JB |
94 | NetSurf is a multi-platform lightweight web browser. Its aim is to |
95 | provide comprehensive rendering of HTML 5 with CSS 2 in a small | |
96 | resource footprint while remaining fast. | |
97 | ||
98 | This package contains GTK+ version. | |
5c67da6c | 99 | |
17158ae4 | 100 | %description gtk -l pl.UTF-8 |
f2c002fa JB |
101 | NetSurf to wieloplatformowa, lekka przeglądarka WWW. Celem jest |
102 | zapewnienie kompletnego renderowania HTML 5 z CSS 2 przy małym | |
103 | wykorzystanie zasobów, z zachowaniem dużej szybkości. | |
17158ae4 JB |
104 | |
105 | Ten pakiet zawiera wersję GTK+. | |
5c67da6c | 106 | |
107 | %package sdl | |
a4f8eeba JB |
108 | Summary: NetSurf web browser - SDL (framebuffer aware) version |
109 | Summary(pl.UTF-8): Wersja SDL (obsługująca framebuffer) przeglądarki WWW NetSurf | |
5c67da6c | 110 | Group: Applications/Networking |
111 | Requires: %{name}-common = %{version}-%{release} | |
e94064eb WF |
112 | Requires: libCSS >= 0.9.2 |
113 | Requires: libdom >= 0.4.2 | |
114 | Requires: libhubbub >= 0.3.8 | |
115 | Requires: libnsbmp >= 0.1.7 | |
f36ce874 | 116 | Requires: libnsfb >= 0.2.2 |
e94064eb WF |
117 | Requires: libnsgif >= 1.0.0 |
118 | Requires: libnspsl >= 0.1.7 | |
119 | Requires: libparserutils >= 0.2.5 | |
120 | Requires: libsvgtiny >= 0.1.8 | |
958c626c | 121 | Requires: libutf8proc >= 2.4.0 |
f36ce874 | 122 | Requires: libwapcaplet >= 0.4.3 |
5d4a7809 | 123 | Suggests: fonts-TTF-DejaVu |
5c67da6c | 124 | |
125 | %description sdl | |
17158ae4 JB |
126 | NetSurf is a multi-platform lightweight web browser. Its aim is to |
127 | provide comprehensive rendering of HTML 5 with CSS 2 in a small | |
128 | resource footprint while remaining fast. | |
129 | ||
a4f8eeba | 130 | This package contains SDL, framebuffer aware version. |
5c67da6c | 131 | |
17158ae4 | 132 | %description sdl -l pl.UTF-8 |
f2c002fa JB |
133 | NetSurf to wieloplatformowa, lekka przeglądarka WWW. Celem jest |
134 | zapewnienie kompletnego renderowania HTML 5 z CSS 2 przy małym | |
135 | wykorzystanie zasobów, z zachowaniem dużej szybkości. | |
17158ae4 | 136 | |
a4f8eeba | 137 | Ten pakiet zawiera wersję SDL, obsługującą framebuffer. |
5c67da6c | 138 | |
139 | %prep | |
6c09c25d | 140 | %setup -q |
e49db766 | 141 | %patch0 -p1 |
17158ae4 | 142 | %patch1 -p1 |
0bb73e36 | 143 | %patch3 -p1 |
128c42bd | 144 | %patch4 -p1 |
2cb0de42 | 145 | %patch5 -p1 |
5c67da6c | 146 | |
6c09c25d | 147 | cat << EOF > Makefile.config |
5c67da6c | 148 | NETSURF_FB_FONTLIB := freetype |
17e5188e | 149 | NETSURF_FB_FONTPATH := %{_datadir}/fonts/TTF |
17158ae4 JB |
150 | NETSURF_USE_NSSVG := YES |
151 | NETSURF_USE_RSVG := YES | |
152 | %{?with_webp:NETSURF_USE_WEBP := YES} | |
153 | %{?with_gstreamer:NETSURF_USE_VIDEO := YES} | |
154 | %{?with_pdf:NETSURF_USE_HARU_PDF := YES} | |
e6835455 | 155 | %{!?with_libjxl:NETSURF_USE_JPEGXL := NO} |
5c67da6c | 156 | EOF |
157 | ||
17158ae4 JB |
158 | %if %{with gstreamer} |
159 | # GStreamer 0.10 uses now deprecated glib mutex APIs | |
128c42bd | 160 | %{__sed} -i -e '/-DG_DISABLE_DEPRECATED/d' frontends/gtk/Makefile |
17158ae4 | 161 | %endif |
5a1b1220 | 162 | # gdk-pixbuf 2.31 deprecates GdkPixdata |
128c42bd | 163 | %{__sed} -i -e '/-DGDK_PIXBUF_DISABLE_DEPRECATED/d' frontends/gtk/Makefile |
17158ae4 | 164 | |
5c67da6c | 165 | %build |
2dbd7f13 | 166 | export CC="%{__cc}" |
f8d10195 | 167 | # while cxx not needed, somewhy it helps race condition on carme build |
2dbd7f13 | 168 | export CXX="%{__cxx}" |
f8d10195 ER |
169 | # silence -Werror: |
170 | #src/surface/vnc.c: In function 'vnc_input': | |
171 | #src/surface/vnc.c:489:9: error: variable 'ret' set but not used [-Werror=unused-but-set-variable] | |
0bb73e36 JR |
172 | export CFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" |
173 | export CXXFLAGS="%{rpmcxxflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" | |
2dbd7f13 ER |
174 | export LDFLAGS="%{rpmldflags}" |
175 | ||
f8d10195 ER |
176 | # make -j1 or it won't find libwapcaplet/libwapcaplet.h |
177 | ||
128c42bd | 178 | %{__make} \ |
0bb73e36 JR |
179 | OPTFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" \ |
180 | OPTLDFLAGS="%{rpmldflags}" \ | |
2dbd7f13 | 181 | PREFIX=%{_prefix} \ |
5c67da6c | 182 | Q='' \ |
f36ce874 | 183 | TARGET=gtk2 |
5c67da6c | 184 | |
128c42bd | 185 | %{__make} \ |
0bb73e36 JR |
186 | OPTFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" \ |
187 | OPTLDFLAGS="%{rpmldflags}" \ | |
2dbd7f13 | 188 | PREFIX=%{_prefix} \ |
5c67da6c | 189 | Q='' \ |
190 | TARGET=framebuffer | |
191 | ||
192 | %install | |
51a5e7c1 | 193 | rm -rf $RPM_BUILD_ROOT |
e6835455 | 194 | |
5c67da6c | 195 | %{__make} install \ |
2dbd7f13 | 196 | Q='' \ |
5c67da6c | 197 | PREFIX=%{_prefix} \ |
f36ce874 | 198 | TARGET=gtk2 \ |
2dbd7f13 | 199 | DESTDIR=$RPM_BUILD_ROOT |
5c67da6c | 200 | |
201 | ||
202 | %{__make} install \ | |
2dbd7f13 | 203 | Q='' \ |
5c67da6c | 204 | PREFIX=%{_prefix} \ |
205 | TARGET=framebuffer \ | |
2dbd7f13 | 206 | DESTDIR=$RPM_BUILD_ROOT |
5c67da6c | 207 | |
2dbd7f13 ER |
208 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} |
209 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
a4f8eeba JB |
210 | |
211 | # compatibility with older PLD packages | |
212 | ln -sf netsurf-fb $RPM_BUILD_ROOT%{_bindir}/nsfb | |
f36ce874 | 213 | ln -sf netsurf-gtk2 $RPM_BUILD_ROOT%{_bindir}/nsgtk |
5c67da6c | 214 | |
215 | %clean | |
216 | rm -rf $RPM_BUILD_ROOT | |
217 | ||
218 | %files common | |
219 | %defattr(644,root,root,755) | |
f36ce874 | 220 | %doc COPYING |
5c67da6c | 221 | %dir %{_datadir}/%{name} |
a4f8eeba JB |
222 | %{_datadir}/%{name}/Messages |
223 | %{_datadir}/%{name}/SearchEngines | |
224 | %{_datadir}/%{name}/default.ico | |
225 | %{_datadir}/%{name}/languages | |
a4f8eeba JB |
226 | %{_datadir}/%{name}/*.css |
227 | %{_datadir}/%{name}/*.html | |
228 | %{_datadir}/%{name}/*.png | |
229 | %{_datadir}/%{name}/*.txt | |
e94064eb | 230 | %{_datadir}/%{name}/*.ui |
a4f8eeba JB |
231 | %{_datadir}/%{name}/*.xpm |
232 | %{_datadir}/%{name}/icons | |
233 | %{_datadir}/%{name}/throbber | |
234 | %lang(de) %{_datadir}/%{name}/de | |
235 | %{_datadir}/%{name}/en | |
236 | %lang(fr) %{_datadir}/%{name}/fr | |
237 | %lang(it) %{_datadir}/%{name}/it | |
238 | %lang(ja) %{_datadir}/%{name}/ja | |
239 | %lang(nl) %{_datadir}/%{name}/nl | |
e6835455 | 240 | %lang(zh_CN) %{_datadir}/%{name}/zh_CN |
5c67da6c | 241 | |
242 | %files gtk | |
243 | %defattr(644,root,root,755) | |
f36ce874 | 244 | %attr(755,root,root) %{_bindir}/netsurf-gtk2 |
5c67da6c | 245 | %attr(755,root,root) %{_bindir}/nsgtk |
246 | %{_desktopdir}/netsurf.desktop | |
247 | ||
248 | %files sdl | |
249 | %defattr(644,root,root,755) | |
a4f8eeba | 250 | %attr(755,root,root) %{_bindir}/netsurf-fb |
5c67da6c | 251 | %attr(755,root,root) %{_bindir}/nsfb |