1 |
%define name opera |
2 |
%define version 12.12 |
3 |
%define rel 1 |
4 |
%define snap 0 |
5 |
%define buildnb 1707 |
6 |
|
7 |
%define tarball_base %{name}-%{version}-%{buildnb} |
8 |
|
9 |
%ifarch x86_64 |
10 |
%define pluginwrapper_32on64 %{_libdir}/%{name}/pluginwrapper/operapluginwrapper-ia32-linux |
11 |
%else |
12 |
%define pluginwrapper_32on64 %nil |
13 |
%endif |
14 |
|
15 |
# Exclude 32-bit requires on x86_64; 32-bit plugins will pull them themselves. |
16 |
%define arch_exclude_files_from_autoreq ^%{pluginwrapper_32on64}$ |
17 |
|
18 |
# Exclude requires on GTK/KDE toolkits, they are optional and used |
19 |
# automatically when present. |
20 |
%define common_exclude_files_from_autoreq ^%{_libdir}/%{name}/libopera.\\+\\.so$ |
21 |
|
22 |
%define _exclude_files_from_autoreq %{arch_exclude_files_from_autoreq}\\|%{common_exclude_files_from_autoreq} |
23 |
|
24 |
Summary: Opera Web Browser for Linux |
25 |
Name: %{name} |
26 |
Version: %{version} |
27 |
%if %snap |
28 |
Release: %mkrel 0.%buildnb.%rel |
29 |
%else |
30 |
Release: %mkrel %rel |
31 |
%endif |
32 |
%define shortver %(echo %version | tr -d .) |
33 |
Source0: http://get.opera.com/pub/opera/linux/%{shortver}/%{tarball_base}.i386.linux.tar.xz |
34 |
Source1: http://get.opera.com/pub/opera/linux/%{shortver}/%{tarball_base}.x86_64.linux.tar.xz |
35 |
Source2: bookmarks.adr |
36 |
License: Freeware |
37 |
Url: http://www.opera.com/ |
38 |
Group: Networking/WWW |
39 |
ExclusiveArch: %ix86 x86_64 |
40 |
BuildRequires: desktop-file-utils |
41 |
BuildRequires: sed |
42 |
# for html5 videos: |
43 |
Suggests: gstreamer0.10-plugins-base |
44 |
Suggests: gstreamer0.10-pulse |
45 |
# for wavparse, upstream packaging has requires on that: |
46 |
Suggests: gstreamer0.10-plugins-good |
47 |
|
48 |
%description |
49 |
Opera for Linux is an alternative feature-rich Web browser. |
50 |
|
51 |
%prep |
52 |
%ifarch x86_64 |
53 |
%setup -qTn %{name}-%{version}-%{buildnb}.%{_arch}.linux -b1 |
54 |
%else |
55 |
%setup -qTn %{name}-%{version}-%{buildnb}.%{_arch}.linux -b0 |
56 |
%endif |
57 |
|
58 |
%install |
59 |
rm -rf $RPM_BUILD_ROOT |
60 |
./install --system --repackage %{buildroot}%{_prefix} --prefix %{_prefix} |
61 |
|
62 |
%if "%_lib" != "lib" |
63 |
mv %{buildroot}%{_prefix}/lib %{buildroot}%{_libdir} |
64 |
%endif |
65 |
sed -i 's,/usr/lib,%{_libdir},' %{buildroot}%{_bindir}/opera |
66 |
|
67 |
rm -rf rpmdocs |
68 |
mv %{buildroot}%{_docdir}/opera rpmdocs |
69 |
|
70 |
# install bookmarks file into vendor defaults |
71 |
install -d -m755 %{buildroot}%_datadir/%name/custom/defaults |
72 |
install -m644 %{SOURCE2} %{buildroot}%_datadir/%name/custom/defaults/bookmarks.adr |
73 |
|
74 |
desktop-file-install --dir %{buildroot}%{_datadir}/applications \ |
75 |
--add-category=X-Mageia-CrossDesktop \ |
76 |
%{buildroot}%{_datadir}/applications/%{name}-browser.desktop |
77 |
|
78 |
# StartupNotify does not work correctly when opera is already running; |
79 |
# the already-existing window is activated and a new tab is opened |
80 |
# but the completion signal is not sent. |
81 |
sed -i -e 's/StartupNotify=.*/StartupNotify=false/' %{buildroot}%{_datadir}/applications/%{name}-browser.desktop |
82 |
|
83 |
%files |
84 |
%defattr(-,root,root) |
85 |
%doc rpmdocs/* |
86 |
%_bindir/opera |
87 |
|
88 |
%dir %_libdir/opera |
89 |
%_libdir/opera/gstreamer |
90 |
%_libdir/opera/libopera*.so |
91 |
%_libdir/opera/opera |
92 |
%_libdir/opera/plugins |
93 |
%dir %_libdir/opera/pluginwrapper |
94 |
%_libdir/opera/pluginwrapper/operapluginwrapper |
95 |
%_libdir/opera/pluginwrapper/operapluginwrapper-native |
96 |
%ifarch x86_64 |
97 |
%{pluginwrapper_32on64} |
98 |
%endif |
99 |
|
100 |
%_iconsdir/hicolor/*/apps/%{name}-*.* |
101 |
%_iconsdir/hicolor/*/mimetypes/%{name}-*.* |
102 |
%_datadir/applications/%{name}-browser.desktop |
103 |
%_datadir/mime/packages/%{name}-*.xml |
104 |
%_mandir/man1/opera* |
105 |
|
106 |
%dir %{_datadir}/opera |
107 |
%{_datadir}/opera/encoding.bin |
108 |
%{_datadir}/opera/*.dtd |
109 |
%{_datadir}/opera/*.sig |
110 |
%{_datadir}/opera/lngcode.txt |
111 |
%{_datadir}/opera/package-id.ini |
112 |
%{_datadir}/opera/html5_entity_init.dat |
113 |
%{_datadir}/opera/pubsuffix.xml |
114 |
%{_datadir}/opera/defaults |
115 |
%{_datadir}/opera/extra |
116 |
%{_datadir}/opera/skin |
117 |
%{_datadir}/opera/styles |
118 |
%{_datadir}/opera/ui |
119 |
%{_datadir}/opera/locale/en |
120 |
%{_datadir}/opera/region |
121 |
%{_datadir}/opera/custom |
122 |
|
123 |
# langs |
124 |
%dir %{_datadir}/%{name}/locale |
125 |
%lang(ar) %{_datadir}/%name/locale/ar |
126 |
%lang(be) %{_datadir}/%name/locale/be |
127 |
%lang(bg) %{_datadir}/%name/locale/bg |
128 |
%lang(cs) %{_datadir}/%name/locale/cs |
129 |
%lang(da) %{_datadir}/%name/locale/da |
130 |
%lang(de) %{_datadir}/%name/locale/de |
131 |
%lang(el) %{_datadir}/%name/locale/el |
132 |
%lang(en_GB) %{_datadir}/%name/locale/en-GB |
133 |
%lang(es) %{_datadir}/%name/locale/es-ES |
134 |
%lang(es) %{_datadir}/%name/locale/es-LA |
135 |
%lang(et) %{_datadir}/%name/locale/et |
136 |
%lang(fa) %{_datadir}/%name/locale/fa |
137 |
%lang(fi) %{_datadir}/%name/locale/fi |
138 |
%lang(fr) %{_datadir}/%name/locale/fr |
139 |
%lang(fr_CA) %{_datadir}/%name/locale/fr-CA |
140 |
%lang(fy) %{_datadir}/%name/locale/fy |
141 |
%lang(gd) %{_datadir}/%name/locale/gd |
142 |
%lang(he) %{_datadir}/%name/locale/he |
143 |
%lang(hi) %{_datadir}/%name/locale/hi |
144 |
%lang(hu) %{_datadir}/%name/locale/hu |
145 |
%lang(hr) %{_datadir}/%name/locale/hr |
146 |
%lang(id) %{_datadir}/%name/locale/id |
147 |
%lang(it) %{_datadir}/%name/locale/it |
148 |
%lang(ja) %{_datadir}/%name/locale/ja |
149 |
%lang(ka) %{_datadir}/%name/locale/ka |
150 |
%lang(kk) %{_datadir}/%name/locale/kk |
151 |
%lang(ko) %{_datadir}/%name/locale/ko |
152 |
%lang(lt) %{_datadir}/%name/locale/lt |
153 |
%lang(lv) %{_datadir}/%name/locale/lv |
154 |
%lang(mk) %{_datadir}/%name/locale/mk |
155 |
%lang(nn) %{_datadir}/%name/locale/nn |
156 |
%lang(nb) %{_datadir}/%name/locale/nb |
157 |
%lang(nl) %{_datadir}/%name/locale/nl |
158 |
%lang(pl) %{_datadir}/%name/locale/pl |
159 |
%lang(pt) %{_datadir}/%name/locale/pt |
160 |
%lang(pt_BR) %{_datadir}/%name/locale/pt-BR |
161 |
%lang(ro) %{_datadir}/%name/locale/ro |
162 |
%lang(ru) %{_datadir}/%name/locale/ru |
163 |
%lang(sk) %{_datadir}/%name/locale/sk |
164 |
%lang(sr) %{_datadir}/%name/locale/sr |
165 |
%lang(sv) %{_datadir}/%name/locale/sv |
166 |
%lang(te) %{_datadir}/%name/locale/te |
167 |
%lang(ta) %{_datadir}/%name/locale/ta |
168 |
%lang(tr) %{_datadir}/%name/locale/tr |
169 |
%lang(uk) %{_datadir}/%name/locale/uk |
170 |
%lang(vi) %{_datadir}/%name/locale/vi |
171 |
%lang(zh_CN) %{_datadir}/%name/locale/zh-cn |
172 |
%lang(zh_TW) %{_datadir}/%name/locale/zh-tw |
173 |
%lang(af) %{_datadir}/%name/locale/af |
174 |
%lang(az) %{_datadir}/%name/locale/az |
175 |
%lang(bn) %{_datadir}/%name/locale/bn |
176 |
%lang(me) %{_datadir}/%name/locale/me |
177 |
%lang(ms) %{_datadir}/%name/locale/ms |
178 |
%lang(pa) %{_datadir}/%name/locale/pa |
179 |
%lang(sw) %{_datadir}/%name/locale/sw |
180 |
%lang(th) %{_datadir}/%name/locale/th |
181 |
%lang(tl) %{_datadir}/%name/locale/tl |
182 |
%lang(ur) %{_datadir}/%name/locale/ur |
183 |
%lang(uz) %{_datadir}/%name/locale/uz |
184 |
%lang(zu) %{_datadir}/%name/locale/zu |