]>
Commit | Line | Data |
---|---|---|
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) |
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) |
763f4746 | 16 | # - http://groups.google.com/a/chromium.org/group/chromium-discuss/browse_thread/thread/c82bf49672a213f4/9267df53f5d734c4 |
2351db3b | 17 | |
e53ecfb5 | 18 | # NOTES: |
4fe038cb ER |
19 | # - mute BEEP mixer if you do not want to hear horrible system bell when |
20 | # pressing home/end in url bar or more ^F search results on page. | |
f1b276d4 ER |
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 | |
763f4746 ER |
26 | %define svndate 20100425 |
27 | %define svnver 45553 | |
ea5832be | 28 | %define rel 1 |
11ad81c4 | 29 | |
11ad81c4 | 30 | Summary: A WebKit powered web browser |
05f72ae2 | 31 | Name: chromium-browser |
763f4746 | 32 | Version: 5.0.388.0 |
84fa20a9 | 33 | Release: %{svnver}.%{rel} |
05f72ae2 | 34 | License: BSD, LGPL v2+ (ffmpeg) |
e53ecfb5 | 35 | Group: X11/Applications/Networking |
f1b276d4 | 36 | Source0: http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/pool/main/c/chromium-browser/%{name}_%{version}~svn%{svndate}r%{svnver}.orig.tar.gz |
763f4746 | 37 | # Source0-md5: b4753dbf8d3b5cd46eb7eec3c4c57df8 |
8b53130d ER |
38 | Source2: %{name}.sh |
39 | Source3: %{name}.desktop | |
589d90ea | 40 | Source4: find-lang.sh |
fe043a0f | 41 | Source5: update-source.sh |
48b341f5 | 42 | Patch0: system-libs.patch |
43 | Patch1: plugin-searchdirs.patch | |
44 | Patch2: gyp-system-minizip.patch | |
93007b7e AM |
45 | # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/annotate/head%3A/debian/patches/html5_video_mimetypes.patch |
46 | Patch3: %{name}-html5-video-mimetypes.patch | |
48b341f5 | 47 | Patch5: options-support.patch |
48 | Patch11: memory_details-iceweasel.patch | |
49 | Patch12: libpng14.patch | |
f1b276d4 | 50 | URL: http://code.google.com/chromium/ |
05f72ae2 | 51 | BuildRequires: GConf2-devel |
f1b276d4 | 52 | BuildRequires: OpenGL-GLU-devel |
05f72ae2 ER |
53 | BuildRequires: alsa-lib-devel |
54 | BuildRequires: atk-devel | |
55 | BuildRequires: bison | |
11ad81c4 | 56 | BuildRequires: bzip2-devel |
05f72ae2 | 57 | BuildRequires: dbus-devel |
11ad81c4 | 58 | BuildRequires: flex |
11ad81c4 | 59 | BuildRequires: fontconfig-devel |
f1b276d4 | 60 | BuildRequires: glib2-devel |
05f72ae2 | 61 | BuildRequires: gperf |
8b53130d | 62 | BuildRequires: gtk+2-devel |
05f72ae2 ER |
63 | BuildRequires: libevent-devel |
64 | BuildRequires: libjpeg-devel | |
65 | BuildRequires: libpng-devel | |
e266589e | 66 | %{?with_selinux:BuildRequires: libselinux-devel} |
05f72ae2 | 67 | BuildRequires: libstdc++-devel |
f1b276d4 | 68 | BuildRequires: libxml2-devel |
11ad81c4 | 69 | BuildRequires: libxslt-devel |
f1b276d4 | 70 | BuildRequires: lzma |
11ad81c4 | 71 | BuildRequires: minizip-devel |
05f72ae2 | 72 | BuildRequires: nspr-devel |
f1b276d4 ER |
73 | BuildRequires: nss-devel >= 1:3.12.3 |
74 | BuildRequires: pango-devel | |
48b341f5 | 75 | BuildRequires: perl-modules |
76 | BuildRequires: pkgconfig | |
f1b276d4 | 77 | BuildRequires: python |
6a741a97 | 78 | # grep gyp.googlecode.com src/DEPS | cut -d'"' -f2 | cut -d@ -f2 |
37b05e5e | 79 | BuildRequires: python-gyp >= 0.1-795 |
48b341f5 | 80 | BuildRequires: python-modules |
f1b276d4 ER |
81 | BuildRequires: rpmbuild(macros) >= 1.453 |
82 | BuildRequires: sqlite3-devel >= 3.6.1 | |
e79c688f | 83 | %{?with_system_v8:BuildRequires: v8-devel} |
f1b276d4 ER |
84 | BuildRequires: xorg-lib-libXScrnSaver-devel |
85 | %{?with_system_zlib:BuildRequires: zlib-devel} | |
e53ecfb5 | 86 | Requires: browser-plugins >= 2.0 |
50cb20c7 | 87 | Requires: xdg-utils |
e53ecfb5 | 88 | Provides: wwwbrowser |
2351db3b | 89 | ExclusiveArch: %{ix86} %{x8664} arm |
11ad81c4 | 90 | BuildRoot: %{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 |
99 | Chromium is an open-source browser project that aims to build a safer, |
100 | faster, and more stable way for all Internet users to experience the | |
101 | web. | |
102 | ||
103 | Chromium serves as a base for Google Chrome, which is Chromium | |
104 | rebranded (name and logo) with very few additions such as usage | |
105 | tracking and an auto-updater system. | |
106 | ||
107 | This package contains the Chromium browser. | |
11ad81c4 | 108 | |
f1b276d4 ER |
109 | %package inspector |
110 | Summary: Page inspector for the chromium-browser | |
111 | Group: Development/Tools | |
112 | Requires: %{name} = %{version}-%{release} | |
05f72ae2 | 113 | |
f1b276d4 ER |
114 | %description inspector |
115 | Chromium is an open-source browser project that aims to build a safer, | |
116 | faster, and more stable way for all Internet users to experience the | |
117 | web. | |
118 | ||
119 | This package contains 'inspector', allowing web developpers to inspect | |
120 | any element of a web page at runtime (html, javascript, css, ..) | |
121 | ||
122 | %package l10n | |
123 | Summary: chromium-browser language packages | |
124 | Group: I18n | |
125 | Requires: %{name} = %{version}-%{release} | |
126 | ||
127 | %description l10n | |
128 | Chromium is an open-source browser project that aims to build a safer, | |
129 | faster, and more stable way for all Internet users to experience the | |
130 | web. | |
131 | ||
132 | This package contains language packages for 50 languages: | |
133 | ||
134 | ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr, | |
135 | gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or, | |
136 | pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi, | |
137 | zh-CN, zh-TW | |
138 | ||
139 | %prep | |
140 | %setup -q -n %{name}-%{version}~svn%{svndate}r%{svnver} | |
141 | lzma -dc %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma | tar x | |
142 | rm -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 |
147 | ver=$MAJOR.$MINOR.$BUILD.$PATCH | |
05f72ae2 ER |
148 | if [ "$ver" != %{version} ]; then |
149 | exit 1 | |
150 | fi | |
151 | ||
f1b276d4 ER |
152 | # Populate the LASTCHANGE file template as we no longer have the VCS files at this point |
153 | echo "%{svnver}" > src/build/LASTCHANGE.in | |
154 | ||
155 | sed -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh | |
156 | ||
05f72ae2 ER |
157 | %patch0 -p1 |
158 | %patch1 -p1 | |
159 | %patch2 -p1 | |
93007b7e | 160 | %patch3 -p0 |
05f72ae2 | 161 | %patch5 -p1 |
ed58dfe0 | 162 | %patch11 -p1 |
f1b276d4 | 163 | %patch12 -p1 |
0c480b89 | 164 | |
e266589e | 165 | %build |
f1b276d4 ER |
166 | cd src |
167 | %{__python} build/gyp_chromium --format=make build/all.gyp \ | |
168 | %ifarch %{ix86} | |
169 | -Dtarget_arch=ia32 \ | |
170 | %endif | |
171 | %ifarch %{x8664} | |
0c480b89 ER |
172 | -Dtarget_arch=x64 \ |
173 | %endif | |
f1b276d4 ER |
174 | %if "%{cc_version}" >= "4.4.0" |
175 | -Dno_strict_aliasing=1 -Dgcc_version=44 \ | |
176 | %endif | |
177 | %if %{with sandboxing} | |
178 | -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \ | |
179 | -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \ | |
180 | %endif | |
181 | %{!?debug:-Dwerror=} \ | |
182 | %{?with_shared_libs:-Dlibrary=shared_library} \ | |
183 | -Djavascript_engine=%{?with_system_v8:system-v8}%{!?with_system_v8:v8} \ | |
37b05e5e | 184 | -Dbuild_ffmpegsumo=%{?with_ffmpegsumo:1}%{!?with_ffmpegsumo:0} \ |
0c480b89 | 185 | -Duse_system_bzip2=1 \ |
f1b276d4 | 186 | -Duse_system_libevent=1 \ |
0c480b89 | 187 | -Duse_system_libjpeg=1 \ |
f1b276d4 ER |
188 | -Duse_system_libpng=1 \ |
189 | -Duse_system_libxml=1 \ | |
190 | -Duse_system_libxslt=1 \ | |
191 | -Duse_system_sqlite=%{?with_system_sqlite:1}%{!?with_system_sqlite:0} \ | |
192 | -Duse_system_zlib=%{?with_system_zlib:1}%{!?with_system_zlib:0} \ | |
193 | %if %{with arch} | |
37b05e5e | 194 | -Duse_system_yasm=1 \ |
f1b276d4 ER |
195 | -Dffmpeg_branding=Chrome \ |
196 | %endif | |
0c480b89 ER |
197 | %if %{with selinux} |
198 | -Dselinux=1 \ | |
199 | %endif | |
11ad81c4 | 200 | |
f1b276d4 ER |
201 | %{__make} chrome %{?with_sandboxing:chrome_sandbox} \ |
202 | BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \ | |
203 | %{?with_verbose:V=1} \ | |
204 | CC="%{__cc}" \ | |
205 | CXX="%{__cxx}" \ | |
206 | CC.host="%{__cc}" \ | |
207 | CXX.host="%{__cxx}" \ | |
208 | CFLAGS="%{rpmcflags}" \ | |
209 | CXXFLAGS="%{rpmcxxflags}" | |
11ad81c4 AM |
210 | |
211 | %install | |
212 | rm -rf $RPM_BUILD_ROOT | |
f1b276d4 | 213 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/{themes,locales,plugins,extensions,resources},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}} |
e266589e | 214 | |
f1b276d4 ER |
215 | cd src/out/%{!?debug:Release}%{?debug:Debug} |
216 | ||
217 | install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name} | |
218 | %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name} | |
219 | cp -a chrome.pak $RPM_BUILD_ROOT%{_libdir}/%{name} | |
220 | cp -a locales/*.pak $RPM_BUILD_ROOT%{_libdir}/%{name}/locales | |
221 | cp -a resources/* $RPM_BUILD_ROOT%{_libdir}/%{name}/resources | |
f1b276d4 ER |
222 | cp -a chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 |
223 | cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png | |
224 | install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name} | |
e53ecfb5 | 225 | install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox |
f1b276d4 ER |
226 | install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name} |
227 | install -p xdg-settings $RPM_BUILD_ROOT%{_libdir}/%{name} | |
228 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir} | |
0c480b89 ER |
229 | cd - |
230 | ||
13840bc2 AM |
231 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF' |
232 | # http://code.google.com/p/chromium/issues/detail?id=24507 | |
233 | gecko-mediaplayer*.so | |
234 | EOF | |
11ad81c4 | 235 | |
589d90ea ER |
236 | # find locales |
237 | %find_lang %{name}.lang | |
f1b276d4 | 238 | %{__sed} -i -e '/en-US.pak/d' %{name}.lang |
589d90ea | 239 | |
11ad81c4 AM |
240 | %clean |
241 | rm -rf $RPM_BUILD_ROOT | |
242 | ||
f1b276d4 ER |
243 | %post |
244 | %update_browser_plugins | |
245 | ||
246 | %postun | |
247 | if [ "$1" = 0 ]; then | |
248 | %update_browser_plugins | |
249 | fi | |
250 | ||
589d90ea | 251 | %files -f %{name}.lang |
11ad81c4 | 252 | %defattr(644,root,root,755) |
f1b276d4 ER |
253 | %{_browserpluginsconfdir}/browsers.d/%{name}.* |
254 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
255 | %attr(755,root,root) %{_bindir}/%{name} | |
256 | %{_mandir}/man1/%{name}.1* | |
257 | %{_pixmapsdir}/%{name}.png | |
11ad81c4 | 258 | %{_desktopdir}/*.desktop |
0c480b89 ER |
259 | %dir %{_libdir}/%{name} |
260 | %{_libdir}/%{name}/chrome.pak | |
589d90ea | 261 | %dir %{_libdir}/%{name}/locales |
f1b276d4 ER |
262 | %{_libdir}/%{name}/locales/en-US.pak |
263 | %dir %{_libdir}/%{name}/resources | |
264 | %dir %{_libdir}/%{name}/themes | |
265 | %dir %{_libdir}/%{name}/extensions | |
266 | %dir %{_libdir}/%{name}/plugins | |
267 | %attr(755,root,root) %{_libdir}/%{name}/%{name} | |
0c480b89 | 268 | # These unique permissions are intentional and necessary for the sandboxing |
e53ecfb5 | 269 | %attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox |
f1b276d4 ER |
270 | |
271 | # ffmpeg libs | |
272 | %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so | |
273 | ||
274 | # bundle this copy until xdg-utils will have this itself | |
275 | %attr(755,root,root) %{_libdir}/%{name}/xdg-settings | |
276 | ||
80838854 ER |
277 | %{_libdir}/%{name}/resources/bookmark_manager |
278 | %{_libdir}/%{name}/resources/calendar_app | |
279 | %{_libdir}/%{name}/resources/docs_app | |
280 | %{_libdir}/%{name}/resources/gmail_app | |
37b05e5e ER |
281 | %{_libdir}/%{name}/resources/net_internals |
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) |