]> git.pld-linux.org Git - packages/google-chrome.git/blob - google-chrome.spec
- 7.0.517.44
[packages/google-chrome.git] / google-chrome.spec
1 # NOTE
2 # - to look for new version, use update-source.sh script
3
4 %define         svnrev  64615
5 %define         rel             1
6 Summary:        Google Chrome
7 Name:           google-chrome
8 Version:        7.0.517.44
9 Release:        %{svnrev}.%{rel}
10 License:        Multiple, see http://chrome.google.com/
11 Group:          Applications/Networking
12 Source0:        http://dl.google.com/linux/rpm/stable/i386/%{name}-stable-%{version}-%{svnrev}.i386.rpm
13 # Source0-md5:  97c1267255f6ec6f320c1f830d9c5907
14 Source1:        http://dl.google.com/linux/rpm/stable/x86_64/%{name}-stable-%{version}-%{svnrev}.x86_64.rpm
15 # Source1-md5:  4457802e6e7111ce25cbd1c599854ad7
16 Source2:        %{name}.sh
17 Source4:        find-lang.sh
18 Patch0:         chrome-desktop.patch
19 URL:            http://chrome.google.com/
20 BuildRequires:  rpm-utils
21 BuildRequires:  rpmbuild(macros) >= 1.453
22 BuildRequires:  sed >= 4.0
23 Requires:       browser-plugins >= 2.0
24 Requires:       nspr
25 Requires:       nss
26 Requires:       xdg-utils
27 Provides:       wwwbrowser
28 ExclusiveArch:  %{ix86} %{x8664}
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         find_lang       sh find-lang.sh %{buildroot}
32
33 %define         _enable_debug_packages  0
34 %define         no_install_post_strip   1
35
36 %define         nss_caps        libfreebl3.so libnss3.so libnssckbi.so libsmime3.so ibsoftokn3.so libssl3.so libnssutil3.so
37 %define         nspr_caps       libnspr4.so libplc4.so libplds4.so
38 %define         ffmpeg_caps     libffmpegsumo.so
39
40 # list of script capabilities (regexps) not to be used in Provides
41 %define         _noautoprov             %{nss_caps} %{nspr_caps} %{ffmpeg_caps}
42 # do not require them either
43 %define         _noautoreq              %{_noautoprov}
44
45 %description
46 The web browser from Google
47
48 Google Chrome is a browser that combines a minimal design with
49 sophisticated technology to make the web faster, safer, and easier.
50
51 %description -l hu.UTF-8
52 Webböngésző a Google-től.
53
54 Google Chrome egy böngésző, amely a minimalista külsőt házasítja össze
55 a kifinomult technológiával, hogy a webböngészés gyorsabb,
56 biztonságosabb és könnyebb legyen.
57
58 %prep
59 %setup -qcT
60 %ifarch %{ix86}
61 SOURCE=%{S:0}
62 %endif
63 %ifarch %{x8664}
64 SOURCE=%{S:1}
65 %endif
66
67 V=$(rpm -qp --nodigest --nosignature --qf '%{V}' $SOURCE)
68 R=$(rpm -qp --nodigest --nosignature --qf '%{R}' $SOURCE)
69 if [ version:$V != version:%{version} -o svnrev:$R != svnrev:%{svnrev} ]; then
70         exit 1
71 fi
72 rpm2cpio $SOURCE | cpio -i -d
73
74 mv opt/google/chrome .
75 mv usr/share/man/man1/* .
76 mv usr/share/gnome-control-center/default-apps .
77 mv chrome/default-app-block .
78 mv chrome/product_logo_*.{png,xpm} .
79 mv chrome/google-chrome.desktop .
80 mv chrome/google-chrome .
81 chmod a+x chrome/lib*.so*
82
83 # included in gnome-control-center-2.28.1-3
84 rm default-app-block default-apps/google-chrome.xml
85
86 %ifarch %{x8664}
87 # go figure, 32bit one doesn't have it compressed
88 gzip -d *.1.gz
89 %endif
90
91 %patch0 -p1
92
93 %{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
94 %{__sed} -i 's;/opt/google/chrome/product_logo_48.png;%{name}.png;' google-chrome.desktop
95 %{__sed} -i 's;/opt/google/chrome;%{_bindir};' google-chrome.desktop
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir},%{_libdir}/%{name}/themes}
100
101 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
102 %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
103 cp -a chrome/* $RPM_BUILD_ROOT%{_libdir}/%{name}
104 cp -a google-chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1
105 # for google-chrome --help
106 echo ".so google-chrome.1" > $RPM_BUILD_ROOT%{_mandir}/man1/chrome.1
107 cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
108 cp -a google-chrome.desktop $RPM_BUILD_ROOT%{_desktopdir}
109
110 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
111
112 # nspr symlinks
113 for a in libnspr4.so libplc4.so libplds4.so; do
114         ln -s %{_libdir}/$a $RPM_BUILD_ROOT%{_libdir}/%{name}/$a.0d
115 done
116 # nss symlinks
117 for a in libnss3.so libnssutil3.so libsmime3.so libssl3.so; do
118         ln -s %{_libdir}/$a $RPM_BUILD_ROOT%{_libdir}/%{name}/$a.1d
119 done
120
121 # find locales
122 %find_lang %{name}.lang
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %post
128 %update_browser_plugins
129
130 %postun
131 if [ "$1" = 0 ]; then
132         %update_browser_plugins
133 fi
134
135 %files -f %{name}.lang
136 %defattr(644,root,root,755)
137
138 %{_browserpluginsconfdir}/browsers.d/%{name}.*
139 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
140
141 %attr(755,root,root) %{_bindir}/%{name}
142 %{_mandir}/man1/*.1*
143 %{_pixmapsdir}/%{name}.png
144 %{_desktopdir}/*.desktop
145 %dir %{_libdir}/%{name}
146 %{_libdir}/%{name}/chrome.pak
147 %{_libdir}/%{name}/resources.pak
148 %dir %{_libdir}/%{name}/locales
149 %dir %{_libdir}/%{name}/plugins
150 %{_libdir}/%{name}/resources
151 %{_libdir}/%{name}/themes
152 %attr(755,root,root) %{_libdir}/%{name}/chrome
153 # These unique permissions are intentional and necessary for the sandboxing
154 %attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox
155
156 %attr(755,root,root) %{_libdir}/%{name}/libpdf.so
157
158 %ifarch %{ix86}
159 # flash player
160 %{_libdir}/%{name}/plugin.vch
161 %attr(755,root,root) %{_libdir}/%{name}/libgcflashplayer.so
162 %endif
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 # bundle this copy until xdg-utils will have this itself
177 %attr(755,root,root) %{_libdir}/%{name}/xdg-settings
This page took 0.086819 seconds and 4 git commands to generate.