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