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