]>
Commit | Line | Data |
---|---|---|
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 | # | |
7 | Summary: Light WWW browser with CSS support | |
8 | Summary(pl.UTF-8): Lekka przeglądarka WWW z obsługą CSS | |
5c67da6c | 9 | Name: netsurf |
6c09c25d | 10 | Version: 3.1 |
0bb73e36 | 11 | Release: 3 |
17158ae4 | 12 | License: GPL v2 with OpenSSL exception (code), MIT (artwork) |
5c67da6c | 13 | Group: Applications/Networking |
6c09c25d WF |
14 | Source0: http://download.netsurf-browser.org/netsurf/releases/source/%{name}-%{version}-src.tar.gz |
15 | # Source0-md5: b83932b311716054a5189f121cdd5fd4 | |
17e5188e | 16 | Source1: %{name}.desktop |
e49db766 | 17 | Patch0: nsfb-ldflags.patch |
17158ae4 | 18 | Patch1: %{name}-link.patch |
42855131 | 19 | Patch2: no-Werror.patch |
0bb73e36 | 20 | Patch3: optflags.patch |
5c67da6c | 21 | URL: http://netsurf-browser.org/ |
5c67da6c | 22 | BuildRequires: curl-devel |
17158ae4 JB |
23 | BuildRequires: freetype-devel >= 2 |
24 | %{?with_gstreamer:BuildRequires: gstreamer0.10-devel >= 0.10} | |
25 | BuildRequires: gtk+2-devel >= 2.0 | |
26 | BuildRequires: js185-devel | |
6c09c25d WF |
27 | BuildRequires: libCSS-devel >= 0.3.0 |
28 | BuildRequires: libdom-devel >= 0.1.0 | |
5c67da6c | 29 | BuildRequires: libglade2-devel |
17158ae4 | 30 | %{?with_pdf:BuildRequires: libharu-devel} |
6c09c25d | 31 | BuildRequires: libhubbub-devel >= 0.3.0 |
5c67da6c | 32 | BuildRequires: libjpeg-devel |
6c09c25d WF |
33 | BuildRequires: libnsbmp-devel >= 0.1.1 |
34 | BuildRequires: libnsfb-devel >= 0.1.1 | |
35 | BuildRequires: libnsgif-devel >= 0.1.1 | |
36 | BuildRequires: libparserutils-devel >= 0.2.0 | |
5c67da6c | 37 | BuildRequires: libpng-devel |
38 | BuildRequires: librsvg-devel | |
6c09c25d WF |
39 | BuildRequires: libsvgtiny-devel >= 0.1.1 |
40 | BuildRequires: libwapcaplet-devel >= 0.2.1 | |
17158ae4 JB |
41 | %{?with_webp:BuildRequires: libwebp-devel} |
42 | BuildRequires: openssl-devel | |
6c09c25d WF |
43 | BuildRequires: netsurf-buildsystem >= 1.1 |
44 | BuildRequires: nsgenbind >= 0.1.0 | |
45 | BuildRequires: perl-HTML-Parser | |
5c67da6c | 46 | BuildRequires: pkgconfig |
17158ae4 | 47 | BuildRequires: sed >= 4.0 |
5c67da6c | 48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
50 | %description | |
17158ae4 JB |
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. | |
5c67da6c | 59 | |
60 | %package common | |
17158ae4 JB |
61 | Summary: NetSurf - common files |
62 | Summary(pl.UTF-8): NetSurf - pliki wspólne | |
5c67da6c | 63 | Group: Applications/Networking |
64 | ||
65 | %description common | |
17158ae4 | 66 | NetSurf - common files. |
5c67da6c | 67 | |
68 | %description common -l pl.UTF-8 | |
17158ae4 | 69 | NetSurf - wspólne pliki. |
5c67da6c | 70 | |
71 | %package gtk | |
17158ae4 JB |
72 | Summary: NetSurf web browser - GTK+ version |
73 | Summary(pl.UTF-8): Wersja GTK+ przeglądarki WWW NetSurf | |
5c67da6c | 74 | Group: Applications/Networking |
75 | Requires: %{name}-common = %{version}-%{release} | |
17158ae4 JB |
76 | Requires: libCSS >= 0.3.0 |
77 | Requires: libdom >= 0.1.0 | |
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.1 | |
83 | Requires: libwapcaplet >= 0.2.1 | |
5c67da6c | 84 | |
85 | %description gtk | |
17158ae4 JB |
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. | |
5c67da6c | 91 | |
17158ae4 | 92 | %description gtk -l pl.UTF-8 |
f2c002fa JB |
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. | |
17158ae4 JB |
96 | |
97 | Ten pakiet zawiera wersję GTK+. | |
5c67da6c | 98 | |
99 | %package sdl | |
17158ae4 JB |
100 | Summary: NetSurf web browser - SDL version |
101 | Summary(pl.UTF-8): Wersja SDL przeglądarki WWW NetSurf | |
5c67da6c | 102 | Group: Applications/Networking |
103 | Requires: %{name}-common = %{version}-%{release} | |
17158ae4 JB |
104 | Requires: libCSS >= 0.3.0 |
105 | Requires: libdom >= 0.1.0 | |
106 | Requires: libhubbub >= 0.3.0 | |
107 | Requires: libnsbmp >= 0.1.1 | |
108 | Requires: libnsfb >= 0.1.1 | |
109 | Requires: libnsgif >= 0.1.1 | |
110 | Requires: libparserutils >= 0.2.0 | |
111 | Requires: libsvgtiny >= 0.1.1 | |
112 | Requires: libwapcaplet >= 0.2.1 | |
5c67da6c | 113 | |
114 | %description sdl | |
17158ae4 JB |
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. | |
5c67da6c | 120 | |
17158ae4 | 121 | %description sdl -l pl.UTF-8 |
f2c002fa JB |
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. | |
17158ae4 JB |
125 | |
126 | Ten 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 | 135 | cat << EOF > Makefile.config |
5c67da6c | 136 | NETSURF_FB_FONTLIB := freetype |
17e5188e | 137 | NETSURF_FB_FONTPATH := %{_datadir}/fonts/TTF |
17158ae4 JB |
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} | |
5c67da6c | 143 | EOF |
144 | ||
17158ae4 JB |
145 | %if %{with gstreamer} |
146 | # GStreamer 0.10 uses now deprecated glib mutex APIs | |
147 | %{__sed} -i -e '/-DG_DISABLE_DEPRECATED/d' gtk/Makefile.target | |
148 | %endif | |
149 | ||
5c67da6c | 150 | %build |
2dbd7f13 | 151 | export CC="%{__cc}" |
f8d10195 | 152 | # while cxx not needed, somewhy it helps race condition on carme build |
2dbd7f13 | 153 | export CXX="%{__cxx}" |
f8d10195 ER |
154 | # silence -Werror: |
155 | #src/surface/vnc.c: In function 'vnc_input': | |
156 | #src/surface/vnc.c:489:9: error: variable 'ret' set but not used [-Werror=unused-but-set-variable] | |
0bb73e36 JR |
157 | export CFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" |
158 | export CXXFLAGS="%{rpmcxxflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" | |
2dbd7f13 ER |
159 | export LDFLAGS="%{rpmldflags}" |
160 | ||
f8d10195 ER |
161 | # make -j1 or it won't find libwapcaplet/libwapcaplet.h |
162 | ||
2dbd7f13 | 163 | %{__make} -j1 \ |
0bb73e36 JR |
164 | OPTFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" \ |
165 | OPTLDFLAGS="%{rpmldflags}" \ | |
2dbd7f13 | 166 | PREFIX=%{_prefix} \ |
5c67da6c | 167 | Q='' \ |
168 | TARGET=gtk | |
169 | ||
2dbd7f13 | 170 | %{__make} -j1 \ |
0bb73e36 JR |
171 | OPTFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable -D_GNU_SOURCE" \ |
172 | OPTLDFLAGS="%{rpmldflags}" \ | |
2dbd7f13 | 173 | PREFIX=%{_prefix} \ |
5c67da6c | 174 | Q='' \ |
175 | TARGET=framebuffer | |
176 | ||
177 | %install | |
51a5e7c1 | 178 | rm -rf $RPM_BUILD_ROOT |
5c67da6c | 179 | %{__make} install \ |
2dbd7f13 | 180 | Q='' \ |
5c67da6c | 181 | PREFIX=%{_prefix} \ |
182 | TARGET=gtk \ | |
2dbd7f13 | 183 | DESTDIR=$RPM_BUILD_ROOT |
5c67da6c | 184 | |
185 | ||
186 | %{__make} install \ | |
2dbd7f13 | 187 | Q='' \ |
5c67da6c | 188 | PREFIX=%{_prefix} \ |
189 | TARGET=framebuffer \ | |
2dbd7f13 | 190 | DESTDIR=$RPM_BUILD_ROOT |
5c67da6c | 191 | |
2dbd7f13 | 192 | # this is binary from last "make install", we install more specific binary ourself |
d03be798 | 193 | %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/netsurf |
2dbd7f13 ER |
194 | |
195 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} | |
196 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
17158ae4 JB |
197 | install nsfb $RPM_BUILD_ROOT%{_bindir} |
198 | install nsgtk $RPM_BUILD_ROOT%{_bindir} | |
5c67da6c | 199 | |
200 | %clean | |
201 | rm -rf $RPM_BUILD_ROOT | |
202 | ||
203 | %files common | |
204 | %defattr(644,root,root,755) | |
17158ae4 | 205 | %doc COPYING README |
5c67da6c | 206 | %dir %{_datadir}/%{name} |
207 | %{_datadir}/%{name}/* | |
208 | ||
209 | %files gtk | |
210 | %defattr(644,root,root,755) | |
211 | %attr(755,root,root) %{_bindir}/nsgtk | |
212 | %{_desktopdir}/netsurf.desktop | |
213 | ||
214 | %files sdl | |
215 | %defattr(644,root,root,755) | |
216 | %attr(755,root,root) %{_bindir}/nsfb |