3 %bcond_without gstreamer # GStreamer-based video support
4 %bcond_without js # JavaScript support
5 %bcond_with pdf # PDF export and GTK+ printing support via libharu [needs update?]
6 %bcond_without webp # WebP image support
8 Summary: Light WWW browser with CSS support
9 Summary(pl.UTF-8): Lekka przeglądarka WWW z obsługą CSS
13 License: GPL v2 with OpenSSL exception (code), MIT (artwork)
14 Group: Applications/Networking
15 Source0: http://download.netsurf-browser.org/netsurf/releases/source/%{name}-%{version}-src.tar.gz
16 # Source0-md5: 81a2838d8816ea435c4471f515a397d4
17 Source1: %{name}.desktop
18 Patch0: nsfb-ldflags.patch
19 Patch1: %{name}-link.patch
20 Patch2: no-Werror.patch
21 Patch3: optflags.patch
23 URL: http://netsurf-browser.org/
24 BuildRequires: curl-devel
25 BuildRequires: freetype-devel >= 2
26 %{?with_gstreamer:BuildRequires: gstreamer0.10-devel >= 0.10}
27 BuildRequires: gtk+2-devel >= 2.0
28 %{?with_js:BuildRequires: js187-devel}
29 BuildRequires: libCSS-devel >= 0.5.0
30 BuildRequires: libdom-devel >= 0.1.2
31 %{?with_pdf:BuildRequires: libharu-devel}
32 BuildRequires: libhubbub-devel >= 0.3.1
33 BuildRequires: libjpeg-devel
34 BuildRequires: libnsbmp-devel >= 0.1.2
35 BuildRequires: libnsfb-devel >= 0.1.3
36 BuildRequires: libnsgif-devel >= 0.1.2
37 BuildRequires: libnsutils-devel >= 0.0.1
38 BuildRequires: libparserutils-devel >= 0.2.1
39 BuildRequires: libpng-devel
40 BuildRequires: librsvg-devel
41 BuildRequires: libsvgtiny-devel >= 0.1.3
42 BuildRequires: libutf8proc-devel >= 1.1.6
43 BuildRequires: libwapcaplet-devel >= 0.2.2
44 %{?with_webp:BuildRequires: libwebp-devel}
45 BuildRequires: openssl-devel
46 BuildRequires: netsurf-buildsystem >= 1.3
47 BuildRequires: nsgenbind >= 0.1.2
48 BuildRequires: perl-HTML-Parser
49 BuildRequires: pkgconfig
50 BuildRequires: sed >= 4.0
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 NetSurf is a multi-platform lightweight web browser. Its aim is to
55 provide comprehensive rendering of HTML 5 with CSS 2 in a small
56 resource footprint while remaining fast.
58 %description -l pl.UTF-8
59 NetSurf to wieloplatformowa, lekka przeglądarka WWW. Celem jest
60 zapewnienie kompletnego renderowania HTML 5 z CSS 2 przy małym
61 wykorzystanie zasobów, z zachowaniem dużej szybkości.
64 Summary: NetSurf - common files
65 Summary(pl.UTF-8): NetSurf - pliki wspólne
66 Group: Applications/Networking
69 NetSurf - common files.
71 %description common -l pl.UTF-8
72 NetSurf - wspólne pliki.
75 Summary: NetSurf web browser - GTK+ version
76 Summary(pl.UTF-8): Wersja GTK+ przeglądarki WWW NetSurf
77 Group: Applications/Networking
78 Requires: %{name}-common = %{version}-%{release}
79 Requires: libCSS >= 0.4.0
80 Requires: libdom >= 0.1.1
81 Requires: libhubbub >= 0.3.0
82 Requires: libnsbmp >= 0.1.1
83 Requires: libnsgif >= 0.1.1
84 Requires: libparserutils >= 0.2.0
85 Requires: libsvgtiny >= 0.1.2
86 Requires: libwapcaplet >= 0.2.1
89 NetSurf is a multi-platform lightweight web browser. Its aim is to
90 provide comprehensive rendering of HTML 5 with CSS 2 in a small
91 resource footprint while remaining fast.
93 This package contains GTK+ version.
95 %description gtk -l pl.UTF-8
96 NetSurf to wieloplatformowa, lekka przeglądarka WWW. Celem jest
97 zapewnienie kompletnego renderowania HTML 5 z CSS 2 przy małym
98 wykorzystanie zasobów, z zachowaniem dużej szybkości.
100 Ten pakiet zawiera wersję GTK+.
103 Summary: NetSurf web browser - SDL version
104 Summary(pl.UTF-8): Wersja SDL przeglądarki WWW NetSurf
105 Group: Applications/Networking
106 Requires: %{name}-common = %{version}-%{release}
107 Requires: libCSS >= 0.4.0
108 Requires: libdom >= 0.1.1
109 Requires: libhubbub >= 0.3.0
110 Requires: libnsbmp >= 0.1.1
111 Requires: libnsfb >= 0.1.2
112 Requires: libnsgif >= 0.1.1
113 Requires: libparserutils >= 0.2.0
114 Requires: libsvgtiny >= 0.1.2
115 Requires: libwapcaplet >= 0.2.1
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.
122 This package contains SDL version.
124 %description sdl -l pl.UTF-8
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.
129 Ten pakiet zawiera wersję SDL.
139 cat << EOF > Makefile.config
140 NETSURF_FB_FONTLIB := freetype
141 NETSURF_FB_FONTPATH := %{_datadir}/fonts/TTF
142 NETSURF_USE_NSSVG := YES
143 NETSURF_USE_RSVG := YES
144 %{?with_webp:NETSURF_USE_WEBP := YES}
145 %{?with_gstreamer:NETSURF_USE_VIDEO := YES}
146 %{?with_pdf:NETSURF_USE_HARU_PDF := YES}
149 NETSURF_USE_MOZJS := YES
151 NETSURF_USE_MOZJS := NO
157 %if %{with gstreamer}
158 # GStreamer 0.10 uses now deprecated glib mutex APIs
159 %{__sed} -i -e '/-DG_DISABLE_DEPRECATED/d' gtk/Makefile.target
161 # gdk-pixbuf 2.31 deprecates GdkPixdata
162 %{__sed} -i -e '/-DGDK_PIXBUF_DISABLE_DEPRECATED/d' gtk/Makefile.target
166 # while cxx not needed, somewhy it helps race condition on carme build
167 export CXX="%{__cxx}"
169 #src/surface/vnc.c: In function 'vnc_input':
170 #src/surface/vnc.c:489:9: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
171 export CFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE"
172 export CXXFLAGS="%{rpmcxxflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE"
173 export LDFLAGS="%{rpmldflags}"
175 # make -j1 or it won't find libwapcaplet/libwapcaplet.h
178 OPTFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" \
179 OPTLDFLAGS="%{rpmldflags}" \
185 OPTFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" \
186 OPTLDFLAGS="%{rpmldflags}" \
192 rm -rf $RPM_BUILD_ROOT
197 DESTDIR=$RPM_BUILD_ROOT
204 DESTDIR=$RPM_BUILD_ROOT
206 # this is binary from last "make install", we install more specific binary ourself
207 %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/netsurf
209 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
210 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
211 install nsfb $RPM_BUILD_ROOT%{_bindir}
212 install nsgtk $RPM_BUILD_ROOT%{_bindir}
215 rm -rf $RPM_BUILD_ROOT
218 %defattr(644,root,root,755)
220 %dir %{_datadir}/%{name}
221 %{_datadir}/%{name}/*
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_bindir}/nsgtk
226 %{_desktopdir}/netsurf.desktop
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_bindir}/nsfb