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