]> git.pld-linux.org Git - packages/chromium-browser.git/blob - chromium-browser.spec
- up to 5.0.358.0, r42070; packaged bookmark manager
[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     system_v8       # with system v8
6 %bcond_without  system_zlib     # with system zlib
7 %bcond_with     system_sqlite   # with system sqlite
8 %bcond_with     system_ffmpeg   # with system ffmpeg_mt
9 %bcond_without  sandboxing      # with sandboxing
10 %bcond_with     shared_libs     # with shared libs
11 %bcond_without  debuginfo       # disable debuginfo creation (it is huge)
12
13 # TODO
14 # - check system sqlite linking problems
15 # - enable H264 video support if possible (test:  youtube.com/html5 and join html5 there)
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 # - use nosource until the package is ready to be stbr, no point poisioning distfiles
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
24 # - to look for new tarball, use update-source.sh script
25
26 %define         svndate 20100319
27 %define         svnver  42070
28 %define         rel             1
29
30 Summary:        A WebKit powered web browser
31 Name:           chromium-browser
32 Version:        5.0.358.0
33 Release:        %{svnver}.%{rel}
34 License:        BSD, LGPL v2+ (ffmpeg)
35 Group:          X11/Applications/Networking
36 Source0:        http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/pool/main/c/chromium-browser/%{name}_%{version}~svn%{svndate}r%{svnver}.orig.tar.gz
37 # Source0-md5:  2957aa416f3773d93a02356f36fb24d1
38 Source2:        %{name}.sh
39 Source3:        %{name}.desktop
40 Source4:        find-lang.sh
41 Patch0:         system-libs.patch
42 Patch1:         plugin-searchdirs.patch
43 Patch2:         gyp-system-minizip.patch
44 # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/annotate/head%3A/debian/patches/html5_video_mimetypes.patch
45 Patch3:         %{name}-html5-video-mimetypes.patch
46 Patch5:         options-support.patch
47 Patch11:        memory_details-iceweasel.patch
48 Patch12:        libpng14.patch
49 URL:            http://code.google.com/chromium/
50 BuildRequires:  GConf2-devel
51 BuildRequires:  OpenGL-GLU-devel
52 BuildRequires:  alsa-lib-devel
53 BuildRequires:  atk-devel
54 BuildRequires:  bison
55 BuildRequires:  bzip2-devel
56 BuildRequires:  dbus-devel
57 BuildRequires:  flex
58 BuildRequires:  fontconfig-devel
59 BuildRequires:  glib2-devel
60 BuildRequires:  gperf
61 BuildRequires:  gtk+2-devel
62 BuildRequires:  libevent-devel
63 BuildRequires:  libjpeg-devel
64 BuildRequires:  libpng-devel
65 %{?with_selinux:BuildRequires:  libselinux-devel}
66 BuildRequires:  libstdc++-devel
67 BuildRequires:  libxml2-devel
68 BuildRequires:  libxslt-devel
69 BuildRequires:  lzma
70 BuildRequires:  minizip-devel
71 BuildRequires:  nspr-devel
72 BuildRequires:  nss-devel >= 1:3.12.3
73 BuildRequires:  pango-devel
74 BuildRequires:  perl-modules
75 BuildRequires:  pkgconfig
76 BuildRequires:  python
77 # grep gyp.googlecode.com src/DEPS | cut -d'"' -f2 | cut -d@ -f2
78 BuildRequires:  python-gyp >= 0.1-790
79 BuildRequires:  python-modules
80 BuildRequires:  rpmbuild(macros) >= 1.453
81 BuildRequires:  sqlite3-devel >= 3.6.1
82 %{?with_system_v8:BuildRequires:        v8-devel}
83 BuildRequires:  xorg-lib-libXScrnSaver-devel
84 %{?with_system_zlib:BuildRequires:      zlib-devel}
85 Requires:       browser-plugins >= 2.0
86 Provides:       wwwbrowser
87 ExclusiveArch:  %{ix86} %{x8664} arm
88 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89
90 %define         find_lang       sh find-lang.sh %{buildroot}
91
92 %if %{without debuginfo}
93 %define         _enable_debug_packages  0
94 %endif
95
96 %description
97 Chromium is an open-source web browser, powered by WebKit.
98
99 %package inspector
100 Summary:        Page inspector for the chromium-browser
101 Group:          Development/Tools
102 Requires:       %{name} = %{version}-%{release}
103
104 %description inspector
105 Chromium is an open-source browser project that aims to build a safer,
106 faster, and more stable way for all Internet users to experience the
107 web.
108
109 This package contains 'inspector', allowing web developpers to inspect
110 any element of a web page at runtime (html, javascript, css, ..)
111
112 %package bookmark_manager
113 Summary:        Bookmark manager for the chromium-browser
114 Group:          Development/Tools
115 Requires:       %{name} = %{version}-%{release}
116
117 %description bookmark_manager
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 bookmark manager for the chromium-browser.
123
124 %package l10n
125 Summary:        chromium-browser language packages
126 Group:          I18n
127 Requires:       %{name} = %{version}-%{release}
128
129 %description l10n
130 Chromium is an open-source browser project that aims to build a safer,
131 faster, and more stable way for all Internet users to experience the
132 web.
133
134 This package contains language packages for 50 languages:
135
136 ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr,
137 gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or,
138 pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi,
139 zh-CN, zh-TW
140
141 %prep
142 %setup -q -n %{name}-%{version}~svn%{svndate}r%{svnver}
143 lzma -dc %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma | tar x
144 rm -f %{name}-%{version}~svn%{svndate}r%{svnver}-source.tar.lzma
145
146 # Google's versioning is interesting. They never reset "BUILD", which is how we jumped
147 # from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
148 . ./src/chrome/VERSION
149 ver=$MAJOR.$MINOR.$BUILD.$PATCH
150 if [ "$ver" != %{version} ]; then
151         exit 1
152 fi
153
154 # Populate the LASTCHANGE file template as we no longer have the VCS files at this point
155 echo "%{svnver}" > src/build/LASTCHANGE.in
156
157 sed -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
158
159 %patch0 -p1
160 %patch1 -p1
161 %patch2 -p1
162 %patch3 -p0
163 %patch5 -p1
164 %patch11 -p1
165 %patch12 -p1
166
167 %build
168 cd src
169 %{__python} build/gyp_chromium --format=make build/all.gyp \
170 %ifarch %{ix86}
171         -Dtarget_arch=ia32 \
172 %endif
173 %ifarch %{x8664}
174         -Dtarget_arch=x64 \
175 %endif
176 %if "%{cc_version}" >= "4.4.0"
177         -Dno_strict_aliasing=1 -Dgcc_version=44 \
178 %endif
179 %if %{with sandboxing}
180         -Dlinux_sandbox_path=%{_libdir}/%{name}/chromium-sandbox \
181         -Dlinux_sandbox_chrome_path=%{_libdir}/%{name}/%{name} \
182 %endif
183         %{!?debug:-Dwerror=} \
184         %{?with_shared_libs:-Dlibrary=shared_library} \
185         -Djavascript_engine=%{?with_system_v8:system-v8}%{!?with_system_v8:v8} \
186         -Duse_system_bzip2=1 \
187         -Duse_system_ffmpeg=%{?with_system_ffmpeg:1}%{!?with_system_ffmpeg:0} \
188         -Duse_system_libevent=1 \
189         -Duse_system_libjpeg=1 \
190         -Duse_system_libpng=1 \
191         -Duse_system_libxml=1 \
192         -Duse_system_libxslt=1 \
193         -Duse_system_sqlite=%{?with_system_sqlite:1}%{!?with_system_sqlite:0} \
194         -Duse_system_zlib=%{?with_system_zlib:1}%{!?with_system_zlib:0} \
195 %if %{with arch}
196 -Duse_system_yasm=1 \
197         -Dffmpeg_branding=Chrome \
198 %endif
199 %if %{with selinux}
200         -Dselinux=1 \
201 %endif
202
203 %{__make} chrome %{?with_sandboxing:chrome_sandbox} \
204         BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
205         %{?with_verbose:V=1} \
206         CC="%{__cc}" \
207         CXX="%{__cxx}" \
208         CC.host="%{__cc}" \
209         CXX.host="%{__cxx}" \
210         CFLAGS="%{rpmcflags}" \
211         CXXFLAGS="%{rpmcxxflags}"
212
213 %install
214 rm -rf $RPM_BUILD_ROOT
215 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/{themes,locales,plugins,extensions,resources},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
216
217 cd src/out/%{!?debug:Release}%{?debug:Debug}
218
219 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
220 %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
221 cp -a chrome.pak $RPM_BUILD_ROOT%{_libdir}/%{name}
222 cp -a locales/*.pak $RPM_BUILD_ROOT%{_libdir}/%{name}/locales
223 cp -a resources/* $RPM_BUILD_ROOT%{_libdir}/%{name}/resources
224 find $RPM_BUILD_ROOT%{_libdir}/%{name}/resources -name '*.d' | xargs rm
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}
228 install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
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}
232 cd -
233
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
238
239 # find locales
240 %find_lang %{name}.lang
241 %{__sed} -i -e '/en-US.pak/d' %{name}.lang
242
243 %clean
244 rm -rf $RPM_BUILD_ROOT
245
246 %post
247 %update_browser_plugins
248
249 %postun
250 if [ "$1" = 0 ]; then
251         %update_browser_plugins
252 fi
253
254 %files -f %{name}.lang
255 %defattr(644,root,root,755)
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
261 %{_desktopdir}/*.desktop
262 %dir %{_libdir}/%{name}
263 %{_libdir}/%{name}/chrome.pak
264 %dir %{_libdir}/%{name}/locales
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}
271 # These unique permissions are intentional and necessary for the sandboxing
272 %attr(4555,root,root) %{_libdir}/%{name}/chromium-sandbox
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
280 %files inspector
281 %defattr(644,root,root,755)
282 %{_libdir}/%{name}/resources/inspector
283
284 %files bookmark_manager
285 %defattr(644,root,root,755)
286 %{_libdir}/%{name}/resources/bookmark_manager
287
288 %files l10n -f %{name}.lang
289 %defattr(644,root,root,755)
This page took 0.10739 seconds and 3 git commands to generate.