1 |
%define name opera |
2 |
%define version 11.10 |
3 |
%define rel 2 |
4 |
%define snap 0 |
5 |
%define buildnb 2092 |
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 |
BuildRoot: %{_tmppath}/%{name}-buildroot |
37 |
ExclusiveArch: %ix86 x86_64 |
38 |
BuildRequires: desktop-file-utils |
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-MandrivaLinux-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 |
echo "StartupNotify=false" >> %{buildroot}%{_datadir}/applications/%{name}-browser.desktop |
73 |
|
74 |
%clean |
75 |
rm -rf $RPM_BUILD_ROOT |
76 |
|
77 |
%files |
78 |
%defattr(-,root,root) |
79 |
%doc rpmdocs/* |
80 |
%_bindir/opera |
81 |
%_bindir/opera-widget-manager |
82 |
%_libdir/opera |
83 |
|
84 |
%_iconsdir/hicolor/*/apps/%{name}-*.* |
85 |
%_iconsdir/hicolor/*/mimetypes/%{name}-*.* |
86 |
%_datadir/applications/%{name}-browser.desktop |
87 |
%_datadir/applications/%{name}-widget-installer.desktop |
88 |
%_datadir/applications/%{name}-widget-manager.desktop |
89 |
%_datadir/mime/packages/%{name}-*.xml |
90 |
%_mandir/man1/opera* |
91 |
|
92 |
%dir %{_datadir}/opera |
93 |
%{_datadir}/opera/encoding.bin |
94 |
%{_datadir}/opera/*.dtd |
95 |
%{_datadir}/opera/lngcode.txt |
96 |
%{_datadir}/opera/package-id.ini |
97 |
%{_datadir}/opera/defaults |
98 |
%{_datadir}/opera/extra |
99 |
%{_datadir}/opera/files.sig |
100 |
%{_datadir}/opera/files_old.sig |
101 |
%{_datadir}/opera/package |
102 |
%{_datadir}/opera/skin |
103 |
%{_datadir}/opera/styles |
104 |
%{_datadir}/opera/ui |
105 |
%{_datadir}/opera/unite |
106 |
%{_datadir}/opera/locale/en |
107 |
|
108 |
# langs |
109 |
%dir %{_datadir}/%{name}/locale |
110 |
%lang(af) %{_datadir}/opera/locale/af |
111 |
%lang(az) %{_datadir}/opera/locale/az |
112 |
%lang(be) %{_datadir}/%name/locale/be |
113 |
%lang(bg) %{_datadir}/%name/locale/bg |
114 |
%lang(cs) %{_datadir}/%name/locale/cs |
115 |
%lang(da) %{_datadir}/%name/locale/da |
116 |
%lang(de) %{_datadir}/%name/locale/de |
117 |
%lang(el) %{_datadir}/%name/locale/el |
118 |
%lang(en_GB) %{_datadir}/%name/locale/en-GB |
119 |
%lang(es) %{_datadir}/%name/locale/es-ES |
120 |
%lang(es) %{_datadir}/%name/locale/es-LA |
121 |
%lang(et) %{_datadir}/%name/locale/et |
122 |
%lang(fi) %{_datadir}/%name/locale/fi |
123 |
%lang(fr) %{_datadir}/%name/locale/fr |
124 |
%lang(fr_CA) %{_datadir}/%name/locale/fr-CA |
125 |
%lang(fy) %{_datadir}/%name/locale/fy |
126 |
%lang(gd) %{_datadir}/opera/locale/gd |
127 |
%lang(hi) %{_datadir}/%name/locale/hi |
128 |
%lang(hr) %{_datadir}/%name/locale/hr |
129 |
%lang(hu) %{_datadir}/%name/locale/hu |
130 |
%lang(id) %{_datadir}/%name/locale/id |
131 |
%lang(it) %{_datadir}/%name/locale/it |
132 |
%lang(ja) %{_datadir}/%name/locale/ja |
133 |
%lang(ka) %{_datadir}/%name/locale/ka |
134 |
%lang(ko) %{_datadir}/%name/locale/ko |
135 |
%lang(lt) %{_datadir}/%name/locale/lt |
136 |
%lang(me) %{_datadir}/opera/locale/me |
137 |
%lang(mk) %{_datadir}/%name/locale/mk |
138 |
%lang(ms) %{_datadir}/opera/locale/ms |
139 |
%lang(nb) %{_datadir}/%name/locale/nb |
140 |
%lang(nl) %{_datadir}/%name/locale/nl |
141 |
%lang(nn) %{_datadir}/%name/locale/nn |
142 |
%lang(pl) %{_datadir}/%name/locale/pl |
143 |
%lang(pt) %{_datadir}/%name/locale/pt |
144 |
%lang(pt_BR) %{_datadir}/%name/locale/pt-BR |
145 |
%lang(ro) %{_datadir}/%name/locale/ro |
146 |
%lang(ru) %{_datadir}/%name/locale/ru |
147 |
%lang(sk) %{_datadir}/%name/locale/sk |
148 |
%lang(sr) %{_datadir}/%name/locale/sr |
149 |
%lang(sv) %{_datadir}/%name/locale/sv |
150 |
%lang(ta) %{_datadir}/%name/locale/ta |
151 |
%lang(te) %{_datadir}/%name/locale/te |
152 |
%lang(th) %{_datadir}/opera/locale/th |
153 |
%lang(tl) %{_datadir}/opera/locale/tl |
154 |
%lang(tr) %{_datadir}/%name/locale/tr |
155 |
%lang(uk) %{_datadir}/%name/locale/uk |
156 |
%lang(uz) %{_datadir}/opera/locale/uz |
157 |
%lang(vi) %{_datadir}/%name/locale/vi |
158 |
%lang(zh_CN) %{_datadir}/%name/locale/zh-cn |
159 |
%lang(zh_TW) %{_datadir}/%name/locale/zh-tw |