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