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