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