source: projects/specs/trunk/c/chromium/chromium-vl.spec @ 589

Revision 589, 16.1 KB checked in by munepi, 14 years ago (diff)

added chromium

Line 
1# Thanks to malcolmlewis for help with this script
2# Thanks to Tom "spot" Callaway for much of the patchwork
3# Thanks to jhaygood for most of the icu patch
4
5# norootforbuild
6
7%define svn_rev 41449
8
9Name:           chromium
10Summary:        Google's opens source browser project
11#'
12Version:        5.0.353.0
13Release:        3%{?_dist_release}
14License:        BSD
15Group:          Productivity/Networking/Web/Browsers
16Source0:        %{name}.%{version}.svn%{svn_rev}.tar.lzma
17## The following are included for source reasons only
18# Custom build tools for chromium, hammer is a fancy front-end for scons
19Source1:        http://src.chromium.org/svn/trunk/tools/depot_tools.tar.gz
20%{?nosrc:NoSource: 0}
21%{?nosrc:NoSource: 1}
22# Script used to create the tar.lzma archive from the daily tarball downloadable at http://build.chromium.org/buildbot/archives/
23Source2:        repack_chromium_archive.sh
24# Script used to create the tar.lzma archive from a checked out source
25Source3:        pack_chromium_source.sh
26Source10:       chromium.desktop
27# Patch template which adds vendor to user agent
28##!!Source20:       chromium-vendor.patch.in
29Source20:       chromium-vendor-vine.patch.in
30##!!Source30:       master_preferences
31Source30:       master_preferences.vine
32Provides:       chromium-browser = %{version}
33#Obsoletes:      chromium-browser < %{version}
34
35## Start Patches
36# Many changes to the gyp system so we can use system libraries
37# My first ever patch set.  I hope I did well.
38Patch3:         chromium-gyp-system-02-icu.patch
39Patch4:         chromium-no-sqlite-debug.patch
40Patch5:         chromium-gyp-system-04-nss-nspr.patch
41Patch7:         chromium-codechanges-nss-nspr.patch
42Patch8:         chromium-codechanges-zlib.patch
43Patch9:         chromium-drop-sse.patch
44Patch10:        chromium-fix-wrapper.patch
45Patch11:        chromium-fix-home-kde4-path.patch
46Patch12:        chromium-no-test-sources.patch
47Patch13:        chromium-no-courgette.patch
48Patch14:        chromium-master-prefs-path.patch
49
50# Vine
51#Patch40:       chromium-5.0.353-no-ffmpeg-vine.patch
52
53## Gentoo patches
54# Allow use of MP3/MPEG-4 audio/video tags with our system ffmpeg
55Patch50: http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/www-client/chromium/files/chromium-20100122-ubuntu-html5-video-mimetypes.patch
56
57BuildRequires:  gcc gcc-c++
58BuildRequires:  libstdc++ libstdc++-devel
59BuildRequires:  libevent
60##!!BuildRequires:  pkg-config
61BuildRequires:  python
62##!!BuildRequires:  python-xml
63BuildRequires:  python-pyxml
64BuildRequires:  perl bison flex gperf
65##!!BuildRequires:  wdiff
66##!!BuildRequires:  update-desktop-files
67BuildRequires:  desktop-file-utils
68BuildRequires:  lzma
69##!!BuildRequires:  mozilla-nss-devel
70BuildRequires:  nss-devel
71##!!BuildRequires:  alsa-devel
72BuildRequires:  alsa-lib-devel
73BuildRequires:  gtk2-devel
74BuildRequires:  glib2-devel
75BuildRequires:  cairo-devel >= 1.6
76##!!BuildRequires:  mozilla-nspr-devel
77BuildRequires:  nspr-devel
78##!!BuildRequires:  gconf2-devel
79BuildRequires:  GConf2-devel
80BuildRequires:  freetype2-devel
81##!!BuildRequires:  dbus-1-devel
82BuildRequires:  dbus-devel
83BuildRequires:  libxslt-devel
84BuildRequires:  libxml2-devel
85BuildRequires:  libjpeg-devel
86BuildRequires:  zlib-devel
87BuildRequires:  libpng-devel
88##!!BuildRequires:  libbz2-devel
89BuildRequires:  bzip2-devel
90%if %{?_dist_release} == "vl6"
91BuildRequires:  fdupes
92%endif
93##!!BuildRequires:  libexpat-devel
94BuildRequires:  expat-devel
95##!!BuildRequires:  Mesa-devel
96BuildRequires:  mesa-libGLU-devel
97
98%{?with_system_icu:BuildRequires:  libicu-devel >= 4.0}
99BuildRequires:  libevent-devel
100
101##Vine Linux
102BuildRequires:  libXScrnSaver-devel
103#BuildRequires:  gle-devel
104#BuildRequires:  webkit-gtk-devel
105#BuildRequires:  scons
106%ifarch x86_64
107Requires:  nspluginwrapper
108%endif
109
110##!!Requires:       alsa
111Requires:       alsa-lib
112# shouldn't be required to name all dependencies
113# Requires:       mozilla-nss mozilla-nspr gtk2 glib2 cairo >= 1.6 freetype2 dbus-1 alsa v8 >= 1.3.15
114
115BuildRoot:      %{_tmppath}/%{name}-%{version}-root
116
117%description
118Chromium is the open-source project behind Google Chrome. We invite you to join us in our effort to help build a safer, faster, and more stable way for all Internet users to experience the web, and to create a powerful platform for developing a new generation of web applications.
119
120%prep
121[ -d %{name} ] && %__rm -rf %{name}
122lzma -cd %{SOURCE0} | tar xf -
123%setup -D -T -n %{name}
124
125# use system libicu only if >= 4.0
126%{?with_system_icu:%patch3 -p1}
127
128%patch4 -p1
129%patch5 -p1
130%patch7 -p1
131%patch8 -p1
132%patch9 -p1
133%patch10 -p1
134%patch11 -p1
135%patch12 -p1
136%patch13 -p1
137%patch14 -p1
138
139#%patch40 -p1 -b .vine
140
141%patch50 -p0 -b .html5
142
143# apply vendor patch after substitution
144%__sed "s:RPM_VERSION:%{version}-%{release}:" %{SOURCE20} | patch -p0
145
146%build
147## create make files
148
149PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -DUSE_SYSTEM_LIBEVENT -fPIC -fno-strict-aliasing \' | %__sed "s/ /',/g" | %__sed "s/',/', '/g"`
150for i in src/build/common.gypi; do
151        %__sed -i "s|'-march=pentium4',||g" $i
152        %__sed -i "s|'-msse2',||g" $i
153        %__sed -i "s|'-mfpmath=sse',||g" $i
154        %__sed -i "s|'-O<(debug_optimize)',||g" $i
155        %__sed -i "s|'-m32',||g" $i
156        %__sed -i "s|'-fno-exceptions',|$PARSED_OPT_FLAGS|g" $i
157        %__sed -i "s|'-Werror'|'-Wno-error'|g" $i
158done
159# '
160
161pushd src
162
163./build/gyp_chromium -f make build/all.gyp \
164    -Duse_system_ffmpeg=1 \
165    -Duse_system_zlib=1 \
166    -Duse_system_libpng=1 \
167    -Duse_system_bzip2=1 \
168    -Duse_system_libjpeg=1 \
169    -Duse_system_libxml=1 \
170    -Duse_system_libxslt=1 \
171    -Duse_system_libevent=1 \
172    %{?with_system_icu:-Duse_system_icu=1} \
173    %{!?with_system_icu:-Duse_system_icu=0} \
174    %ifarch %{ix86}
175        -Dtarget_arch=ia32 \
176    %endif
177    %ifarch x86_64
178        -Dtarget_arch=x64 \
179    %endif
180    %if %{?_dist_release} == "vl6"
181        -Dno_strict_aliasing=1 -Dgcc_version=44 \
182    %endif
183    -Drelease_extra_cflags=-fPIC \
184    ;
185
186#make -r %{?jobs:-j%jobs} chrome BUILDTYPE=Release
187#%__make -r -j5 chrome BUILDTYPE=Release
188%__make %{?_smp_mflags} chrome BUILDTYPE=Release
189
190%install
191%{__rm} -rf %{buildroot}
192
193## Create install directories
194%{__mkdir_p} %{buildroot}%{_libdir}/%{name}
195%{__mkdir_p} %{buildroot}%{_bindir}
196%{__mkdir_p} %{buildroot}%{_datadir}/applications
197%{__mkdir_p} %{buildroot}%{_datadir}/pixmaps
198%{__mkdir_p} %{buildroot}%{_mandir}/man1
199%{__mkdir_p} %{buildroot}%{_sysconfdir}/%{name}
200
201# chromium 'make' deposits us back at the top level build directory
202pushd src/out/Release
203ls -l
204
205# clean somechromium-codechanges-zlib.patch
206# clean debug junk
207%{__rm} -rf obj/ mksnapshot obj.target obj.host
208find ./ -type f -name '*.d' | while read i; do %__rm -f $i; done
209# clean NaCl stuff...  maybe NaCl will be in its own package in the future.
210%{__rm} -f ncdecode_table ncdecode_tablegen
211# clean other temporary binaries used in the compilation of chromium
212%{__rm} -f protoc xdg-settings
213
214%{__cp} -rf * %{buildroot}%{_libdir}/%{name}/
215
216# Man page
217[ ! -f %{name}.1 ] && %{__mv} chrome.1 %{name}.1
218%__install -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1
219
220# Add startup file with plugins enabled
221%{__cat} > %{buildroot}%{_bindir}/%{name} <<EOF
222#!/bin/bash
223%{_libdir}/%{name}/chrome-wrapper --enable-plugins --enable-user-scripts --enable-extensions --enable-sync "\$@"
224EOF
225
226# # link to browser plugin path.  Plugin patch doesn't work. Why?
227# %{__mkdir_p} %{buildroot}%{_libdir}/browser-plugins
228# pushd %{buildroot}%{_libdir}/%{name}
229# %{__ln_s} %{_libdir}/browser-plugins plugins
230# popd
231pushd %{buildroot}%{_libdir}/%{name}
232%ifarch x86_64
233%{__ln_s} %{_libdir}/mozilla/plugins-wrapped plugins
234%else
235%{__ln_s} %{_libdir}/mozilla/plugins plugins
236%endif
237popd
238
239# Install desktop-related files
240%__install -m 0644 %{SOURCE10} %{buildroot}%{_datadir}/applications/%{name}.desktop
241%__install -m 0644 product_logo_48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
242desktop-file-install --vendor Vine                      \
243        --dir $RPM_BUILD_ROOT%{_datadir}/applications   \
244        --delete-original                               \
245        --mode 644                                      \
246        $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
247
248# Install the master_preferences file
249#%__install -m 0644 %{SOURCE30} %{buildroot}%{_sysconfdir}/%{name}
250%__install -m 0644 %{SOURCE30} %{buildroot}%{_sysconfdir}/%{name}/$(basename %{SOURCE30} .vine)
251
252%clean
253%{__rm} -rf %{buildroot}
254
255
256%files
257%defattr(-,root,root)
258%doc src/AUTHORS src/LICENSE
259%dir %{_libdir}/%{name}
260%attr(0755,root,root) %{_bindir}/%{name}
261%{_mandir}/man1/*
262%{_datadir}/applications/*%{name}.desktop
263%{_datadir}/pixmaps/%{name}.png
264%{_libdir}/%{name}/*
265%{_sysconfdir}/%{name}
266
267%changelog
268* Tue Mar 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.353.0-3
269- fixed to install master_preferences
270- dropped chromium-5.0.353-no-ffmpeg-vine.patch
271
272* Tue Mar 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.353.0-2
273- applied chromium-5.0.353-no-ffmpeg-vine.patch
274
275* Tue Mar 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.353.0-1
276- updated to snapshot 5.0.353.0 r41449
277  * Wed Mar 10 2010 bgmerrell@novell.com
278  - Add master_preferences source file and install it to /etc/chromium.
279  - Create a new patch (chromium-master-prefs-path.patch) which tells
280    chromium to look in /etc/chromium for the master_preferences file
281    (instead of looking in the default directory, which is the same
282    directory as the 'chrome' binary).
283
284* Sun Feb 21 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.335.0-1
285- updated to snapshot 5.0.335.0 r39556
286
287* Sat Feb 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.330.0-2
288- applied chromium-20100122-ubuntu-html5-video-mimetypes.patch from Gentoo
289
290* Wed Feb 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.330.0-1
291- updated to snapshot 5.0.330.0 r39074
292
293* Wed Feb 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.329.0-5
294- use_system_ffmpeg
295
296* Tue Feb 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.329.0-4
297- added Requires:  nspluginwrapper
298- fixed a symbolic link of plugins directory with nspluginwrapper
299
300* Tue Feb 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.329.0-3
301- replaced %%{SOUECE20} to chromium-vendor-vine.patch.in
302
303* Tue Feb 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.329.0-2
304- added BuildRequires: mesa-libGLU-devel
305- added BuildRequires: libstdc++34 libstdc++34-devel for vl5
306
307* Tue Feb 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.329.0-1
308- built based on chromium-5.0.329.0-167.1.src.rpm of OpenSuse
309
310  * Sun Nov 29 2009 - tittiatcoke@gmail.com - 4.0.260.0
311  - Update to 4.0.260
312  * Fri Nov 27 2009 - tittiatcoke@gmail.com - 4.0.259.0
313  - Update to 4.0.259
314  * Thu Nov 26 2009 - tittiatcoke@gmail.com - 4.0.258.0
315  - Update to 4.0.258
316  * Tue Nov 24 2009 - tittatcoke@gmai.com - 4.0.257.0
317  - In order to complete prevent the wrong v8 version to be used, the Chromium build has been
318    changed to having an built-in v8
319  * Tue Nov 24 2009 - dbuck@example.com - 4.0.257.0
320  - Re-base patches.  Fixed a few patch errors.  Rename some patches to better correspond with function.  Removed some patches.
321  - Minor SPEC changes.  I changed the v8 requirement to be exact, instead of greater than a specific version.
322  * Sat Oct 24 2009 - Pavol Rusnak <prusnak@suse.cz> - 4.0.223.5
323  - don't create desktop files in wrapper, fix LD_LIBRARY_PATH (chromium-fix-wrapper.patch)
324  * Tue Oct 20 2009 - Raymond Wooninck >tittiatcoke@gmail.com> - 4.0.223.5
325  - update to newer svn snapshot
326    + Obsoletes fwrite patch (included upstream)
327  * Fri Oct 16 2009 - Raymond Wooninck <tittiatcoke@gmail.com> - 4.0.223.2
328  - update to newer svn snapshot
329    + Requires newer version of v8
330  * Thu Oct 15 2009 - Pavol Rusnak <prusnak@suse.cz> - 4.0.222.6
331  - do not force SSE on x86 (drop-sse.patch)
332  * Tue Oct 13 2009 - Raymond Wooninck <tittiatcoke@gmail.com> - 4.0.222.6
333  - Update to newer svn snapshot
334  - Fixed spec file in order to build
335  - Included patch to build with system zlib
336  * Mon Oct 12 2009 - Pavol Rusnak <prusnak@suse.cz> 4.0.222.2
337  - package renamed to chromium
338  - cleaned up spec file
339  * Tue Oct 6 2009 - dbuck <dbuck@example.com> - 4.0.222.2
340  - v8 is now built as a separate package, and is required
341  - included many patches to use system libraries: v8, icu, libxml2, libxslt, libjpeg, libpng, libevent, bzip2, zlib, nspr, nss
342  * Sun Oct 1 2009 - dbuck <dbuck@example.com> - 4.0.221.1
343  - included a newer DEP than is in svn, native_client@823.  So things should compile cleanly now
344  * Sun Aug 31 2009 - dbuck <dbuck@example.com> - 4.0.204.0
345  - initial build
346
347#% changelog
348* Sun Jan 24 2010 prusnak@suse.cz
349- added vendor to user agent (chromium-vendor.patch.in)
350* Sun Nov 29 2009 prusnak@suse.cz
351- added --enable-sync to wrapper to enable bookmark sync
352* Fri Nov 13 2009 tittiatcoke@gmail.com
353- update to 247.0 svn 31928
354* Fri Oct 30 2009 tittiatcoke@gmail.com
355- update to 229.0 svn 30454
356  + Fix regression where popups and app frames lost their titlebars.
357  + Makes it so that when a folder is open on the bookmark bar
358    and the mouse moves over another folder, the menu for that
359    folder is shown.
360  + Lazily create the find bar.
361  + Polish to the gmail checker sample.
362  * New, crisper icons that are exactly 19x19
363  * Add a loading animation at the beginning before Gmail
364    responds.
365  * Fix a bug where we sometimes don't update the UI after a
366    logout/login cycle.
367  + Refactor widget methods to support desktop notifications,
368    including GTK stubs.
369  + Find-in-page should not ding while deleting characters.
370  + Add SSL wrapper for linux and mac.  This allows notifier to
371    use chrome's SSL layer instead of OpenSSL.
372  + Add three of the six extensions to PAC that Internet Explorer supports.
373  + WebSocket support in chromium. (Run with --enable-web-sockets
374    enables WebSocket features.)
375  + Do not allow GTK File Chooser dialogs to return directories.
376  + Fix the notifier SSL layer to make notifications work for
377    Linux Bookmark sync.
378  + linux: don't override mouse selection behavior in omnibox
379* Sun Oct 25 2009 tittiatcoke@gmail.com
380- Update to 224.4 svn 30027
381  + First cut at new page and browser action docs based
382    on new API. Deleted old stuff.
383  + Add suppression for new memory leak caused by WebKit merge 49830:49844
384  + Cleanup: change PIDs to base::ProcessId (or pid_t, as appropriate)
385  + Minimize dependency of user scripts
386  + Fixup the flip_framer eof-handling semantics now that we have
387    the FIN bit in place
388  + app depends on x11 because of active_window_watcher_x
389  + Adding two images for the new Extension managment UI
390  + Removing hard-coded Chrome Frame output path
391  + Rearrange clipboard code
392  + Fix crash bug when attempting to download a url with unsupported scheme,
393    e.g. 'data:', by 'Alt + Click'
394  + GTK: Change text for extension download UI
395  + Ignore invalid urls on command line
396  + Make dropped tabs animate from where they were dropped.
397  + Make room for the full width of the tab placeholder.
398  + Make tab dragging as smooth as glass.
399  + Remove an annoying NOTIMPLEMNETED
400  + Extensions: guarantee removal of BROWSER_WINDOW_READY registration
401  + If we're in the middle of a drag, don't allow the user to middle
402    click to close or right click for the context menu
403  + "Fix" a NOTIMPLEMENTED on Linux by using the default password store
404  + Remove +x bit from files that shouldn't have it
405  + Fold first 3 channels of multichannel instead of 5.  Use fixed point
406  + Adding new image needed for the managment UI
407  + Fix a race bug where content scripts would not apply to the first page load
408  + Make escape remove a bookmark if it's just been added (but not if it already existed)
409  + Fix bubbles deactivating the opaque frame
410  + Allow ESC to cancel ALT+SHIFT+T in Toolbar
411  + ake all pepper plugins default to windowless and transparent
412  + Add styles for printing
413  + Implement the new extension management UI
414  + Add support for to automation interface load install and load extensions
415  + GTK: theme the info bar border
416  + Update V8 to version 1.3.16.1
417  + Introduce WebSecurityPolicy for security related methods
418  + New button scheme...borders are separate from the inner contents so
419    that they can be highlighted / depressed independently
420  + When opening Chrome maximized with an application window already
421    running, the Chrome window was not activated
422  + Fix compatibility problems with FileZilla FTP Server
423  + Remove the extension shelf on Linux
424  + Fix the proxy host and port string to start with http:// if it does not already
425  + Enable HTML5 databases for all extension renderer processes
Note: See TracBrowser for help on using the repository browser.