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