]>
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 WF |
10 | Version: 3.1 |
11 | Release: 1 | |
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 |
5c67da6c | 19 | URL: http://netsurf-browser.org/ |
5c67da6c | 20 | BuildRequires: curl-devel |
17158ae4 JB |
21 | BuildRequires: freetype-devel >= 2 |
22 | %{?with_gstreamer:BuildRequires: gstreamer0.10-devel >= 0.10} | |
23 | BuildRequires: gtk+2-devel >= 2.0 | |
24 | BuildRequires: js185-devel | |
6c09c25d WF |
25 | BuildRequires: libCSS-devel >= 0.3.0 |
26 | BuildRequires: libdom-devel >= 0.1.0 | |
5c67da6c | 27 | BuildRequires: libglade2-devel |
17158ae4 | 28 | %{?with_pdf:BuildRequires: libharu-devel} |
6c09c25d | 29 | BuildRequires: libhubbub-devel >= 0.3.0 |
5c67da6c | 30 | BuildRequires: libjpeg-devel |
6c09c25d WF |
31 | BuildRequires: libnsbmp-devel >= 0.1.1 |
32 | BuildRequires: libnsfb-devel >= 0.1.1 | |
33 | BuildRequires: libnsgif-devel >= 0.1.1 | |
34 | BuildRequires: libparserutils-devel >= 0.2.0 | |
5c67da6c | 35 | BuildRequires: libpng-devel |
36 | BuildRequires: librsvg-devel | |
6c09c25d WF |
37 | BuildRequires: libsvgtiny-devel >= 0.1.1 |
38 | BuildRequires: libwapcaplet-devel >= 0.2.1 | |
17158ae4 JB |
39 | %{?with_webp:BuildRequires: libwebp-devel} |
40 | BuildRequires: openssl-devel | |
6c09c25d WF |
41 | BuildRequires: netsurf-buildsystem >= 1.1 |
42 | BuildRequires: nsgenbind >= 0.1.0 | |
43 | BuildRequires: perl-HTML-Parser | |
5c67da6c | 44 | BuildRequires: pkgconfig |
17158ae4 | 45 | BuildRequires: sed >= 4.0 |
5c67da6c | 46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
48 | %description | |
17158ae4 JB |
49 | NetSurf is a multi-platform lightweight web browser. Its aim is to |
50 | provide comprehensive rendering of HTML 5 with CSS 2 in a small | |
51 | resource footprint while remaining fast. | |
52 | ||
53 | %description -l pl.UTF-8 | |
54 | NetSurf to wieloplatformowa, lekka przeglądarka WWW. Celem jest | |
55 | zapewnienie kompletnego renderowania HTML 5 z CSS 2 przy małym | |
56 | wykorzystanie zasobów, z zachowaniem dużej szybkości. | |
5c67da6c | 57 | |
58 | %package common | |
17158ae4 JB |
59 | Summary: NetSurf - common files |
60 | Summary(pl.UTF-8): NetSurf - pliki wspólne | |
5c67da6c | 61 | Group: Applications/Networking |
62 | ||
63 | %description common | |
17158ae4 | 64 | NetSurf - common files. |
5c67da6c | 65 | |
66 | %description common -l pl.UTF-8 | |
17158ae4 | 67 | NetSurf - wspólne pliki. |
5c67da6c | 68 | |
69 | %package gtk | |
17158ae4 JB |
70 | Summary: NetSurf web browser - GTK+ version |
71 | Summary(pl.UTF-8): Wersja GTK+ przeglądarki WWW NetSurf | |
5c67da6c | 72 | Group: Applications/Networking |
73 | Requires: %{name}-common = %{version}-%{release} | |
17158ae4 JB |
74 | Requires: libCSS >= 0.3.0 |
75 | Requires: libdom >= 0.1.0 | |
76 | Requires: libhubbub >= 0.3.0 | |
77 | Requires: libnsbmp >= 0.1.1 | |
78 | Requires: libnsgif >= 0.1.1 | |
79 | Requires: libparserutils >= 0.2.0 | |
80 | Requires: libsvgtiny >= 0.1.1 | |
81 | Requires: libwapcaplet >= 0.2.1 | |
5c67da6c | 82 | |
83 | %description gtk | |
17158ae4 JB |
84 | NetSurf is a multi-platform lightweight web browser. Its aim is to |
85 | provide comprehensive rendering of HTML 5 with CSS 2 in a small | |
86 | resource footprint while remaining fast. | |
87 | ||
88 | This package contains GTK+ version. | |
5c67da6c | 89 | |
17158ae4 JB |
90 | %description gtk -l pl.UTF-8 |
91 | NetSurf is a multi-platform lightweight web browser. Its aim is to | |
92 | provide comprehensive rendering of HTML 5 with CSS 2 in a small | |
93 | resource footprint while remaining fast. | |
94 | ||
95 | Ten pakiet zawiera wersję GTK+. | |
5c67da6c | 96 | |
97 | %package sdl | |
17158ae4 JB |
98 | Summary: NetSurf web browser - SDL version |
99 | Summary(pl.UTF-8): Wersja SDL przeglądarki WWW NetSurf | |
5c67da6c | 100 | Group: Applications/Networking |
101 | Requires: %{name}-common = %{version}-%{release} | |
17158ae4 JB |
102 | Requires: libCSS >= 0.3.0 |
103 | Requires: libdom >= 0.1.0 | |
104 | Requires: libhubbub >= 0.3.0 | |
105 | Requires: libnsbmp >= 0.1.1 | |
106 | Requires: libnsfb >= 0.1.1 | |
107 | Requires: libnsgif >= 0.1.1 | |
108 | Requires: libparserutils >= 0.2.0 | |
109 | Requires: libsvgtiny >= 0.1.1 | |
110 | Requires: libwapcaplet >= 0.2.1 | |
5c67da6c | 111 | |
112 | %description sdl | |
17158ae4 JB |
113 | NetSurf is a multi-platform lightweight web browser. Its aim is to |
114 | provide comprehensive rendering of HTML 5 with CSS 2 in a small | |
115 | resource footprint while remaining fast. | |
116 | ||
117 | This package contains SDL version. | |
5c67da6c | 118 | |
17158ae4 JB |
119 | %description sdl -l pl.UTF-8 |
120 | NetSurf is a multi-platform lightweight web browser. Its aim is to | |
121 | provide comprehensive rendering of HTML 5 with CSS 2 in a small | |
122 | resource footprint while remaining fast. | |
123 | ||
124 | Ten pakiet zawiera wersję SDL. | |
5c67da6c | 125 | |
126 | %prep | |
6c09c25d | 127 | %setup -q |
e49db766 | 128 | %patch0 -p1 |
17158ae4 | 129 | %patch1 -p1 |
5c67da6c | 130 | |
6c09c25d | 131 | cat << EOF > Makefile.config |
5c67da6c | 132 | NETSURF_FB_FONTLIB := freetype |
17e5188e | 133 | NETSURF_FB_FONTPATH := %{_datadir}/fonts/TTF |
17158ae4 JB |
134 | NETSURF_USE_NSSVG := YES |
135 | NETSURF_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 | 139 | EOF |
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 | 147 | export CC="%{__cc}" |
f8d10195 | 148 | # while cxx not needed, somewhy it helps race condition on carme build |
2dbd7f13 | 149 | export 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 |
153 | export CFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable" |
154 | export 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 | 169 | rm -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 | |
186 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} | |
187 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
17158ae4 JB |
188 | install nsfb $RPM_BUILD_ROOT%{_bindir} |
189 | install nsgtk $RPM_BUILD_ROOT%{_bindir} | |
5c67da6c | 190 | |
191 | %clean | |
192 | rm -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 |