]> git.pld-linux.org Git - packages/chromium-browser.git/blame - chromium-browser.spec
- added R: xdg-utils (merged from chromium-browser-bin.spec), thx grizz
[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
8%bcond_with system_ffmpeg # with system ffmpeg_mt
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)
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# - use nosource until the package is ready to be stbr, no point poisioning distfiles
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
7375c3b2
ER
26%define svndate 20100323
27%define svnver 42303
ea5832be 28%define rel 1
11ad81c4 29
11ad81c4 30Summary: A WebKit powered web browser
05f72ae2 31Name: chromium-browser
7375c3b2 32Version: 5.0.360.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
7375c3b2 37# Source0-md5: d23ef524587c78be4948f15b86afbeb3
8b53130d
ER
38Source2: %{name}.sh
39Source3: %{name}.desktop
589d90ea 40Source4: find-lang.sh
48b341f5 41Patch0: system-libs.patch
42Patch1: plugin-searchdirs.patch
43Patch2: gyp-system-minizip.patch
93007b7e
AM
44# http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/annotate/head%3A/debian/patches/html5_video_mimetypes.patch
45Patch3: %{name}-html5-video-mimetypes.patch
48b341f5 46Patch5: options-support.patch
47Patch11: memory_details-iceweasel.patch
48Patch12: libpng14.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
f1b276d4 67BuildRequires: libxml2-devel
11ad81c4 68BuildRequires: libxslt-devel
f1b276d4 69BuildRequires: lzma
11ad81c4 70BuildRequires: minizip-devel
05f72ae2 71BuildRequires: nspr-devel
f1b276d4
ER
72BuildRequires: nss-devel >= 1:3.12.3
73BuildRequires: pango-devel
48b341f5 74BuildRequires: perl-modules
75BuildRequires: pkgconfig
f1b276d4 76BuildRequires: python
6a741a97 77# grep gyp.googlecode.com src/DEPS | cut -d'"' -f2 | cut -d@ -f2
7e909083 78BuildRequires: python-gyp >= 0.1-790
48b341f5 79BuildRequires: python-modules
f1b276d4
ER
80BuildRequires: rpmbuild(macros) >= 1.453
81BuildRequires: sqlite3-devel >= 3.6.1
e79c688f 82%{?with_system_v8:BuildRequires: v8-devel}
f1b276d4
ER
83BuildRequires: xorg-lib-libXScrnSaver-devel
84%{?with_system_zlib:BuildRequires: zlib-devel}
e53ecfb5 85Requires: browser-plugins >= 2.0
50cb20c7 86Requires: xdg-utils
e53ecfb5 87Provides: wwwbrowser
2351db3b 88ExclusiveArch: %{ix86} %{x8664} arm
11ad81c4 89BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
11ad81c4 90
589d90ea
ER
91%define find_lang sh find-lang.sh %{buildroot}
92
6b113615
ER
93%if %{without debuginfo}
94%define _enable_debug_packages 0
95%endif
96
11ad81c4
AM
97%description
98Chromium is an open-source web browser, powered by WebKit.
99
f1b276d4
ER
100%package inspector
101Summary: Page inspector for the chromium-browser
102Group: Development/Tools
103Requires: %{name} = %{version}-%{release}
05f72ae2 104
f1b276d4
ER
105%description inspector
106Chromium is an open-source browser project that aims to build a safer,
107faster, and more stable way for all Internet users to experience the
108web.
109
110This package contains 'inspector', allowing web developpers to inspect
111any element of a web page at runtime (html, javascript, css, ..)
112
f7bd23a5
ER
113%package bookmark_manager
114Summary: Bookmark manager for the chromium-browser
8aad0df6 115Group: X11/Applications/Networking
f7bd23a5
ER
116Requires: %{name} = %{version}-%{release}
117
118%description bookmark_manager
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 bookmark manager for the chromium-browser.
124
f1b276d4
ER
125%package l10n
126Summary: chromium-browser language packages
127Group: I18n
128Requires: %{name} = %{version}-%{release}
129
130%description l10n
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 language packages for 50 languages:
136
137ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr,
138gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or,
139pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi,
140zh-CN, zh-TW
141
142%prep
143%setup -q -n %{name}-%{version}~svn%{svndate}r%{svnver}
144lzma -dc %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma | tar x
145rm -f %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma
589d90ea 146
05f72ae2
ER
147# Google's versioning is interesting. They never reset "BUILD", which is how we jumped
148# from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
0c480b89
ER
149. ./src/chrome/VERSION
150ver=$MAJOR.$MINOR.$BUILD.$PATCH
05f72ae2
ER
151if [ "$ver" != %{version} ]; then
152 exit 1
153fi
154
f1b276d4
ER
155# Populate the LASTCHANGE file template as we no longer have the VCS files at this point
156echo "%{svnver}" > src/build/LASTCHANGE.in
157
158sed -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
159
05f72ae2
ER
160%patch0 -p1
161%patch1 -p1
162%patch2 -p1
93007b7e 163%patch3 -p0
05f72ae2 164%patch5 -p1
ed58dfe0 165%patch11 -p1
f1b276d4 166%patch12 -p1
0c480b89 167
e266589e 168%build
f1b276d4
ER
169cd src
170%{__python} build/gyp_chromium --format=make build/all.gyp \
171%ifarch %{ix86}
172 -Dtarget_arch=ia32 \
173%endif
174%ifarch %{x8664}
0c480b89
ER
175 -Dtarget_arch=x64 \
176%endif
f1b276d4
ER
177%if "%{cc_version}" >= "4.4.0"
178 -Dno_strict_aliasing=1 -Dgcc_version=44 \
179%endif
180%if %{with sandboxing}
181 -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \
182 -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \
183%endif
184 %{!?debug:-Dwerror=} \
185 %{?with_shared_libs:-Dlibrary=shared_library} \
186 -Djavascript_engine=%{?with_system_v8:system-v8}%{!?with_system_v8:v8} \
0c480b89 187 -Duse_system_bzip2=1 \
f1b276d4
ER
188 -Duse_system_ffmpeg=%{?with_system_ffmpeg:1}%{!?with_system_ffmpeg:0} \
189 -Duse_system_libevent=1 \
0c480b89 190 -Duse_system_libjpeg=1 \
f1b276d4
ER
191 -Duse_system_libpng=1 \
192 -Duse_system_libxml=1 \
193 -Duse_system_libxslt=1 \
194 -Duse_system_sqlite=%{?with_system_sqlite:1}%{!?with_system_sqlite:0} \
195 -Duse_system_zlib=%{?with_system_zlib:1}%{!?with_system_zlib:0} \
196%if %{with arch}
197-Duse_system_yasm=1 \
198 -Dffmpeg_branding=Chrome \
199%endif
0c480b89
ER
200%if %{with selinux}
201 -Dselinux=1 \
202%endif
11ad81c4 203
f1b276d4
ER
204%{__make} chrome %{?with_sandboxing:chrome_sandbox} \
205 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
206 %{?with_verbose:V=1} \
207 CC="%{__cc}" \
208 CXX="%{__cxx}" \
209 CC.host="%{__cc}" \
210 CXX.host="%{__cxx}" \
211 CFLAGS="%{rpmcflags}" \
212 CXXFLAGS="%{rpmcxxflags}"
11ad81c4
AM
213
214%install
215rm -rf $RPM_BUILD_ROOT
f1b276d4 216install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/{themes,locales,plugins,extensions,resources},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
e266589e 217
f1b276d4
ER
218cd src/out/%{!?debug:Release}%{?debug:Debug}
219
220install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
221%{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
222cp -a chrome.pak $RPM_BUILD_ROOT%{_libdir}/%{name}
223cp -a locales/*.pak $RPM_BUILD_ROOT%{_libdir}/%{name}/locales
224cp -a resources/* $RPM_BUILD_ROOT%{_libdir}/%{name}/resources
225find $RPM_BUILD_ROOT%{_libdir}/%{name}/resources -name '*.d' | xargs rm
226cp -a chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
227cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
228install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}
e53ecfb5 229install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
f1b276d4
ER
230install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
231install -p xdg-settings $RPM_BUILD_ROOT%{_libdir}/%{name}
232cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
0c480b89
ER
233cd -
234
13840bc2
AM
235%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
236# http://code.google.com/p/chromium/issues/detail?id=24507
237gecko-mediaplayer*.so
238EOF
11ad81c4 239
589d90ea
ER
240# find locales
241%find_lang %{name}.lang
f1b276d4 242%{__sed} -i -e '/en-US.pak/d' %{name}.lang
589d90ea 243
11ad81c4
AM
244%clean
245rm -rf $RPM_BUILD_ROOT
246
f1b276d4
ER
247%post
248%update_browser_plugins
249
250%postun
251if [ "$1" = 0 ]; then
252 %update_browser_plugins
253fi
254
589d90ea 255%files -f %{name}.lang
11ad81c4 256%defattr(644,root,root,755)
f1b276d4
ER
257%{_browserpluginsconfdir}/browsers.d/%{name}.*
258%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
259%attr(755,root,root) %{_bindir}/%{name}
260%{_mandir}/man1/%{name}.1*
261%{_pixmapsdir}/%{name}.png
11ad81c4 262%{_desktopdir}/*.desktop
0c480b89
ER
263%dir %{_libdir}/%{name}
264%{_libdir}/%{name}/chrome.pak
589d90ea 265%dir %{_libdir}/%{name}/locales
f1b276d4
ER
266%{_libdir}/%{name}/locales/en-US.pak
267%dir %{_libdir}/%{name}/resources
268%dir %{_libdir}/%{name}/themes
269%dir %{_libdir}/%{name}/extensions
270%dir %{_libdir}/%{name}/plugins
271%attr(755,root,root) %{_libdir}/%{name}/%{name}
0c480b89 272# These unique permissions are intentional and necessary for the sandboxing
e53ecfb5 273%attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox
f1b276d4
ER
274
275# ffmpeg libs
276%attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
277
278# bundle this copy until xdg-utils will have this itself
279%attr(755,root,root) %{_libdir}/%{name}/xdg-settings
280
281%files inspector
282%defattr(644,root,root,755)
283%{_libdir}/%{name}/resources/inspector
284
f7bd23a5
ER
285%files bookmark_manager
286%defattr(644,root,root,755)
287%{_libdir}/%{name}/resources/bookmark_manager
288
f1b276d4
ER
289%files l10n -f %{name}.lang
290%defattr(644,root,root,755)
This page took 0.121538 seconds and 4 git commands to generate.