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