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