]> git.pld-linux.org Git - packages/netsurf.git/blame - netsurf.spec
- bcond js. Javascript support is very poor
[packages/netsurf.git] / netsurf.spec
CommitLineData
17158ae4
JB
1#
2# Conditional build:
3%bcond_without gstreamer # GStreamer-based video support
3df48782 4%bcond_without js # Javascript
17158ae4
JB
5%bcond_with pdf # PDF export and GTK+ printing support via libharu [needs update?]
6%bcond_without webp # WebP image support
7#
8Summary: Light WWW browser with CSS support
9Summary(pl.UTF-8): Lekka przeglądarka WWW z obsługą CSS
5c67da6c 10Name: netsurf
5eeba205 11Version: 3.2
3df48782 12Release: 2
17158ae4 13License: GPL v2 with OpenSSL exception (code), MIT (artwork)
5c67da6c 14Group: Applications/Networking
6c09c25d 15Source0: http://download.netsurf-browser.org/netsurf/releases/source/%{name}-%{version}-src.tar.gz
5eeba205 16# Source0-md5: 8b49a31345e2902fd962fcc11a1eedc2
17e5188e 17Source1: %{name}.desktop
e49db766 18Patch0: nsfb-ldflags.patch
17158ae4 19Patch1: %{name}-link.patch
42855131 20Patch2: no-Werror.patch
0bb73e36 21Patch3: optflags.patch
5c67da6c 22URL: http://netsurf-browser.org/
5c67da6c 23BuildRequires: curl-devel
17158ae4
JB
24BuildRequires: freetype-devel >= 2
25%{?with_gstreamer:BuildRequires: gstreamer0.10-devel >= 0.10}
26BuildRequires: gtk+2-devel >= 2.0
3df48782 27%{?with_js:BuildRequires: js185-devel}
5eeba205
WF
28BuildRequires: libCSS-devel >= 0.4.0
29BuildRequires: libdom-devel >= 0.1.1
5c67da6c 30BuildRequires: libglade2-devel
17158ae4 31%{?with_pdf:BuildRequires: libharu-devel}
6c09c25d 32BuildRequires: libhubbub-devel >= 0.3.0
5c67da6c 33BuildRequires: libjpeg-devel
6c09c25d 34BuildRequires: libnsbmp-devel >= 0.1.1
5eeba205 35BuildRequires: libnsfb-devel >= 0.1.2
6c09c25d
WF
36BuildRequires: libnsgif-devel >= 0.1.1
37BuildRequires: libparserutils-devel >= 0.2.0
5c67da6c 38BuildRequires: libpng-devel
39BuildRequires: librsvg-devel
5eeba205 40BuildRequires: libsvgtiny-devel >= 0.1.2
6c09c25d 41BuildRequires: libwapcaplet-devel >= 0.2.1
17158ae4
JB
42%{?with_webp:BuildRequires: libwebp-devel}
43BuildRequires: openssl-devel
5eeba205 44BuildRequires: netsurf-buildsystem >= 1.2
3df48782 45BuildRequires: nsgenbind >= 0.1.1
6c09c25d 46BuildRequires: perl-HTML-Parser
5c67da6c 47BuildRequires: pkgconfig
17158ae4 48BuildRequires: sed >= 4.0
5c67da6c 49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51%description
17158ae4
JB
52NetSurf is a multi-platform lightweight web browser. Its aim is to
53provide comprehensive rendering of HTML 5 with CSS 2 in a small
54resource footprint while remaining fast.
55
56%description -l pl.UTF-8
57NetSurf to wieloplatformowa, lekka przeglądarka WWW. Celem jest
58zapewnienie kompletnego renderowania HTML 5 z CSS 2 przy małym
59wykorzystanie zasobów, z zachowaniem dużej szybkości.
5c67da6c 60
61%package common
17158ae4
JB
62Summary: NetSurf - common files
63Summary(pl.UTF-8): NetSurf - pliki wspólne
5c67da6c 64Group: Applications/Networking
65
66%description common
17158ae4 67NetSurf - common files.
5c67da6c 68
69%description common -l pl.UTF-8
17158ae4 70NetSurf - wspólne pliki.
5c67da6c 71
72%package gtk
17158ae4
JB
73Summary: NetSurf web browser - GTK+ version
74Summary(pl.UTF-8): Wersja GTK+ przeglądarki WWW NetSurf
5c67da6c 75Group: Applications/Networking
76Requires: %{name}-common = %{version}-%{release}
5eeba205
WF
77Requires: libCSS >= 0.4.0
78Requires: libdom >= 0.1.1
17158ae4
JB
79Requires: libhubbub >= 0.3.0
80Requires: libnsbmp >= 0.1.1
81Requires: libnsgif >= 0.1.1
82Requires: libparserutils >= 0.2.0
5eeba205 83Requires: libsvgtiny >= 0.1.2
17158ae4 84Requires: libwapcaplet >= 0.2.1
5c67da6c 85
86%description gtk
17158ae4
JB
87NetSurf is a multi-platform lightweight web browser. Its aim is to
88provide comprehensive rendering of HTML 5 with CSS 2 in a small
89resource footprint while remaining fast.
90
91This package contains GTK+ version.
5c67da6c 92
17158ae4 93%description gtk -l pl.UTF-8
f2c002fa
JB
94NetSurf to wieloplatformowa, lekka przeglądarka WWW. Celem jest
95zapewnienie kompletnego renderowania HTML 5 z CSS 2 przy małym
96wykorzystanie zasobów, z zachowaniem dużej szybkości.
17158ae4
JB
97
98Ten pakiet zawiera wersję GTK+.
5c67da6c 99
100%package sdl
17158ae4
JB
101Summary: NetSurf web browser - SDL version
102Summary(pl.UTF-8): Wersja SDL przeglądarki WWW NetSurf
5c67da6c 103Group: Applications/Networking
104Requires: %{name}-common = %{version}-%{release}
5eeba205
WF
105Requires: libCSS >= 0.4.0
106Requires: libdom >= 0.1.1
17158ae4
JB
107Requires: libhubbub >= 0.3.0
108Requires: libnsbmp >= 0.1.1
5eeba205 109Requires: libnsfb >= 0.1.2
17158ae4
JB
110Requires: libnsgif >= 0.1.1
111Requires: libparserutils >= 0.2.0
5eeba205 112Requires: libsvgtiny >= 0.1.2
17158ae4 113Requires: libwapcaplet >= 0.2.1
5c67da6c 114
115%description sdl
17158ae4
JB
116NetSurf is a multi-platform lightweight web browser. Its aim is to
117provide comprehensive rendering of HTML 5 with CSS 2 in a small
118resource footprint while remaining fast.
119
120This package contains SDL version.
5c67da6c 121
17158ae4 122%description sdl -l pl.UTF-8
f2c002fa
JB
123NetSurf to wieloplatformowa, lekka przeglądarka WWW. Celem jest
124zapewnienie kompletnego renderowania HTML 5 z CSS 2 przy małym
125wykorzystanie zasobów, z zachowaniem dużej szybkości.
17158ae4
JB
126
127Ten pakiet zawiera wersję SDL.
5c67da6c 128
129%prep
6c09c25d 130%setup -q
e49db766 131%patch0 -p1
17158ae4 132%patch1 -p1
42855131 133%patch2 -p1
0bb73e36 134%patch3 -p1
5c67da6c 135
6c09c25d 136cat << EOF > Makefile.config
5c67da6c 137NETSURF_FB_FONTLIB := freetype
17e5188e 138NETSURF_FB_FONTPATH := %{_datadir}/fonts/TTF
17158ae4
JB
139NETSURF_USE_NSSVG := YES
140NETSURF_USE_RSVG := YES
141%{?with_webp:NETSURF_USE_WEBP := YES}
142%{?with_gstreamer:NETSURF_USE_VIDEO := YES}
143%{?with_pdf:NETSURF_USE_HARU_PDF := YES}
5eeba205 144# js185
3df48782 145%if %{with js}
5eeba205 146NETSURF_USE_MOZJS := YES
3df48782
WF
147%else
148NETSURF_USE_MOZJS := NO
149%endif
5eeba205
WF
150# xulrunner
151NETSURF_USE_JS := NO
5c67da6c 152EOF
153
17158ae4
JB
154%if %{with gstreamer}
155# GStreamer 0.10 uses now deprecated glib mutex APIs
156%{__sed} -i -e '/-DG_DISABLE_DEPRECATED/d' gtk/Makefile.target
157%endif
158
5c67da6c 159%build
2dbd7f13 160export CC="%{__cc}"
f8d10195 161# while cxx not needed, somewhy it helps race condition on carme build
2dbd7f13 162export CXX="%{__cxx}"
f8d10195
ER
163# silence -Werror:
164#src/surface/vnc.c: In function 'vnc_input':
165#src/surface/vnc.c:489:9: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
0bb73e36
JR
166export CFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE"
167export CXXFLAGS="%{rpmcxxflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE"
2dbd7f13
ER
168export LDFLAGS="%{rpmldflags}"
169
f8d10195
ER
170# make -j1 or it won't find libwapcaplet/libwapcaplet.h
171
2dbd7f13 172%{__make} -j1 \
0bb73e36
JR
173 OPTFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" \
174 OPTLDFLAGS="%{rpmldflags}" \
2dbd7f13 175 PREFIX=%{_prefix} \
5c67da6c 176 Q='' \
177 TARGET=gtk
178
2dbd7f13 179%{__make} -j1 \
0bb73e36
JR
180 OPTFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" \
181 OPTLDFLAGS="%{rpmldflags}" \
2dbd7f13 182 PREFIX=%{_prefix} \
5c67da6c 183 Q='' \
184 TARGET=framebuffer
185
186%install
51a5e7c1 187rm -rf $RPM_BUILD_ROOT
5c67da6c 188%{__make} install \
2dbd7f13 189 Q='' \
5c67da6c 190 PREFIX=%{_prefix} \
191 TARGET=gtk \
2dbd7f13 192 DESTDIR=$RPM_BUILD_ROOT
5c67da6c 193
194
195%{__make} install \
2dbd7f13 196 Q='' \
5c67da6c 197 PREFIX=%{_prefix} \
198 TARGET=framebuffer \
2dbd7f13 199 DESTDIR=$RPM_BUILD_ROOT
5c67da6c 200
2dbd7f13 201# this is binary from last "make install", we install more specific binary ourself
d03be798 202%{__rm} -f $RPM_BUILD_ROOT%{_bindir}/netsurf
2dbd7f13
ER
203
204install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
205cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
17158ae4
JB
206install nsfb $RPM_BUILD_ROOT%{_bindir}
207install nsgtk $RPM_BUILD_ROOT%{_bindir}
5c67da6c 208
209%clean
210rm -rf $RPM_BUILD_ROOT
211
212%files common
213%defattr(644,root,root,755)
17158ae4 214%doc COPYING README
5c67da6c 215%dir %{_datadir}/%{name}
216%{_datadir}/%{name}/*
217
218%files gtk
219%defattr(644,root,root,755)
220%attr(755,root,root) %{_bindir}/nsgtk
221%{_desktopdir}/netsurf.desktop
222
223%files sdl
224%defattr(644,root,root,755)
225%attr(755,root,root) %{_bindir}/nsfb
This page took 0.174446 seconds and 4 git commands to generate.