]> git.pld-linux.org Git - packages/chromium-browser.git/blame - chromium-browser.spec
- proprietary_codecs makes sense only when ffmpeg_branding is enabled (since branding...
[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)
a9a3376c 12%bcond_without arch # arch asm optimization
0c480b89 13
6d92f81c 14# TODO
f1b276d4 15# - check system sqlite linking problems
99df74ac 16# - enable H264 video support if possible (test: youtube.com/html5 and join html5 there)
763f4746 17# - http://groups.google.com/a/chromium.org/group/chromium-discuss/browse_thread/thread/c82bf49672a213f4/9267df53f5d734c4
2351db3b 18
e53ecfb5 19# NOTES:
4fe038cb
ER
20# - mute BEEP mixer if you do not want to hear horrible system bell when
21# pressing home/end in url bar or more ^F search results on page.
f1b276d4
ER
22# - build i686: -bp: ~570MB; bc: ~928MB; -bb: ~1.0GB
23# - build x86_64: -bp: ~570MB; bc: ~990MB; -bb: ~1.0GB
24# - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
84fa20a9 25# - to look for new tarball, use update-source.sh script
f1b276d4 26
a5bbd1d5
AM
27%define svndate 20100525
28%define svnver 48111
ea5832be 29%define rel 1
11ad81c4 30
11ad81c4 31Summary: A WebKit powered web browser
05f72ae2 32Name: chromium-browser
a5bbd1d5 33Version: 6.0.415.0
84fa20a9 34Release: %{svnver}.%{rel}
05f72ae2 35License: BSD, LGPL v2+ (ffmpeg)
e53ecfb5 36Group: X11/Applications/Networking
f1b276d4 37Source0: http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/pool/main/c/chromium-browser/%{name}_%{version}~svn%{svndate}r%{svnver}.orig.tar.gz
a5bbd1d5 38# Source0-md5: abe44c86fec1f9452aa8c826dd8d6f9c
8b53130d
ER
39Source2: %{name}.sh
40Source3: %{name}.desktop
589d90ea 41Source4: find-lang.sh
fe043a0f 42Source5: update-source.sh
48b341f5 43Patch0: system-libs.patch
44Patch1: plugin-searchdirs.patch
45Patch2: gyp-system-minizip.patch
93007b7e 46# http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/annotate/head%3A/debian/patches/html5_video_mimetypes.patch
48b341f5 47Patch5: options-support.patch
48Patch11: memory_details-iceweasel.patch
f1b276d4 49URL: http://code.google.com/chromium/
05f72ae2 50BuildRequires: GConf2-devel
f1b276d4 51BuildRequires: OpenGL-GLU-devel
05f72ae2
ER
52BuildRequires: alsa-lib-devel
53BuildRequires: atk-devel
54BuildRequires: bison
11ad81c4 55BuildRequires: bzip2-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
ER
62BuildRequires: libevent-devel
63BuildRequires: libjpeg-devel
64BuildRequires: libpng-devel
e266589e 65%{?with_selinux:BuildRequires: libselinux-devel}
05f72ae2 66BuildRequires: libstdc++-devel
8a510a35 67BuildRequires: libvpx-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
05f72ae2 160%patch5 -p1
ed58dfe0 161%patch11 -p1
0c480b89 162
e266589e 163%build
f1b276d4
ER
164cd src
165%{__python} build/gyp_chromium --format=make build/all.gyp \
166%ifarch %{ix86}
167 -Dtarget_arch=ia32 \
168%endif
169%ifarch %{x8664}
0c480b89
ER
170 -Dtarget_arch=x64 \
171%endif
f1b276d4 172%if "%{cc_version}" >= "4.4.0"
8a510a35 173 -Dno_strict_aliasing=1 -Dgcc_version=$(echo %{cc_version} | cut -d. -f1-2 | tr -d .) \
f1b276d4
ER
174%endif
175%if %{with sandboxing}
176 -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \
177 -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \
178%endif
179 %{!?debug:-Dwerror=} \
180 %{?with_shared_libs:-Dlibrary=shared_library} \
181 -Djavascript_engine=%{?with_system_v8:system-v8}%{!?with_system_v8:v8} \
37b05e5e 182 -Dbuild_ffmpegsumo=%{?with_ffmpegsumo:1}%{!?with_ffmpegsumo:0} \
0c480b89 183 -Duse_system_bzip2=1 \
f1b276d4 184 -Duse_system_libevent=1 \
0c480b89 185 -Duse_system_libjpeg=1 \
f1b276d4
ER
186 -Duse_system_libpng=1 \
187 -Duse_system_libxml=1 \
188 -Duse_system_libxslt=1 \
189 -Duse_system_sqlite=%{?with_system_sqlite:1}%{!?with_system_sqlite:0} \
190 -Duse_system_zlib=%{?with_system_zlib:1}%{!?with_system_zlib:0} \
191%if %{with arch}
37b05e5e 192 -Duse_system_yasm=1 \
f1b276d4 193 -Dffmpeg_branding=Chrome \
a5bbd1d5 194 -Dproprietary_codecs=1 \
f1b276d4 195%endif
0c480b89
ER
196%if %{with selinux}
197 -Dselinux=1 \
198%endif
11ad81c4 199
f1b276d4
ER
200%{__make} chrome %{?with_sandboxing:chrome_sandbox} \
201 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
202 %{?with_verbose:V=1} \
203 CC="%{__cc}" \
204 CXX="%{__cxx}" \
205 CC.host="%{__cc}" \
206 CXX.host="%{__cxx}" \
207 CFLAGS="%{rpmcflags}" \
208 CXXFLAGS="%{rpmcxxflags}"
11ad81c4
AM
209
210%install
211rm -rf $RPM_BUILD_ROOT
f1b276d4 212install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/{themes,locales,plugins,extensions,resources},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
e266589e 213
f1b276d4
ER
214cd src/out/%{!?debug:Release}%{?debug:Debug}
215
216install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
217%{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
218cp -a chrome.pak $RPM_BUILD_ROOT%{_libdir}/%{name}
219cp -a locales/*.pak $RPM_BUILD_ROOT%{_libdir}/%{name}/locales
220cp -a resources/* $RPM_BUILD_ROOT%{_libdir}/%{name}/resources
f1b276d4
ER
221cp -a chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
222cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
223install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}
e53ecfb5 224install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
f1b276d4
ER
225install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
226install -p xdg-settings $RPM_BUILD_ROOT%{_libdir}/%{name}
227cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
0c480b89
ER
228cd -
229
13840bc2
AM
230%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
231# http://code.google.com/p/chromium/issues/detail?id=24507
232gecko-mediaplayer*.so
233EOF
11ad81c4 234
589d90ea
ER
235# find locales
236%find_lang %{name}.lang
f1b276d4 237%{__sed} -i -e '/en-US.pak/d' %{name}.lang
589d90ea 238
11ad81c4
AM
239%clean
240rm -rf $RPM_BUILD_ROOT
241
f1b276d4
ER
242%post
243%update_browser_plugins
244
245%postun
246if [ "$1" = 0 ]; then
247 %update_browser_plugins
248fi
249
589d90ea 250%files -f %{name}.lang
11ad81c4 251%defattr(644,root,root,755)
f1b276d4
ER
252%{_browserpluginsconfdir}/browsers.d/%{name}.*
253%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
254%attr(755,root,root) %{_bindir}/%{name}
255%{_mandir}/man1/%{name}.1*
256%{_pixmapsdir}/%{name}.png
11ad81c4 257%{_desktopdir}/*.desktop
0c480b89
ER
258%dir %{_libdir}/%{name}
259%{_libdir}/%{name}/chrome.pak
589d90ea 260%dir %{_libdir}/%{name}/locales
f1b276d4
ER
261%{_libdir}/%{name}/locales/en-US.pak
262%dir %{_libdir}/%{name}/resources
263%dir %{_libdir}/%{name}/themes
264%dir %{_libdir}/%{name}/extensions
265%dir %{_libdir}/%{name}/plugins
266%attr(755,root,root) %{_libdir}/%{name}/%{name}
0c480b89 267# These unique permissions are intentional and necessary for the sandboxing
e53ecfb5 268%attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox
f1b276d4
ER
269
270# ffmpeg libs
271%attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
272
273# bundle this copy until xdg-utils will have this itself
274%attr(755,root,root) %{_libdir}/%{name}/xdg-settings
275
80838854
ER
276%{_libdir}/%{name}/resources/bookmark_manager
277%{_libdir}/%{name}/resources/calendar_app
278%{_libdir}/%{name}/resources/docs_app
279%{_libdir}/%{name}/resources/gmail_app
37b05e5e 280%{_libdir}/%{name}/resources/net_internals
609a73ae 281%{_libdir}/%{name}/resources/shared
37b05e5e 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.134848 seconds and 4 git commands to generate.