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