]> git.pld-linux.org Git - packages/netsurf.git/blob - netsurf.spec
- enabled gstreamer and webp support (with bconds)
[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:        1
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 URL:            http://netsurf-browser.org/
20 BuildRequires:  curl-devel
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
25 BuildRequires:  libCSS-devel >= 0.3.0
26 BuildRequires:  libdom-devel >= 0.1.0
27 BuildRequires:  libglade2-devel
28 %{?with_pdf:BuildRequires:      libharu-devel}
29 BuildRequires:  libhubbub-devel >= 0.3.0
30 BuildRequires:  libjpeg-devel
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
35 BuildRequires:  libpng-devel
36 BuildRequires:  librsvg-devel
37 BuildRequires:  libsvgtiny-devel >= 0.1.1
38 BuildRequires:  libwapcaplet-devel >= 0.2.1
39 %{?with_webp:BuildRequires:     libwebp-devel}
40 BuildRequires:  openssl-devel
41 BuildRequires:  netsurf-buildsystem >= 1.1
42 BuildRequires:  nsgenbind >= 0.1.0
43 BuildRequires:  perl-HTML-Parser
44 BuildRequires:  pkgconfig
45 BuildRequires:  sed >= 4.0
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
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.
57
58 %package common
59 Summary:        NetSurf - common files
60 Summary(pl.UTF-8):      NetSurf - pliki wspólne
61 Group:          Applications/Networking
62
63 %description common
64 NetSurf - common files.
65
66 %description common -l pl.UTF-8
67 NetSurf - wspólne pliki.
68
69 %package gtk
70 Summary:        NetSurf web browser - GTK+ version
71 Summary(pl.UTF-8):      Wersja GTK+ przeglądarki WWW NetSurf
72 Group:          Applications/Networking
73 Requires:       %{name}-common = %{version}-%{release}
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
82
83 %description gtk
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.
89
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+.
96
97 %package sdl
98 Summary:        NetSurf web browser - SDL version
99 Summary(pl.UTF-8):      Wersja SDL przeglądarki WWW NetSurf
100 Group:          Applications/Networking
101 Requires:       %{name}-common = %{version}-%{release}
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
111
112 %description sdl
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.
118
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.
125
126 %prep
127 %setup -q
128 %patch0 -p1
129 %patch1 -p1
130
131 cat << EOF > Makefile.config
132 NETSURF_FB_FONTLIB := freetype
133 NETSURF_FB_FONTPATH := %{_datadir}/fonts/TTF
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}
139 EOF
140
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
146 %build
147 export CC="%{__cc}"
148 # while cxx not needed, somewhy it helps race condition on carme build
149 export CXX="%{__cxx}"
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]
153 export CFLAGS="%{rpmcflags} -Wno-error=unused-but-set-variable"
154 export LDFLAGS="%{rpmldflags}"
155
156 # make -j1 or it won't find libwapcaplet/libwapcaplet.h
157
158 %{__make} -j1 \
159         PREFIX=%{_prefix} \
160         Q='' \
161         TARGET=gtk
162
163 %{__make} -j1 \
164         PREFIX=%{_prefix} \
165         Q='' \
166         TARGET=framebuffer
167
168 %install
169 rm -rf $RPM_BUILD_ROOT
170 %{__make} install \
171         Q='' \
172         PREFIX=%{_prefix} \
173         TARGET=gtk \
174         DESTDIR=$RPM_BUILD_ROOT
175
176
177 %{__make} install \
178         Q='' \
179         PREFIX=%{_prefix} \
180         TARGET=framebuffer \
181         DESTDIR=$RPM_BUILD_ROOT
182
183 # this is binary from last "make install", we install more specific binary ourself
184 %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/netsurf
185
186 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
187 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
188 install nsfb $RPM_BUILD_ROOT%{_bindir}
189 install nsgtk $RPM_BUILD_ROOT%{_bindir}
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %files common
195 %defattr(644,root,root,755)
196 %doc COPYING README
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
This page took 0.065975 seconds and 3 git commands to generate.