]> git.pld-linux.org Git - packages/chromium-browser.git/blame - chromium-browser.spec
- lib64 and permissions fix
[packages/chromium-browser.git] / chromium-browser.spec
CommitLineData
0c480b89
ER
1#
2# Conditional build:
3%bcond_with selinux # with SELinux (need policy first)
4
6d92f81c
ER
5# TODO
6# - spec vs name
7# - merge google-chromium.spec vs chromium-browser.spec -- one must go
2351db3b
ER
8# - optflags and strip (-debuginfo is quite empty)
9
10# NOTE: keep eye on spec from http://spot.fedorapeople.org/chromium/
11ad81c4 11
05f72ae2
ER
12%define svndate 20090916
13%define svnver svn26424
11ad81c4 14Summary: A WebKit powered web browser
05f72ae2
ER
15Name: chromium-browser
16Version: 4.0.212.0
11ad81c4 17Release: 0.1.%{svndate}%{svnver}%{?dist}
05f72ae2 18License: BSD, LGPL v2+ (ffmpeg)
11ad81c4 19Group: Applications/Networking
05f72ae2
ER
20Patch0: system-libs.patch
21Patch1: system-libs-gyp.patch
22Patch2: gyp-system-minizip.patch
23Patch3: noffmpeg.patch
24Patch5: options-support.patch
25Patch6: 64bit-plugin-path.patch
26Patch7: gyp-system-icu.patch
27Patch8: icu-code-changes.patch
28Patch9: no-sqlite-debug.patch
29Patch10: debug_util_posix-fix.patch
30Source0: chromium-%{svndate}%{svnver}.tar.bz2
31# Source0-md5: 20663b974249b35d7ab655ce21b8f868
11ad81c4
AM
32# Custom build tools for chromium, hammer is a fancy front-end for scons
33Source1: http://src.chromium.org/svn/trunk/tools/depot_tools.tar.gz
a3d155c9 34# Source1-md5: 1f821101d5a6f26345dc22ae5e0cbe1e
8b53130d
ER
35Source2: %{name}.sh
36Source3: %{name}.desktop
11ad81c4 37# We don't actually use this in the build, but it is included so you can make the tarball.
8b53130d 38Source4: chromium-daily-tarball.sh
05f72ae2
ER
39BuildRequires: GConf2-devel
40BuildRequires: alsa-lib-devel
41BuildRequires: atk-devel
42BuildRequires: bison
11ad81c4 43BuildRequires: bzip2-devel
05f72ae2 44BuildRequires: dbus-devel
11ad81c4 45BuildRequires: desktop-file-utils
11ad81c4 46BuildRequires: flex
11ad81c4 47BuildRequires: fontconfig-devel
05f72ae2 48BuildRequires: gperf
8b53130d 49BuildRequires: gtk+2-devel
05f72ae2 50BuildRequires: libevent-devel
2351db3b 51BuildRequires: libicu-devel >= 4.2.1-2
05f72ae2
ER
52BuildRequires: libjpeg-devel
53BuildRequires: libpng-devel
e266589e 54%{?with_selinux:BuildRequires: libselinux-devel}
05f72ae2 55BuildRequires: libstdc++-devel
11ad81c4 56BuildRequires: libxslt-devel
11ad81c4 57BuildRequires: minizip-devel
05f72ae2
ER
58BuildRequires: nspr-devel
59BuildRequires: nss-devel
60BuildRequires: scons
61BuildRequires: v8-devel
2351db3b 62ExclusiveArch: %{ix86} %{x8664} arm
11ad81c4 63BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
11ad81c4
AM
64
65%description
66Chromium is an open-source web browser, powered by WebKit.
67
68%prep
0c480b89 69%setup -q -n chromium-%{svndate}%{svnver} -a 1
05f72ae2 70
05f72ae2
ER
71# Google's versioning is interesting. They never reset "BUILD", which is how we jumped
72# from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
0c480b89
ER
73. ./src/chrome/VERSION
74ver=$MAJOR.$MINOR.$BUILD.$PATCH
05f72ae2
ER
75if [ "$ver" != %{version} ]; then
76 exit 1
77fi
78
05f72ae2
ER
79%patch0 -p1
80%patch1 -p1
81%patch2 -p1
82%patch3 -p1
83%patch5 -p1
84%patch6 -p1
85%patch7 -p1
86%patch8 -p1
87%patch9 -p1
88%patch10 -p1
11ad81c4
AM
89
90# Scrape out incorrect optflags and hack in the correct ones
0c480b89
ER
91find -name '*\.scons' | xargs %{__sed} -i -e "
92 s|'-march=pentium4',||g
93 s|'-msse2',||g
94 s|'-mfpmath=sse',||g
95 s|'-m32',||g
96 s|'-O0',|'%{rpmcxxflags}'.split(' ')|g
97"
98
e266589e
ER
99%build
100cd src/build
101
0c480b89
ER
102# Regenerate the scons files
103# Also, set the sandbox paths correctly.
0c480b89
ER
104./gyp_chromium all.gyp \
105 -D linux_sandbox_path=%{_libdir}/%{name}/chrome-sandbox \
106 -D linux_sandbox_chrome_path=%{_libdir}/%{name}/chromium-browser \
107%ifarch x86_64
108 -Dtarget_arch=x64 \
109%endif
110 -Duse_system_libpng=1 \
111 -Duse_system_bzip2=1 \
112 -Duse_system_libjpeg=1 \
113 -Duse_system_zlib=1 \
114%if %{with selinux}
115 -Dselinux=1 \
116%endif
117 -Djavascript_engine=v8
11ad81c4 118
0c480b89
ER
119# If we're building sandbox without SELINUX, add "chrome_sandbox" here.
120%if %{with selinux}
121../../depot_tools/hammer --mode=Release chrome
122%else
11ad81c4 123../../depot_tools/hammer --mode=Release chrome chrome_sandbox
0c480b89 124%endif
11ad81c4
AM
125
126%install
127rm -rf $RPM_BUILD_ROOT
e266589e
ER
128install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_pixmapsdir},%{_desktopdir}}
129
0c480b89 130cd src/sconsbuild/Release
e266589e 131install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/chromium-browser
6d27f06b
ER
132%if "%{_lib}" != "lib"
133%{__sed} -i -e 's,/usr/lib,%{_libdir},' $RPM_BUILD_ROOT%{_bindir}/chromium-browser
134%endif
0c480b89
ER
135cp -a chrome.pak locales resources themes $RPM_BUILD_ROOT%{_libdir}/%{name}
136cp -a chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-browser
137cp -a chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome-sandbox
138cd -
139
11ad81c4
AM
140cp -a src/chrome/app/theme/chromium/product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/chromium-browser.png
141
11ad81c4
AM
142desktop-file-install --dir $RPM_BUILD_ROOT%{_desktopdir} %{SOURCE3}
143
144%clean
145rm -rf $RPM_BUILD_ROOT
146
147%files
148%defattr(644,root,root,755)
11ad81c4 149%attr(755,root,root) %{_bindir}/chromium-browser
11ad81c4
AM
150%{_pixmapsdir}/chromium-browser.png
151%{_desktopdir}/*.desktop
0c480b89
ER
152%dir %{_libdir}/%{name}
153%{_libdir}/%{name}/chrome.pak
0c480b89
ER
154%{_libdir}/%{name}/locales
155%{_libdir}/%{name}/resources
156%{_libdir}/%{name}/themes
6d27f06b 157%attr(755,root,root) %{_libdir}/%{name}/chromium-browser
0c480b89 158# These unique permissions are intentional and necessary for the sandboxing
e266589e 159%attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox
This page took 0.05714 seconds and 4 git commands to generate.