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