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