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