]>
Commit | Line | Data |
---|---|---|
1 | # NOTES: | |
2 | # - to look for new tarball, use update-source.sh script | |
3 | %define svnrev 117846 | |
4 | %define rel 2 | |
5 | Summary: A WebKit powered web browser | |
6 | Name: chromium-browser-bin | |
7 | Version: 18.0.1010.0 | |
8 | Release: %{svnrev}.%{rel} | |
9 | License: BSD, LGPL v2+ (ffmpeg) | |
10 | Group: X11/Applications/Networking | |
11 | # sh get_sources.sh | |
12 | Source0: chromium-browser32-r%{svnrev}.zip | |
13 | # NoSource0-md5: | |
14 | Source1: chromium-browser64-r%{svnrev}.zip | |
15 | # NoSource1-md5: | |
16 | NoSource: 0 | |
17 | NoSource: 1 | |
18 | Source2: chromium-browser.sh | |
19 | Source3: chromium-browser.desktop | |
20 | Source4: find-lang.sh | |
21 | Source5: update-source.sh | |
22 | BuildRequires: rpmbuild(macros) >= 1.453 | |
23 | BuildRequires: unzip | |
24 | Requires: browser-plugins >= 2.0 | |
25 | Requires: libpng12 >= 1:1.2.42-2 | |
26 | Requires: nspr | |
27 | Requires: nss | |
28 | Requires: xdg-utils >= 1.0.2-4 | |
29 | Provides: wwwbrowser | |
30 | Conflicts: chromium-browser | |
31 | Obsoletes: %{name}-bookmark_manager | |
32 | ExclusiveArch: %{ix86} %{x8664} | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %define find_lang sh find-lang.sh %{buildroot} | |
36 | ||
37 | %define _enable_debug_packages 0 | |
38 | %define no_install_post_strip 1 | |
39 | ||
40 | %define nss_caps libfreebl3.so libnss3.so libnssckbi.so libsmime3.so ibsoftokn3.so libssl3.so libnssutil3.so | |
41 | %define nspr_caps libnspr4.so libplc4.so libplds4.so | |
42 | %define ffmpeg_caps libffmpegsumo.so | |
43 | ||
44 | # list of script capabilities (regexps) not to be used in Provides | |
45 | %define _noautoprov %{nss_caps} %{nspr_caps} %{ffmpeg_caps} | |
46 | %define _noautoreq %{_noautoprov} | |
47 | ||
48 | %description | |
49 | Chromium is an open-source web browser, powered by WebKit. | |
50 | ||
51 | %package inspector | |
52 | Summary: Page inspector for the chromium-browser | |
53 | Group: Development/Tools | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description inspector | |
57 | Chromium is an open-source browser project that aims to build a safer, | |
58 | faster, and more stable way for all Internet users to experience the | |
59 | web. | |
60 | ||
61 | This package contains 'inspector', allowing web developpers to inspect | |
62 | any element of a web page at runtime (html, javascript, css, ..) | |
63 | ||
64 | %package l10n | |
65 | Summary: chromium-browser language packages | |
66 | Group: I18n | |
67 | Requires: %{name} = %{version}-%{release} | |
68 | ||
69 | %description l10n | |
70 | Chromium is an open-source browser project that aims to build a safer, | |
71 | faster, and more stable way for all Internet users to experience the | |
72 | web. | |
73 | ||
74 | This package contains language packages for 50 languages: | |
75 | ||
76 | ar, bg, bn, ca, cs, da, de, el, en-GB, es-419, es, et, fi, fil, fr, | |
77 | gu, he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or, | |
78 | pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi, | |
79 | zh-CN, zh-TW | |
80 | ||
81 | %prep | |
82 | %ifarch %{ix86} | |
83 | %setup -qcT -a0 | |
84 | %endif | |
85 | %ifarch %{x8664} | |
86 | %setup -qcT -a1 | |
87 | %endif | |
88 | %{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh | |
89 | ||
90 | mv chrome-linux/product_logo_48.png . | |
91 | mv chrome-linux/chrome.1 chromium-browser.1 | |
92 | mv chrome-linux/chrome-wrapper . | |
93 | mv chrome-linux/{chrome,chromium-browser} | |
94 | chmod a+x chrome-linux/lib*.so* | |
95 | ||
96 | # xdg-utils >= 1.0.2-4 satisfies these | |
97 | rm chrome-linux/xdg-settings | |
98 | rm chrome-linux/xdg-mime | |
99 | ||
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir},%{_libdir}/%{name}/themes} | |
103 | ||
104 | install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/chromium-browser | |
105 | %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/chromium-browser | |
106 | cp -a chrome-linux/* $RPM_BUILD_ROOT%{_libdir}/%{name} | |
107 | cp -p chromium-browser.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
108 | cp -p product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/chromium-browser.png | |
109 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir} | |
110 | ||
111 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins | |
112 | ||
113 | # nspr symlinks | |
114 | for a in libnspr4.so libplc4.so libplds4.so; do | |
115 | ln -s %{_libdir}/$a $RPM_BUILD_ROOT%{_libdir}/%{name}/$a.0d | |
116 | done | |
117 | # nss symlinks | |
118 | for a in libnss3.so libnssutil3.so libsmime3.so libssl3.so; do | |
119 | ln -s %{_libdir}/$a $RPM_BUILD_ROOT%{_libdir}/%{name}/$a.1d | |
120 | done | |
121 | ||
122 | # find locales | |
123 | %find_lang %{name}.lang | |
124 | %{__sed} -i -e '/en-US.pak/d' %{name}.lang | |
125 | ||
126 | %clean | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
129 | %post | |
130 | %update_browser_plugins | |
131 | ||
132 | %postun | |
133 | if [ "$1" = 0 ]; then | |
134 | %update_browser_plugins | |
135 | fi | |
136 | ||
137 | %files | |
138 | %defattr(644,root,root,755) | |
139 | ||
140 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
141 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
142 | ||
143 | %attr(755,root,root) %{_bindir}/chromium-browser | |
144 | %{_mandir}/man1/chromium-browser.1* | |
145 | %{_pixmapsdir}/chromium-browser.png | |
146 | %{_desktopdir}/*.desktop | |
147 | %dir %{_libdir}/%{name} | |
148 | %{_libdir}/%{name}/resources.pak | |
149 | %{_libdir}/%{name}/chrome.pak | |
150 | %dir %{_libdir}/%{name}/locales | |
151 | %{_libdir}/%{name}/locales/en-US.pak | |
152 | %dir %{_libdir}/%{name}/plugins | |
153 | %dir %{_libdir}/%{name}/resources | |
154 | %{_libdir}/%{name}/themes | |
155 | %attr(755,root,root) %{_libdir}/%{name}/chromium-browser | |
156 | ||
157 | # These unique permissions are intentional and necessary for the sandboxing | |
158 | %attr(4555,root,root) %{_libdir}/%{name}/chrome_sandbox | |
159 | ||
160 | # Native Client plugin, to use launch with --enable-nacl | |
161 | %attr(755,root,root) %{_libdir}/%{name}/libppGoogleNaClPluginChrome.so | |
162 | #%{_libdir}/%{name}/nacl_irt_x86_64.nexe | |
163 | ||
164 | # ffmpeg libs | |
165 | %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so | |
166 | ||
167 | # nspr/nss symlinks | |
168 | %attr(755,root,root) %{_libdir}/%{name}/libnspr4.so.0d | |
169 | %attr(755,root,root) %{_libdir}/%{name}/libplc4.so.0d | |
170 | %attr(755,root,root) %{_libdir}/%{name}/libplds4.so.0d | |
171 | %attr(755,root,root) %{_libdir}/%{name}/libnss3.so.1d | |
172 | %attr(755,root,root) %{_libdir}/%{name}/libnssutil3.so.1d | |
173 | %attr(755,root,root) %{_libdir}/%{name}/libsmime3.so.1d | |
174 | %attr(755,root,root) %{_libdir}/%{name}/libssl3.so.1d | |
175 | ||
176 | %files inspector | |
177 | %defattr(644,root,root,755) | |
178 | %{_libdir}/%{name}/resources/inspector | |
179 | ||
180 | %files l10n -f %{name}.lang | |
181 | %defattr(644,root,root,755) |