]>
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 |
2351db3b | 15 | |
e53ecfb5 | 16 | # NOTES: |
4fe038cb ER |
17 | # - mute BEEP mixer if you do not want to hear horrible system bell when |
18 | # pressing home/end in url bar or more ^F search results on page. | |
f1b276d4 ER |
19 | # - build i686: -bp: ~570MB; bc: ~928MB; -bb: ~1.0GB |
20 | # - build x86_64: -bp: ~570MB; bc: ~990MB; -bb: ~1.0GB | |
21 | # - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites | |
84fa20a9 | 22 | # - to look for new tarball, use update-source.sh script |
f1b276d4 | 23 | |
2260d150 AM |
24 | %define svndate 20100610 |
25 | %define svnver 49356 | |
ea5832be | 26 | %define rel 1 |
11ad81c4 | 27 | |
11ad81c4 | 28 | Summary: A WebKit powered web browser |
05f72ae2 | 29 | Name: chromium-browser |
2260d150 | 30 | Version: 6.0.431.0 |
84fa20a9 | 31 | Release: %{svnver}.%{rel} |
05f72ae2 | 32 | License: BSD, LGPL v2+ (ffmpeg) |
e53ecfb5 | 33 | Group: X11/Applications/Networking |
f1b276d4 | 34 | Source0: http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/pool/main/c/chromium-browser/%{name}_%{version}~svn%{svndate}r%{svnver}.orig.tar.gz |
2260d150 | 35 | # Source0-md5: 050c8db52b2e261a55fcca86ec56bebb |
8b53130d ER |
36 | Source2: %{name}.sh |
37 | Source3: %{name}.desktop | |
589d90ea | 38 | Source4: find-lang.sh |
fe043a0f | 39 | Source5: update-source.sh |
48b341f5 | 40 | Patch0: system-libs.patch |
41 | Patch1: plugin-searchdirs.patch | |
42 | Patch2: gyp-system-minizip.patch | |
7b454a31 AM |
43 | Patch3: disable_dlog_and_dcheck_in_release_builds.patch.diff |
44 | # http://aur.archlinux.org/packages/chromium-browser-svn/chromium-browser-svn/search-workaround.patch | |
45 | Patch4: search-workaround.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 |
0826c245 | 55 | BuildRequires: cups-devel |
05f72ae2 | 56 | BuildRequires: dbus-devel |
11ad81c4 | 57 | BuildRequires: flex |
11ad81c4 | 58 | BuildRequires: fontconfig-devel |
f1b276d4 | 59 | BuildRequires: glib2-devel |
05f72ae2 | 60 | BuildRequires: gperf |
8b53130d | 61 | BuildRequires: gtk+2-devel |
05f72ae2 ER |
62 | BuildRequires: libevent-devel |
63 | BuildRequires: libjpeg-devel | |
64 | BuildRequires: libpng-devel | |
e266589e | 65 | %{?with_selinux:BuildRequires: libselinux-devel} |
05f72ae2 | 66 | BuildRequires: libstdc++-devel |
8a510a35 | 67 | BuildRequires: libvpx-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} |
0826c245 | 84 | BuildRequires: which |
f1b276d4 | 85 | BuildRequires: xorg-lib-libXScrnSaver-devel |
196ee8b4 | 86 | BuildRequires: yasm |
f1b276d4 | 87 | %{?with_system_zlib:BuildRequires: zlib-devel} |
e53ecfb5 | 88 | Requires: browser-plugins >= 2.0 |
50cb20c7 | 89 | Requires: xdg-utils |
e53ecfb5 | 90 | Provides: wwwbrowser |
031a146c | 91 | Obsoletes: chromium-browser-bookmark_manager |
2351db3b | 92 | ExclusiveArch: %{ix86} %{x8664} arm |
11ad81c4 | 93 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
11ad81c4 | 94 | |
589d90ea ER |
95 | %define find_lang sh find-lang.sh %{buildroot} |
96 | ||
6b113615 ER |
97 | %if %{without debuginfo} |
98 | %define _enable_debug_packages 0 | |
99 | %endif | |
100 | ||
11ad81c4 | 101 | %description |
80838854 ER |
102 | Chromium is an open-source browser project that aims to build a safer, |
103 | faster, and more stable way for all Internet users to experience the | |
104 | web. | |
105 | ||
106 | Chromium serves as a base for Google Chrome, which is Chromium | |
107 | rebranded (name and logo) with very few additions such as usage | |
108 | tracking and an auto-updater system. | |
109 | ||
110 | This package contains the Chromium browser. | |
11ad81c4 | 111 | |
f1b276d4 ER |
112 | %package inspector |
113 | Summary: Page inspector for the chromium-browser | |
114 | Group: Development/Tools | |
115 | Requires: %{name} = %{version}-%{release} | |
05f72ae2 | 116 | |
f1b276d4 ER |
117 | %description inspector |
118 | Chromium is an open-source browser project that aims to build a safer, | |
119 | faster, and more stable way for all Internet users to experience the | |
120 | web. | |
121 | ||
122 | This package contains 'inspector', allowing web developpers to inspect | |
123 | any element of a web page at runtime (html, javascript, css, ..) | |
124 | ||
125 | %package l10n | |
126 | Summary: chromium-browser language packages | |
127 | Group: I18n | |
128 | Requires: %{name} = %{version}-%{release} | |
129 | ||
130 | %description l10n | |
131 | Chromium is an open-source browser project that aims to build a safer, | |
132 | faster, and more stable way for all Internet users to experience the | |
133 | web. | |
134 | ||
135 | This package contains language packages for 50 languages: | |
136 | ||
137 | ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr, | |
138 | gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or, | |
139 | pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi, | |
140 | zh-CN, zh-TW | |
141 | ||
142 | %prep | |
143 | %setup -q -n %{name}-%{version}~svn%{svndate}r%{svnver} | |
144 | lzma -dc %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma | tar x | |
145 | rm -f %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma | |
589d90ea | 146 | |
05f72ae2 ER |
147 | # Google's versioning is interesting. They never reset "BUILD", which is how we jumped |
148 | # from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch | |
0c480b89 ER |
149 | . ./src/chrome/VERSION |
150 | ver=$MAJOR.$MINOR.$BUILD.$PATCH | |
05f72ae2 ER |
151 | if [ "$ver" != %{version} ]; then |
152 | exit 1 | |
153 | fi | |
154 | ||
f1b276d4 ER |
155 | # Populate the LASTCHANGE file template as we no longer have the VCS files at this point |
156 | echo "%{svnver}" > src/build/LASTCHANGE.in | |
157 | ||
158 | sed -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh | |
159 | ||
05f72ae2 ER |
160 | %patch0 -p1 |
161 | %patch1 -p1 | |
162 | %patch2 -p1 | |
7b454a31 AM |
163 | %patch3 -p0 |
164 | %patch4 -p0 | |
05f72ae2 | 165 | %patch5 -p1 |
ed58dfe0 | 166 | %patch11 -p1 |
0c480b89 | 167 | |
e266589e | 168 | %build |
f1b276d4 ER |
169 | cd src |
170 | %{__python} build/gyp_chromium --format=make build/all.gyp \ | |
171 | %ifarch %{ix86} | |
172 | -Dtarget_arch=ia32 \ | |
173 | %endif | |
174 | %ifarch %{x8664} | |
0c480b89 ER |
175 | -Dtarget_arch=x64 \ |
176 | %endif | |
7b454a31 AM |
177 | %if "%{cc_version}" >= "4.4.0" && "%{cc_version}" < "4.5.0" |
178 | -Dno_strict_aliasing=1 -Dgcc_version=44 \ | |
f1b276d4 ER |
179 | %endif |
180 | %if %{with sandboxing} | |
181 | -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \ | |
182 | -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \ | |
183 | %endif | |
184 | %{!?debug:-Dwerror=} \ | |
185 | %{?with_shared_libs:-Dlibrary=shared_library} \ | |
186 | -Djavascript_engine=%{?with_system_v8:system-v8}%{!?with_system_v8:v8} \ | |
37b05e5e | 187 | -Dbuild_ffmpegsumo=%{?with_ffmpegsumo:1}%{!?with_ffmpegsumo:0} \ |
0c480b89 | 188 | -Duse_system_bzip2=1 \ |
f1b276d4 | 189 | -Duse_system_libevent=1 \ |
0c480b89 | 190 | -Duse_system_libjpeg=1 \ |
f1b276d4 ER |
191 | -Duse_system_libpng=1 \ |
192 | -Duse_system_libxml=1 \ | |
193 | -Duse_system_libxslt=1 \ | |
194 | -Duse_system_sqlite=%{?with_system_sqlite:1}%{!?with_system_sqlite:0} \ | |
195 | -Duse_system_zlib=%{?with_system_zlib:1}%{!?with_system_zlib:0} \ | |
888c00c4 | 196 | -Duse_system_vpx=1 \ |
37b05e5e | 197 | -Duse_system_yasm=1 \ |
f1b276d4 | 198 | -Dffmpeg_branding=Chrome \ |
a5bbd1d5 | 199 | -Dproprietary_codecs=1 \ |
0c480b89 ER |
200 | %if %{with selinux} |
201 | -Dselinux=1 \ | |
202 | %endif | |
11ad81c4 | 203 | |
f1b276d4 ER |
204 | %{__make} chrome %{?with_sandboxing:chrome_sandbox} \ |
205 | BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \ | |
206 | %{?with_verbose:V=1} \ | |
207 | CC="%{__cc}" \ | |
208 | CXX="%{__cxx}" \ | |
209 | CC.host="%{__cc}" \ | |
210 | CXX.host="%{__cxx}" \ | |
7b454a31 AM |
211 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
212 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" | |
11ad81c4 AM |
213 | |
214 | %install | |
215 | rm -rf $RPM_BUILD_ROOT | |
f1b276d4 | 216 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/{themes,locales,plugins,extensions,resources},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}} |
e266589e | 217 | |
f1b276d4 ER |
218 | cd src/out/%{!?debug:Release}%{?debug:Debug} |
219 | ||
220 | install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name} | |
221 | %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name} | |
222 | cp -a chrome.pak $RPM_BUILD_ROOT%{_libdir}/%{name} | |
223 | cp -a locales/*.pak $RPM_BUILD_ROOT%{_libdir}/%{name}/locales | |
224 | cp -a resources/* $RPM_BUILD_ROOT%{_libdir}/%{name}/resources | |
f1b276d4 ER |
225 | cp -a chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 |
226 | cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png | |
227 | install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name} | |
e53ecfb5 | 228 | install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox |
f1b276d4 ER |
229 | install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name} |
230 | install -p xdg-settings $RPM_BUILD_ROOT%{_libdir}/%{name} | |
231 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir} | |
0c480b89 ER |
232 | cd - |
233 | ||
13840bc2 AM |
234 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF' |
235 | # http://code.google.com/p/chromium/issues/detail?id=24507 | |
236 | gecko-mediaplayer*.so | |
237 | EOF | |
11ad81c4 | 238 | |
589d90ea ER |
239 | # find locales |
240 | %find_lang %{name}.lang | |
f1b276d4 | 241 | %{__sed} -i -e '/en-US.pak/d' %{name}.lang |
589d90ea | 242 | |
11ad81c4 AM |
243 | %clean |
244 | rm -rf $RPM_BUILD_ROOT | |
245 | ||
f1b276d4 ER |
246 | %post |
247 | %update_browser_plugins | |
248 | ||
249 | %postun | |
250 | if [ "$1" = 0 ]; then | |
251 | %update_browser_plugins | |
252 | fi | |
253 | ||
589d90ea | 254 | %files -f %{name}.lang |
11ad81c4 | 255 | %defattr(644,root,root,755) |
f1b276d4 ER |
256 | %{_browserpluginsconfdir}/browsers.d/%{name}.* |
257 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
258 | %attr(755,root,root) %{_bindir}/%{name} | |
259 | %{_mandir}/man1/%{name}.1* | |
260 | %{_pixmapsdir}/%{name}.png | |
11ad81c4 | 261 | %{_desktopdir}/*.desktop |
0c480b89 ER |
262 | %dir %{_libdir}/%{name} |
263 | %{_libdir}/%{name}/chrome.pak | |
589d90ea | 264 | %dir %{_libdir}/%{name}/locales |
f1b276d4 ER |
265 | %{_libdir}/%{name}/locales/en-US.pak |
266 | %dir %{_libdir}/%{name}/resources | |
267 | %dir %{_libdir}/%{name}/themes | |
268 | %dir %{_libdir}/%{name}/extensions | |
269 | %dir %{_libdir}/%{name}/plugins | |
270 | %attr(755,root,root) %{_libdir}/%{name}/%{name} | |
0c480b89 | 271 | # These unique permissions are intentional and necessary for the sandboxing |
e53ecfb5 | 272 | %attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox |
f1b276d4 ER |
273 | |
274 | # ffmpeg libs | |
275 | %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so | |
276 | ||
277 | # bundle this copy until xdg-utils will have this itself | |
278 | %attr(755,root,root) %{_libdir}/%{name}/xdg-settings | |
279 | ||
80838854 ER |
280 | %{_libdir}/%{name}/resources/bookmark_manager |
281 | %{_libdir}/%{name}/resources/calendar_app | |
282 | %{_libdir}/%{name}/resources/docs_app | |
283 | %{_libdir}/%{name}/resources/gmail_app | |
37b05e5e | 284 | %{_libdir}/%{name}/resources/net_internals |
609a73ae | 285 | %{_libdir}/%{name}/resources/shared |
37b05e5e | 286 | |
f1b276d4 ER |
287 | %files inspector |
288 | %defattr(644,root,root,755) | |
289 | %{_libdir}/%{name}/resources/inspector | |
290 | ||
291 | %files l10n -f %{name}.lang | |
292 | %defattr(644,root,root,755) |