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