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