]> git.pld-linux.org Git - packages/opera.git/blob - opera.spec
- 4728 (10.10 rc3)
[packages/opera.git] / opera.spec
1 # BRANCHES:
2 # - HEAD - stable version
3 # - DEVEL - development version
4 # - WEEKLY - weekly development version (sometimes it's on DEVEL)
5
6 %bcond_without  shared          # static or shared version
7 %bcond_without  distributable   # distributable or not
8 %bcond_with     snap            # snap version
9 %bcond_with     weekly          # weekly snapshot version
10 %bcond_with     qt4
11
12 %define ver             10.10
13 %define reltype         rc
14 %define magicstr        4728
15
16 %define sver            %{ver}
17 %define shver           %(echo %{ver} | tr -d .)
18 %define sreltype        %(echo %{reltype} | tr - _)
19 %define smagicstr       %{magicstr}
20
21 # http://my.opera.com/csant/blog/2007/09/06/which-is-which
22 # http://my.opera.com/csant/blog/2008/05/20/which-is-which-part-two
23 %define x86_static_rel          gcc4-static-qt3
24 %define sparc_shared_rel        unknown
25 %define sparc_static_rel        unknown
26 %define ppc_shared_rel          gcc4-shared-qt3
27 %define ppc_static_rel          gcc295-static-qt3
28 %define x86_64_static_rel       unknown
29
30 %if %{with qt4}
31 %define x86_64_shared_rel       gcc4-qt4
32 %define x86_shared_rel          gcc4-qt4
33 %else
34 %define x86_64_shared_rel       gcc4-shared-qt3
35 %define x86_shared_rel          gcc4-shared-qt3
36 %endif
37
38 %if %{with shared}
39
40 %define type            shared
41
42 # Defined to be able to build src.rpm also on not supported archs
43 %define rawrel          %{x86_shared_rel}
44
45 %ifarch sparc sparcv9
46 %define rawrel          %{sparc_shared_rel}
47 %endif
48
49 %ifarch ppc
50 %define rawrel          %{ppc_shared_rel}
51 %endif
52
53 %ifarch %{x8664}
54 %define rawrel          %{x86_64_shared_rel}
55 %endif
56
57 %else # [with shared]
58
59 %define type            static
60
61 # Defined to be able to build src.rpm also on not supported archs
62 %define rawrel          %{x86_static_rel}
63
64 %ifarch sparc sparcv9
65 %define rawrel          %{sparc_static_rel}
66 %endif
67
68 %ifarch ppc
69 %define rawrel          %{ppc_static_rel}
70 %endif
71
72 %ifarch %{x8664}
73 %define rawrel             %{x86_64_static_rel}
74 %endif
75
76 %endif # [with shared]
77
78 %define rel     %(echo %{rawrel} | tr - _)
79
80 %define         _rel    1
81 Summary:        World fastest web browser
82 Summary(pl.UTF-8):      Najszybsza przeglądarka WWW na świecie
83 Name:           opera
84 Version:        %{ver}
85 Release:        0.%{?magicstr:%{magicstr}.}%{rel}.%{_rel}.%{sreltype}
86 Epoch:          2
87 License:        Distributable
88 Group:          X11/Applications/Networking
89
90 Source0:        http://snapshot.opera.com/unix/%{sreltype}-%{smagicstr}/intel-linux/%{name}-%{sver}-%{magicstr}.%{x86_shared_rel}.i386.tar.bz2
91 # Source0-md5:  44ca2800893de5b750b3ba245806166b
92 %{!?with_distributable:NoSource:        0}
93
94 #Source1:       http://snapshot.opera.com/unix/%{sreltype}-%{smagicstr}/sparc-linux/%{name}-%{sver}-%{magicstr}.%{sparc_shared_rel}-shared-qt.sparc.tar.bz2
95 ## Source1-md5: 913ccb28106f9f5acd3d94c8dc71ae1
96 #%{!?with_distributable:NoSource:       1}
97
98 #Source2:       http://snapshot.opera.com/unix/%{sreltype}-%{smagicstr}/ppc-linux/%{name}-%{sver}-%{magicstr}.%{ppc_shared_rel}.ppc.tar.bz2
99 ## Source2-md5: d8e072e6aad39ea3432658f68a455bc3
100 #%{!?with_distributable:NoSource:       2}
101
102 Source3:        http://snapshot.opera.com/unix/%{sreltype}-%{smagicstr}/x86_64-linux/%{name}-%{sver}-%{magicstr}.%{x86_64_shared_rel}.x86_64.tar.bz2
103 # Source3-md5:  30bb60ca2d8a951666180dc49571a6f5
104 %{!?with_distributable:NoSource:        3}
105
106 #Source10:      http://snapshot.opera.com/unix/%{sreltype}-%{smagicstr}/intel-linux/%{name}-%{sver}-%{magicstr}.%{x86_static_rel}.i386.tar.bz2
107 # Source10-md5: 9dae78bcbf2b315cd57b0ea3dc9a24df
108 #%{!?with_distributable:NoSource:       10}
109
110 #Source11:      http://snapshot.opera.com/unix/%{sreltype}-%{smagicstr}/sparc-linux/%{name}-%{sver}-%{magicstr}.%{sparc_static_rel}.sparc.tar.bz2
111 ## Source11-md5:        e190021f5530de3f711006cd9f6bb339
112 #%{!?with_distributable:NoSource:       11}
113
114 #Source12:      http://snapshot.opera.com/unix/%{sreltype}-%{smagicstr}/ppc-linux/%{name}-%{sver}-%{magicstr}.%{ppc_static_rel}.ppc.tar.bz2
115 ## Source12-md5:        59c2f6f710c2efabeac9e153fa934743
116 #%{!?with_distributable:NoSource:       12}
117
118 #Source13:      http://snapshot.opera.com/unix/%{sreltype}-%{smagicstr}/x86_64-linux/%{name}-%{sver}-%{magicstr}.%{x86_64_static_rel}.x86_64.tar.bz2
119 ## Source13-md5:        40b850632dbb729a0bb16a1c450d97e5
120 #%{!?with_distributable:NoSource:       13}
121
122 Source4:        %{name}.desktop
123 Patch0:         %{name}-wrapper.patch
124 URL:            http://www.opera.com/
125 BuildRequires:  rpmbuild(macros) >= 1.356
126 BuildRequires:  sed >= 4.0
127 Requires:       browser-plugins >= 2.0
128 Requires:       freetype >= 2
129 Provides:       wwwbrowser
130 Obsoletes:      opera-i18n
131 ExclusiveArch:  %{ix86} %{x8664} ppc sparc sparcv9
132 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
133
134 %define         _plugindir      %{_libdir}/opera/plugins
135 %define         _operadocdir    %{_docdir}/%{name}-%{ver}
136
137 %description
138 Opera is world fastest web browser. It supports most of nowaday
139 extensions of HTML. And it is quite stable. This version is
140 %{?with_shared:shared}%{!?with_shared:statically} linked with Qt.
141
142 %description -l pl.UTF-8
143 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
144 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
145 wersja jest skonsolidowana
146 %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
147
148 %package plugin32
149 Summary:        Opera 32-bit plugins support
150 Summary(pl.UTF-8):      Obsługa 32-bitowych wtyczek Opery
151 Group:          X11/Applications/Networking
152 Requires:       %{name} = %{epoch}:%{version}-%{release}
153
154 %description plugin32
155 Opera 32-bit plugins support.
156
157 %description plugin32 -l pl.UTF-8
158 Obsługa 32-bitowych wtyczek Opery.
159
160 %prep
161 %ifarch %{ix86}
162 %setup -q -T -b %{!?with_shared:1}0 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.i386
163 %endif
164
165 %ifarch sparc sparcv9
166 %setup -q -T -b %{!?with_shared:1}1 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.sparc
167 %endif
168
169 %ifarch ppc
170 %setup -q -T -b %{!?with_shared:1}2 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.ppc
171 %endif
172
173 %ifarch %{x8664}
174 %setup -q -T -b %{!?with_shared:1}3 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.x86_64
175 %endif
176
177 %patch0 -p1
178
179 %install
180 rm -rf $RPM_BUILD_ROOT
181 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
182
183 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
184 # opera does not use for .xpt files
185 *.xpt
186
187 # use mplayerplug-in-opera instead
188 mplayerplug-in*
189
190 # opera uses libjava.so to run java
191 libjavaplugin_oji.so
192 EOF
193
194 sh install.sh \
195         DESTDIR=$RPM_BUILD_ROOT \
196         --prefix=%{_prefix} \
197         --exec_prefix=%{_libdir}/%{name}/bin \
198         --plugindir=%{_libdir}/%{name}/plugins \
199         --docdir=%{_operadocdir}
200
201 # install in kde etc.
202 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
203
204 install etc/* $RPM_BUILD_ROOT%{_sysconfdir}
205 install usr/share/pixmaps/*.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
206
207 %clean
208 rm -rf $RPM_BUILD_ROOT
209
210 %post
211 %update_browser_plugins
212
213 %postun
214 if [ "$1" = 0 ]; then
215         %update_browser_plugins
216 fi
217
218 %files
219 %defattr(644,root,root,755)
220 %doc LICENSE
221 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini
222
223 # browser plugins v2
224 %{_browserpluginsconfdir}/browsers.d/%{name}.*
225 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
226
227 %attr(755,root,root) %{_bindir}/*
228 %dir %{_libdir}/opera
229 %dir %{_libdir}/opera/bin
230 %attr(755,root,root) %{_libdir}/opera/bin/*
231 %ifarch %{x8664}
232 %exclude %{_libdir}/opera/bin/*-ia32-*
233 %endif
234 %dir %{_plugindir}
235 %dir %{_datadir}/opera
236 %{_datadir}/opera/*.*
237 %{_datadir}/opera/defaults
238 %{_datadir}/opera/extra
239 %{_datadir}/opera/java
240 %{_datadir}/opera/skin
241 %{_datadir}/opera/scripts
242 %{_datadir}/opera/styles
243 %{_datadir}/opera/ui
244 %{_datadir}/opera/unite
245 %dir %{_datadir}/opera/locale
246 %{_datadir}/opera/locale/en
247 %lang(be) %{_datadir}/opera/locale/be
248 %lang(bg) %{_datadir}/opera/locale/bg
249 %lang(cs) %{_datadir}/opera/locale/cs
250 %lang(da) %{_datadir}/opera/locale/da
251 %lang(de) %{_datadir}/opera/locale/de
252 %lang(el) %{_datadir}/opera/locale/el
253 %lang(en_GB) %{_datadir}/opera/locale/en-GB
254 %lang(es_ES) %{_datadir}/opera/locale/es-ES
255 %lang(es_LA) %{_datadir}/opera/locale/es-LA
256 %lang(et) %{_datadir}/opera/locale/et
257 %lang(fi) %{_datadir}/opera/locale/fi
258 %lang(fr) %{_datadir}/opera/locale/fr
259 %lang(fr_CA) %{_datadir}/opera/locale/fr-CA
260 %lang(fy) %{_datadir}/opera/locale/fy
261 %lang(hi) %{_datadir}/opera/locale/hi
262 %lang(hr) %{_datadir}/opera/locale/hr
263 %lang(hu) %{_datadir}/opera/locale/hu
264 %lang(id) %{_datadir}/opera/locale/id
265 %lang(it) %{_datadir}/opera/locale/it
266 %lang(ja) %{_datadir}/opera/locale/ja
267 %lang(ka) %{_datadir}/opera/locale/ka
268 %lang(ko) %{_datadir}/opera/locale/ko
269 %lang(lt) %{_datadir}/opera/locale/lt
270 %lang(mk) %{_datadir}/opera/locale/mk
271 %lang(nb) %{_datadir}/opera/locale/nb
272 %lang(nl) %{_datadir}/opera/locale/nl
273 %lang(nn) %{_datadir}/opera/locale/nn
274 %lang(pl) %{_datadir}/opera/locale/pl
275 %lang(pt) %{_datadir}/opera/locale/pt
276 %lang(pt_BR) %{_datadir}/opera/locale/pt-BR
277 %lang(ro) %{_datadir}/opera/locale/ro
278 %lang(ru) %{_datadir}/opera/locale/ru
279 %lang(sk) %{_datadir}/opera/locale/sk
280 %lang(sr) %{_datadir}/opera/locale/sr
281 %lang(sv) %{_datadir}/opera/locale/sv
282 %lang(ta) %{_datadir}/opera/locale/ta
283 %lang(te) %{_datadir}/opera/locale/te
284 %lang(tr) %{_datadir}/opera/locale/tr
285 %lang(uk) %{_datadir}/opera/locale/uk
286 %lang(zh_CN) %{_datadir}/opera/locale/zh-cn
287 %lang(zh_HK) %{_datadir}/opera/locale/zh-hk
288 %lang(zh_TW) %{_datadir}/opera/locale/zh-tw
289 %{_desktopdir}/*.desktop
290 %{_mandir}/man1/opera.1*
291 %{_pixmapsdir}/opera.xpm
292
293 %ifarch %{x8664}
294 %files plugin32
295 %defattr(644,root,root,755)
296 %attr(755,root,root) %{_libdir}/opera/bin/*-ia32-*
297 %endif
This page took 0.204494 seconds and 4 git commands to generate.