]> git.pld-linux.org Git - packages/chromium-browser.git/blame - chromium-browser.spec
- typo
[packages/chromium-browser.git] / chromium-browser.spec
CommitLineData
0c480b89
ER
1#
2# Conditional build:
f1b276d4 3%bcond_with verbose # verbose build (V=1)
0c480b89 4%bcond_with selinux # with SELinux (need policy first)
f1b276d4
ER
5%bcond_with system_v8 # with system v8
6%bcond_without system_zlib # with system zlib
7%bcond_with system_sqlite # with system sqlite
37b05e5e 8%bcond_without ffmpegsumo # build with ffmpegsumo
f1b276d4
ER
9%bcond_without sandboxing # with sandboxing
10%bcond_with shared_libs # with shared libs
6b113615 11%bcond_without debuginfo # disable debuginfo creation (it is huge)
0c480b89 12
6d92f81c 13# TODO
f1b276d4 14# - check system sqlite linking problems
2351db3b 15
e53ecfb5 16# NOTES:
4fe038cb
ER
17# - mute BEEP mixer if you do not want to hear horrible system bell when
18# pressing home/end in url bar or more ^F search results on page.
f1b276d4
ER
19# - build i686: -bp: ~570MB; bc: ~928MB; -bb: ~1.0GB
20# - build x86_64: -bp: ~570MB; bc: ~990MB; -bb: ~1.0GB
21# - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
84fa20a9 22# - to look for new tarball, use update-source.sh script
f1b276d4 23
dd46de65
KK
24%define svndate 20100731
25%define svnver 54421
26%define rel 1
11ad81c4 27
11ad81c4 28Summary: A WebKit powered web browser
05f72ae2 29Name: chromium-browser
dd46de65 30Version: 6.0.481.0
84fa20a9 31Release: %{svnver}.%{rel}
05f72ae2 32License: BSD, LGPL v2+ (ffmpeg)
e53ecfb5 33Group: X11/Applications/Networking
f1b276d4 34Source0: http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/pool/main/c/chromium-browser/%{name}_%{version}~svn%{svndate}r%{svnver}.orig.tar.gz
dd46de65 35# Source0-md5: 239297ddca56723554a954c24e247605
8b53130d
ER
36Source2: %{name}.sh
37Source3: %{name}.desktop
589d90ea 38Source4: find-lang.sh
fe043a0f 39Source5: update-source.sh
48b341f5 40Patch0: system-libs.patch
41Patch1: plugin-searchdirs.patch
42Patch2: gyp-system-minizip.patch
7b454a31
AM
43Patch3: disable_dlog_and_dcheck_in_release_builds.patch.diff
44# http://aur.archlinux.org/packages/chromium-browser-svn/chromium-browser-svn/search-workaround.patch
45Patch4: search-workaround.patch
48b341f5 46Patch5: options-support.patch
97fac491 47Patch6: gcc45.patch
f1b276d4 48URL: http://code.google.com/chromium/
05f72ae2 49BuildRequires: GConf2-devel
f1b276d4 50BuildRequires: OpenGL-GLU-devel
05f72ae2
ER
51BuildRequires: alsa-lib-devel
52BuildRequires: atk-devel
53BuildRequires: bison
11ad81c4 54BuildRequires: bzip2-devel
0826c245 55BuildRequires: cups-devel
05f72ae2 56BuildRequires: dbus-devel
11ad81c4 57BuildRequires: flex
11ad81c4 58BuildRequires: fontconfig-devel
f1b276d4 59BuildRequires: glib2-devel
05f72ae2 60BuildRequires: gperf
8b53130d 61BuildRequires: gtk+2-devel
05f72ae2 62BuildRequires: libevent-devel
176c22e6 63BuildRequires: libgnome-keyring-devel
05f72ae2
ER
64BuildRequires: libjpeg-devel
65BuildRequires: libpng-devel
e266589e 66%{?with_selinux:BuildRequires: libselinux-devel}
05f72ae2 67BuildRequires: libstdc++-devel
8a510a35 68BuildRequires: libvpx-devel
f1b276d4 69BuildRequires: libxml2-devel
11ad81c4 70BuildRequires: libxslt-devel
f1b276d4 71BuildRequires: lzma
11ad81c4 72BuildRequires: minizip-devel
05f72ae2 73BuildRequires: nspr-devel
f1b276d4
ER
74BuildRequires: nss-devel >= 1:3.12.3
75BuildRequires: pango-devel
48b341f5 76BuildRequires: perl-modules
77BuildRequires: pkgconfig
f1b276d4 78BuildRequires: python
6a741a97 79# grep gyp.googlecode.com src/DEPS | cut -d'"' -f2 | cut -d@ -f2
37b05e5e 80BuildRequires: python-gyp >= 0.1-795
48b341f5 81BuildRequires: python-modules
f1b276d4
ER
82BuildRequires: rpmbuild(macros) >= 1.453
83BuildRequires: sqlite3-devel >= 3.6.1
e79c688f 84%{?with_system_v8:BuildRequires: v8-devel}
0826c245 85BuildRequires: which
f1b276d4 86BuildRequires: xorg-lib-libXScrnSaver-devel
196ee8b4 87BuildRequires: yasm
f1b276d4 88%{?with_system_zlib:BuildRequires: zlib-devel}
e53ecfb5 89Requires: browser-plugins >= 2.0
50cb20c7 90Requires: xdg-utils
e53ecfb5 91Provides: wwwbrowser
031a146c 92Obsoletes: chromium-browser-bookmark_manager
2351db3b 93ExclusiveArch: %{ix86} %{x8664} arm
11ad81c4 94BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
11ad81c4 95
589d90ea
ER
96%define find_lang sh find-lang.sh %{buildroot}
97
6b113615
ER
98%if %{without debuginfo}
99%define _enable_debug_packages 0
100%endif
101
11ad81c4 102%description
80838854
ER
103Chromium is an open-source browser project that aims to build a safer,
104faster, and more stable way for all Internet users to experience the
105web.
106
107Chromium serves as a base for Google Chrome, which is Chromium
108rebranded (name and logo) with very few additions such as usage
109tracking and an auto-updater system.
110
111This package contains the Chromium browser.
11ad81c4 112
f1b276d4
ER
113%package inspector
114Summary: Page inspector for the chromium-browser
115Group: Development/Tools
116Requires: %{name} = %{version}-%{release}
05f72ae2 117
f1b276d4
ER
118%description inspector
119Chromium is an open-source browser project that aims to build a safer,
120faster, and more stable way for all Internet users to experience the
121web.
122
123This package contains 'inspector', allowing web developpers to inspect
124any element of a web page at runtime (html, javascript, css, ..)
125
126%package l10n
127Summary: chromium-browser language packages
128Group: I18n
129Requires: %{name} = %{version}-%{release}
130
131%description l10n
132Chromium is an open-source browser project that aims to build a safer,
133faster, and more stable way for all Internet users to experience the
134web.
135
136This package contains language packages for 50 languages:
137
138ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr,
139gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or,
140pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi,
141zh-CN, zh-TW
142
143%prep
144%setup -q -n %{name}-%{version}~svn%{svndate}r%{svnver}
145lzma -dc %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma | tar x
146rm -f %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma
589d90ea 147
05f72ae2
ER
148# Google's versioning is interesting. They never reset "BUILD", which is how we jumped
149# from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
0c480b89
ER
150. ./src/chrome/VERSION
151ver=$MAJOR.$MINOR.$BUILD.$PATCH
05f72ae2
ER
152if [ "$ver" != %{version} ]; then
153 exit 1
154fi
155
f1b276d4
ER
156# Populate the LASTCHANGE file template as we no longer have the VCS files at this point
157echo "%{svnver}" > src/build/LASTCHANGE.in
158
159sed -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
160
05f72ae2
ER
161%patch0 -p1
162%patch1 -p1
163%patch2 -p1
7b454a31 164%patch3 -p0
97fac491 165%patch4 -p1
05f72ae2 166%patch5 -p1
97fac491 167%patch6 -p1
0c480b89 168
828bdd1a
AM
169# drop bundled libs, from gentoo
170remove_bundled_lib() {
97fac491
ER
171 echo "Removing bundled library $1 ..."
172 local out
173 out=$(find $1 -mindepth 1 ! -iname '*.gyp' -print -delete)
174 if [ -z "$out" ]; then
175 echo >&2 "No files matched when removing bundled library $1"
176 exit 1
177 fi
828bdd1a
AM
178}
179
180cd src
181remove_bundled_lib "third_party/bzip2"
182remove_bundled_lib "third_party/libevent"
183remove_bundled_lib "third_party/libjpeg"
184remove_bundled_lib "third_party/libpng"
185remove_bundled_lib "third_party/libxml"
186remove_bundled_lib "third_party/libxslt"
6ff7cc9f 187remove_bundled_lib "third_party/zlib"
828bdd1a 188
e266589e 189%build
f1b276d4
ER
190cd src
191%{__python} build/gyp_chromium --format=make build/all.gyp \
192%ifarch %{ix86}
193 -Dtarget_arch=ia32 \
194%endif
195%ifarch %{x8664}
0c480b89
ER
196 -Dtarget_arch=x64 \
197%endif
7b454a31
AM
198%if "%{cc_version}" >= "4.4.0" && "%{cc_version}" < "4.5.0"
199 -Dno_strict_aliasing=1 -Dgcc_version=44 \
f1b276d4
ER
200%endif
201%if %{with sandboxing}
202 -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \
203 -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \
204%endif
205 %{!?debug:-Dwerror=} \
206 %{?with_shared_libs:-Dlibrary=shared_library} \
207 -Djavascript_engine=%{?with_system_v8:system-v8}%{!?with_system_v8:v8} \
37b05e5e 208 -Dbuild_ffmpegsumo=%{?with_ffmpegsumo:1}%{!?with_ffmpegsumo:0} \
0c480b89 209 -Duse_system_bzip2=1 \
f1b276d4 210 -Duse_system_libevent=1 \
0c480b89 211 -Duse_system_libjpeg=1 \
f1b276d4
ER
212 -Duse_system_libpng=1 \
213 -Duse_system_libxml=1 \
214 -Duse_system_libxslt=1 \
215 -Duse_system_sqlite=%{?with_system_sqlite:1}%{!?with_system_sqlite:0} \
216 -Duse_system_zlib=%{?with_system_zlib:1}%{!?with_system_zlib:0} \
888c00c4 217 -Duse_system_vpx=1 \
37b05e5e 218 -Duse_system_yasm=1 \
f1b276d4 219 -Dffmpeg_branding=Chrome \
a5bbd1d5 220 -Dproprietary_codecs=1 \
0c480b89
ER
221%if %{with selinux}
222 -Dselinux=1 \
223%endif
11ad81c4 224
f1b276d4
ER
225%{__make} chrome %{?with_sandboxing:chrome_sandbox} \
226 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
227 %{?with_verbose:V=1} \
228 CC="%{__cc}" \
229 CXX="%{__cxx}" \
230 CC.host="%{__cc}" \
231 CXX.host="%{__cxx}" \
7b454a31
AM
232 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
233 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}"
11ad81c4
AM
234
235%install
236rm -rf $RPM_BUILD_ROOT
f1b276d4 237install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/{themes,locales,plugins,extensions,resources},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
e266589e 238
f1b276d4
ER
239cd src/out/%{!?debug:Release}%{?debug:Debug}
240
241install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
242%{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
97fac491 243cp -a *.pak locales resources $RPM_BUILD_ROOT%{_libdir}/%{name}
f1b276d4
ER
244cp -a chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
245cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
246install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}
e53ecfb5 247install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
d561483d 248%if %{with ffmpegsumo}
f1b276d4 249install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
dd46de65 250%endif
f1b276d4
ER
251install -p xdg-settings $RPM_BUILD_ROOT%{_libdir}/%{name}
252cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
0c480b89
ER
253cd -
254
13840bc2
AM
255%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
256# http://code.google.com/p/chromium/issues/detail?id=24507
257gecko-mediaplayer*.so
258EOF
11ad81c4 259
589d90ea
ER
260# find locales
261%find_lang %{name}.lang
f1b276d4 262%{__sed} -i -e '/en-US.pak/d' %{name}.lang
589d90ea 263
11ad81c4
AM
264%clean
265rm -rf $RPM_BUILD_ROOT
266
f1b276d4
ER
267%post
268%update_browser_plugins
269
270%postun
271if [ "$1" = 0 ]; then
272 %update_browser_plugins
273fi
274
589d90ea 275%files -f %{name}.lang
11ad81c4 276%defattr(644,root,root,755)
f1b276d4
ER
277%{_browserpluginsconfdir}/browsers.d/%{name}.*
278%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
279%attr(755,root,root) %{_bindir}/%{name}
280%{_mandir}/man1/%{name}.1*
281%{_pixmapsdir}/%{name}.png
11ad81c4 282%{_desktopdir}/*.desktop
0c480b89
ER
283%dir %{_libdir}/%{name}
284%{_libdir}/%{name}/chrome.pak
97fac491 285%{_libdir}/%{name}/resources.pak
589d90ea 286%dir %{_libdir}/%{name}/locales
f1b276d4
ER
287%{_libdir}/%{name}/locales/en-US.pak
288%dir %{_libdir}/%{name}/resources
289%dir %{_libdir}/%{name}/themes
290%dir %{_libdir}/%{name}/extensions
291%dir %{_libdir}/%{name}/plugins
292%attr(755,root,root) %{_libdir}/%{name}/%{name}
0c480b89 293# These unique permissions are intentional and necessary for the sandboxing
e53ecfb5 294%attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox
f1b276d4
ER
295
296# ffmpeg libs
d561483d 297%if %{with ffmpegsumo}
f1b276d4 298%attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
dd46de65 299%endif
f1b276d4
ER
300
301# bundle this copy until xdg-utils will have this itself
302%attr(755,root,root) %{_libdir}/%{name}/xdg-settings
303
80838854
ER
304%{_libdir}/%{name}/resources/calendar_app
305%{_libdir}/%{name}/resources/docs_app
306%{_libdir}/%{name}/resources/gmail_app
37b05e5e 307
f1b276d4
ER
308%files inspector
309%defattr(644,root,root,755)
310%{_libdir}/%{name}/resources/inspector
311
312%files l10n -f %{name}.lang
313%defattr(644,root,root,755)
This page took 0.131348 seconds and 4 git commands to generate.