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