]> git.pld-linux.org Git - packages/netsurf.git/blob - netsurf.spec
830391c49e827afc284a5ed3e3d51c15a6a25623
[packages/netsurf.git] / netsurf.spec
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
9 Name:           netsurf
10 Version:        3.1
11 Release:        2
12 License:        GPL v2 with OpenSSL exception (code), MIT (artwork)
13 Group:          Applications/Networking
14 Source0:        http://download.netsurf-browser.org/netsurf/releases/source/%{name}-%{version}-src.tar.gz
15 # Source0-md5:  b83932b311716054a5189f121cdd5fd4
16 Source1:        %{name}.desktop
17 Patch0:         nsfb-ldflags.patch
18 Patch1:         %{name}-link.patch
19 Patch2:         no-Werror.patch
20 URL:            http://netsurf-browser.org/
21 BuildRequires:  curl-devel
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
26 BuildRequires:  libCSS-devel >= 0.3.0
27 BuildRequires:  libdom-devel >= 0.1.0
28 BuildRequires:  libglade2-devel
29 %{?with_pdf:BuildRequires:      libharu-devel}
30 BuildRequires:  libhubbub-devel >= 0.3.0
31 BuildRequires:  libjpeg-devel
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
36 BuildRequires:  libpng-devel
37 BuildRequires:  librsvg-devel
38 BuildRequires:  libsvgtiny-devel >= 0.1.1
39 BuildRequires:  libwapcaplet-devel >= 0.2.1
40 %{?with_webp:BuildRequires:     libwebp-devel}
41 BuildRequires:  openssl-devel
42 BuildRequires:  netsurf-buildsystem >= 1.1
43 BuildRequires:  nsgenbind >= 0.1.0
44 BuildRequires:  perl-HTML-Parser
45 BuildRequires:  pkgconfig
46 BuildRequires:  sed >= 4.0
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
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.
58
59 %package common
60 Summary:        NetSurf - common files
61 Summary(pl.UTF-8):      NetSurf - pliki wspólne
62 Group:          Applications/Networking
63
64 %description common
65 NetSurf - common files.
66
67 %description common -l pl.UTF-8
68 NetSurf - wspólne pliki.
69
70 %package gtk
71 Summary:        NetSurf web browser - GTK+ version
72 Summary(pl.UTF-8):      Wersja GTK+ przeglądarki WWW NetSurf
73 Group:          Applications/Networking
74 Requires:       %{name}-common = %{version}-%{release}
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
83
84 %description gtk
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.
90
91 %description gtk -l pl.UTF-8
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.
95
96 Ten pakiet zawiera wersję GTK+.
97
98 %package sdl
99 Summary:        NetSurf web browser - SDL version
100 Summary(pl.UTF-8):      Wersja SDL przeglądarki WWW NetSurf
101 Group:          Applications/Networking
102 Requires:       %{name}-common = %{version}-%{release}
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
112
113 %description sdl
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.
119
120 %description sdl -l pl.UTF-8
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.
124
125 Ten pakiet zawiera wersję SDL.
126
127 %prep
128 %setup -q
129 %patch0 -p1
130 %patch1 -p1
131 %patch2 -p1
132
133 cat << EOF > Makefile.config
134 NETSURF_FB_FONTLIB := freetype
135 NETSURF_FB_FONTPATH := %{_datadir}/fonts/TTF
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}
141 EOF
142
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
148 %build
149 export CC="%{__cc}"
150 # while cxx not needed, somewhy it helps race condition on carme build
151 export CXX="%{__cxx}"
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]
155 export CFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable"
156 export LDFLAGS="%{rpmldflags}"
157
158 # make -j1 or it won't find libwapcaplet/libwapcaplet.h
159
160 %{__make} -j1 \
161         PREFIX=%{_prefix} \
162         Q='' \
163         TARGET=gtk
164
165 %{__make} -j1 \
166         PREFIX=%{_prefix} \
167         Q='' \
168         TARGET=framebuffer
169
170 %install
171 rm -rf $RPM_BUILD_ROOT
172 %{__make} install \
173         Q='' \
174         PREFIX=%{_prefix} \
175         TARGET=gtk \
176         DESTDIR=$RPM_BUILD_ROOT
177
178
179 %{__make} install \
180         Q='' \
181         PREFIX=%{_prefix} \
182         TARGET=framebuffer \
183         DESTDIR=$RPM_BUILD_ROOT
184
185 # this is binary from last "make install", we install more specific binary ourself
186 %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/netsurf
187
188 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
189 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
190 install nsfb $RPM_BUILD_ROOT%{_bindir}
191 install nsgtk $RPM_BUILD_ROOT%{_bindir}
192
193 %clean
194 rm -rf $RPM_BUILD_ROOT
195
196 %files common
197 %defattr(644,root,root,755)
198 %doc COPYING README
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
This page took 0.059212 seconds and 2 git commands to generate.