]> git.pld-linux.org Git - packages/chromium-browser.git/blob - chromium-browser.spec
- updated to 10.0.647.0, r72286
[packages/chromium-browser.git] / chromium-browser.spec
1 #
2 # Conditional build:
3 %bcond_with     verbose         # verbose build (V=1)
4 %bcond_with     selinux         # with SELinux (need policy first)
5 %bcond_with     shared_libs     # with shared libs
6 %bcond_with     sse2            # use SSE2 instructions
7 %bcond_with     system_sqlite   # with system sqlite
8 %bcond_with     system_v8       # with system v8
9 %bcond_without  ffmpegsumo      # build with ffmpegsumo
10 %bcond_without  sandboxing      # with sandboxing
11 %bcond_without  system_zlib     # with system zlib
12 %bcond_without  debuginfo       # disable debuginfo creation (it is huge)
13
14 # TODO
15 # - check system sqlite linking problems
16
17 # NOTES:
18 # - mute BEEP mixer if you do not want to hear horrible system bell when
19 #   pressing home/end in url bar or more ^F search results on page.
20 # - build i686: -bp: ~570MB; bc: ~928MB; -bb: ~1.0GB
21 # - build x86_64: -bp: ~570MB; bc: ~990MB; -bb: ~1.0GB
22 # - http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites
23 # - to look for new tarball, use update-source.sh script
24
25 %define         svndate 20110123
26 %define         svnver  72286
27 %define         rel     1
28
29 Summary:        A WebKit powered web browser
30 Name:           chromium-browser
31 Version:        10.0.647.0
32 Release:        0.%{svnver}.%{rel}
33 License:        BSD, LGPL v2+ (ffmpeg)
34 Group:          X11/Applications/Networking
35 Source0:        http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/pool/main/c/chromium-browser/%{name}_%{version}~svn%{svndate}r%{svnver}.orig.tar.gz
36 # Source0-md5:  3c7c17645ac1d573b81487fd90aa9208
37 Source2:        %{name}.sh
38 Source3:        %{name}.desktop
39 Source4:        find-lang.sh
40 Source5:        update-source.sh
41 Patch0:         system-libs.patch
42 Patch1:         plugin-searchdirs.patch
43 Patch2:         gyp-system-minizip.patch
44 Patch3:         disable_dlog_and_dcheck_in_release_builds.patch.diff
45 # http://aur.archlinux.org/packages/chromium-browser-svn/chromium-browser-svn/search-workaround.patch
46 Patch4:         search-workaround.patch
47 Patch5:         options-support.patch
48 Patch6:         get-webkit_revision.patch
49 Patch7:         chromium-system-vpx.patch
50 URL:            http://code.google.com/chromium/
51 BuildRequires:  GConf2-devel
52 BuildRequires:  OpenGL-GLU-devel
53 BuildRequires:  alsa-lib-devel
54 BuildRequires:  atk-devel
55 BuildRequires:  bison
56 BuildRequires:  bzip2-devel
57 BuildRequires:  cups-devel
58 BuildRequires:  dbus-glib-devel
59 BuildRequires:  flex
60 BuildRequires:  fontconfig-devel
61 BuildRequires:  glib2-devel
62 BuildRequires:  gperf
63 BuildRequires:  gtk+2-devel
64 BuildRequires:  libevent-devel
65 BuildRequires:  libgnome-keyring-devel
66 BuildRequires:  libjpeg-devel
67 BuildRequires:  libpng-devel
68 %{?with_selinux:BuildRequires:  libselinux-devel}
69 BuildRequires:  libstdc++-devel
70 BuildRequires:  libvpx-devel >= 0.9.5-2
71 BuildRequires:  libxml2-devel
72 BuildRequires:  libxslt-devel
73 BuildRequires:  lzma
74 BuildRequires:  minizip-devel
75 BuildRequires:  nspr-devel
76 BuildRequires:  nss-devel >= 1:3.12.3
77 BuildRequires:  pango-devel
78 BuildRequires:  perl-modules
79 BuildRequires:  pkgconfig
80 BuildRequires:  python
81 # grep gyp.googlecode.com src/DEPS | cut -d'"' -f2 | cut -d@ -f2
82 BuildRequires:  python-gyp >= 1-840
83 BuildRequires:  python-modules
84 BuildRequires:  rpmbuild(macros) >= 1.453
85 BuildRequires:  sqlite3-devel >= 3.6.1
86 BuildRequires:  util-linux
87 %{?with_system_v8:BuildRequires:        v8-devel}
88 BuildRequires:  which
89 BuildRequires:  xorg-lib-libXScrnSaver-devel
90 BuildRequires:  xorg-lib-libXt-devel
91 BuildRequires:  xorg-lib-libXtst-devel
92 BuildRequires:  yasm
93 %{?with_system_zlib:BuildRequires:      zlib-devel}
94 Requires:       browser-plugins >= 2.0
95 Requires:       libvpx >= 0.9.5-2
96 Requires:       xdg-utils >= 1.0.2-4
97 Provides:       wwwbrowser
98 Obsoletes:      chromium-browser-bookmark_manager
99 ExclusiveArch:  %{ix86} %{x8664} arm
100 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
101
102 %define         find_lang       sh find-lang.sh %{buildroot}
103
104 %if %{without debuginfo}
105 %define         _enable_debug_packages  0
106 %endif
107
108 %description
109 Chromium is an open-source browser project that aims to build a safer,
110 faster, and more stable way for all Internet users to experience the
111 web.
112
113 Chromium serves as a base for Google Chrome, which is Chromium
114 rebranded (name and logo) with very few additions such as usage
115 tracking and an auto-updater system.
116
117 This package contains the Chromium browser.
118
119 %package inspector
120 Summary:        Page inspector for the chromium-browser
121 Group:          Development/Tools
122 Requires:       %{name} = %{version}-%{release}
123
124 %description inspector
125 Chromium is an open-source browser project that aims to build a safer,
126 faster, and more stable way for all Internet users to experience the
127 web.
128
129 This package contains 'inspector', allowing web developpers to inspect
130 any element of a web page at runtime (html, javascript, css, ..)
131
132 %package l10n
133 Summary:        chromium-browser language packages
134 Group:          I18n
135 Requires:       %{name} = %{version}-%{release}
136
137 %description l10n
138 Chromium is an open-source browser project that aims to build a safer,
139 faster, and more stable way for all Internet users to experience the
140 web.
141
142 This package contains language packages for 50 languages:
143
144 ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr,
145 gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or,
146 pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi,
147 zh-CN, zh-TW
148
149 %prep
150 %setup -q -n %{name}-%{version}~svn%{svndate}r%{svnver}
151 lzma -dc %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma | tar x
152 rm -f %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma
153
154 # Google's versioning is interesting. They never reset "BUILD", which is how we jumped
155 # from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
156 . ./src/chrome/VERSION
157 ver=$MAJOR.$MINOR.$BUILD.$PATCH
158 if [ "$ver" != %{version} ]; then
159         exit 1
160 fi
161
162 # Populate the LASTCHANGE file template as we no longer have the VCS files at this point
163 echo "%{svnver}" > src/build/LASTCHANGE.in
164
165 %{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
166
167 %patch0 -p1
168 %patch1 -p1
169 %patch2 -p1
170 %patch3 -p0
171 %patch4 -p1
172 %patch5 -p1
173 %patch6 -p1
174 cd src
175 %patch7 -p0
176 cd ..
177
178 # drop bundled libs, from gentoo
179 remove_bundled_lib() {
180         echo "Removing bundled library $1 ..."
181         local out
182         out=$(find $1 -mindepth 1 ! -iname '*.gyp' -print -delete)
183         if [ -z "$out" ]; then
184                 echo >&2 "No files matched when removing bundled library $1"
185                 exit 1
186         fi
187 }
188
189 cd src
190 remove_bundled_lib "third_party/bzip2"
191 remove_bundled_lib "third_party/libevent"
192 remove_bundled_lib "third_party/libjpeg"
193 remove_bundled_lib "third_party/libpng"
194 remove_bundled_lib "third_party/libvpx"
195 remove_bundled_lib "third_party/libxml"
196 remove_bundled_lib "third_party/libxslt"
197 remove_bundled_lib "third_party/zlib"
198
199 %build
200 cd src
201 %{__python} build/gyp_chromium --format=make build/all.gyp \
202 %ifarch %{ix86}
203         -Dtarget_arch=ia32 \
204 %endif
205 %ifarch %{x8664}
206         -Dtarget_arch=x64 \
207 %endif
208 %if "%{cc_version}" >= "4.4.0" && "%{cc_version}" < "4.5.0"
209         -Dno_strict_aliasing=1 -Dgcc_version=44 \
210 %endif
211 %if %{with sandboxing}
212         -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \
213         -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \
214 %endif
215         %{!?debug:-Dwerror=} \
216         %{!?debuginfo:-Dfastbuild=1} \
217         %{?with_shared_libs:-Dlibrary=shared_library} \
218         -Djavascript_engine=%{?with_system_v8:system-v8}%{!?with_system_v8:v8} \
219         -Dbuild_ffmpegsumo=%{?with_ffmpegsumo:1}%{!?with_ffmpegsumo:0} \
220         -Duse_system_bzip2=1 \
221         -Duse_system_libevent=1 \
222         -Duse_system_libjpeg=1 \
223         -Duse_system_libpng=1 \
224         -Duse_system_libxml=1 \
225         -Duse_system_libxslt=1 \
226         -Duse_system_sqlite=%{?with_system_sqlite:1}%{!?with_system_sqlite:0} \
227         -Duse_system_zlib=%{?with_system_zlib:1}%{!?with_system_zlib:0} \
228         -Duse_system_vpx=1 \
229         -Duse_system_yasm=1 \
230         -Dffmpeg_branding=Chrome \
231         -Dproprietary_codecs=1 \
232         %{!?with_sse2:-Ddisable_sse2=1} \
233 %if %{with selinux}
234         -Dselinux=1 \
235 %endif
236
237 %{__make} chrome %{?with_sandboxing:chrome_sandbox} \
238         BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
239         %{?with_verbose:V=1} \
240         CC="%{__cc}" \
241         CXX="%{__cxx}" \
242         CC.host="%{__cc}" \
243         CXX.host="%{__cxx}" \
244         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
245         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}"
246
247 %install
248 rm -rf $RPM_BUILD_ROOT
249 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/{themes,locales,plugins,extensions,resources},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
250
251 cd src/out/%{!?debug:Release}%{?debug:Debug}
252
253 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
254 %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
255 cp -a *.pak locales resources $RPM_BUILD_ROOT%{_libdir}/%{name}
256 cp -a chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
257 cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
258 install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}
259 install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
260 %if %{with ffmpegsumo}
261 install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
262 %endif
263 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
264 cd -
265
266 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
267 # http://code.google.com/p/chromium/issues/detail?id=24507
268 gecko-mediaplayer*.so
269 EOF
270
271 # find locales
272 %find_lang %{name}.lang
273 %{__sed} -i -e '/en-US.pak/d' %{name}.lang
274
275 %clean
276 rm -rf $RPM_BUILD_ROOT
277
278 %post
279 %update_browser_plugins
280
281 %postun
282 if [ "$1" = 0 ]; then
283         %update_browser_plugins
284 fi
285
286 %files -f %{name}.lang
287 %defattr(644,root,root,755)
288 %{_browserpluginsconfdir}/browsers.d/%{name}.*
289 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
290 %attr(755,root,root) %{_bindir}/%{name}
291 %{_mandir}/man1/%{name}.1*
292 %{_pixmapsdir}/%{name}.png
293 %{_desktopdir}/*.desktop
294 %dir %{_libdir}/%{name}
295 %{_libdir}/%{name}/chrome.pak
296 %{_libdir}/%{name}/resources.pak
297 %dir %{_libdir}/%{name}/locales
298 %{_libdir}/%{name}/locales/en-US.pak
299 %dir %{_libdir}/%{name}/resources
300 %dir %{_libdir}/%{name}/themes
301 %dir %{_libdir}/%{name}/extensions
302 %dir %{_libdir}/%{name}/plugins
303 %attr(755,root,root) %{_libdir}/%{name}/%{name}
304 # These unique permissions are intentional and necessary for the sandboxing
305 %attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox
306
307 # ffmpeg libs
308 %if %{with ffmpegsumo}
309 %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
310 %endif
311
312 %files inspector
313 %defattr(644,root,root,755)
314 %{_libdir}/%{name}/resources/inspector
315
316 %files l10n -f %{name}.lang
317 %defattr(644,root,root,755)
This page took 0.048442 seconds and 4 git commands to generate.