]>
Commit | Line | Data |
---|---|---|
a79ddb02 AM |
1 | # BRANCHES: |
2 | # - HEAD - stable version | |
3 | # - DEVEL - development version | |
4 | # - WEEKLY - weekly development version | |
5 | ||
11dece16 | 6 | # TODO: |
da8a77bf | 7 | # - move translations into a separate, noarch package |
6239047a | 8 | # |
ec0c336f AM |
9 | %bcond_without shared # static or shared version |
10 | %bcond_without distributable # distributable or not | |
11 | %bcond_without incall # include all tarballs into src.rpm (but splitted into shared/static) | |
09f2d772 | 12 | |
e954ef1b SP |
13 | %define ver 9.27 |
14 | %define sver 9.27 | |
94132831 | 15 | %define fix %{nil} |
e954ef1b SP |
16 | %define dirrel 20080331 |
17 | %define dirrel_alt 20080331 | |
6f7271b8 | 18 | %define reltype final |
e954ef1b | 19 | %define magicstr 709 |
e56cf118 | 20 | |
6fe34fc1 | 21 | %define shver %(echo %{ver} | tr -d .)%{fix} |
7d7762ad | 22 | %define x86_shared_rel %{dirrel}.6 |
655debcb | 23 | %define x86_static_rel %{dirrel}.1 |
7d7762ad AM |
24 | %define sparc_shared_rel %{dirrel_alt}.2 |
25 | %define sparc_static_rel %{dirrel_alt}.1 | |
a8b8cbf5 | 26 | %define ppc_shared_rel %{dirrel}.3 |
655debcb | 27 | %define ppc_static_rel %{dirrel}.1 |
ae712f51 | 28 | |
09f2d772 | 29 | %if %{with shared} |
855b190b ER |
30 | %define type shared |
31 | # We should be able to build src.rpm also on not supported archs | |
32 | %define rel %{x86_shared_rel} | |
33 | %ifarch sparc sparcv9 | |
34 | %define rel %{sparc_shared_rel} | |
9861ac5b ER |
35 | %endif |
36 | %ifarch ppc | |
37 | %define rel %{ppc_shared_rel} | |
855b190b | 38 | %endif |
e1672e97 | 39 | %else |
855b190b ER |
40 | %define type static |
41 | %define rel %{x86_static_rel} | |
42 | %ifarch sparc sparcv9 | |
43 | %define rel %{sparc_static_rel} | |
9861ac5b ER |
44 | %endif |
45 | %ifarch ppc | |
46 | %define rel %{ppc_static_rel} | |
855b190b | 47 | %endif |
e1672e97 | 48 | %endif |
2dbc1636 | 49 | |
b6dbc9f6 AM |
50 | # define to 0 and then redefine to avoid |
51 | # not defined macros | |
cbb8dbd3 | 52 | %define need_ix86_shared 0 |
53 | %define need_sparc_shared 0 | |
54 | %define need_ppc_shared 0 | |
55 | %define need_ix86_static 0 | |
56 | %define need_sparc_static 0 | |
57 | %define need_ppc_static 0 | |
b6dbc9f6 | 58 | |
40d43d2d | 59 | %if %{with incall} |
855b190b ER |
60 | %if %{with shared} |
61 | %define need_ix86_shared 1 | |
62 | %define need_sparc_shared 1 | |
63 | %define need_ppc_shared 1 | |
64 | %else | |
65 | %define need_ix86_static 1 | |
66 | %define need_sparc_static 1 | |
67 | %define need_ppc_static 1 | |
68 | %endif | |
40d43d2d | 69 | %else |
befc1acc ER |
70 | %ifarch sparc sparc64 |
71 | %if %{with shared} | |
72 | %define need_sparc_shared 1 | |
855b190b | 73 | %else |
befc1acc ER |
74 | %define need_sparc_static 1 |
75 | %endif | |
76 | %endif | |
77 | %ifarch ppc | |
78 | %if %{with shared} | |
79 | %define need_ppc_shared 1 | |
80 | %else | |
81 | %define need_ppc_static 1 | |
855b190b ER |
82 | %endif |
83 | %endif | |
e1672e97 | 84 | %endif |
40d43d2d | 85 | |
86 | Summary: World fastest web browser | |
0580138e | 87 | Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie |
40d43d2d | 88 | Name: opera |
8ae0cb0b | 89 | Version: %{ver}%{fix} |
767a5d1d | 90 | Release: 2 |
94132831 | 91 | Epoch: 2 |
ae712f51 | 92 | License: Distributable |
40d43d2d | 93 | Group: X11/Applications/Networking |
94 | ||
5949283a | 95 | %if %{need_ix86_static} |
81a3f5ef | 96 | Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2 |
bfec41aa | 97 | # Source0-md5: 96b8010ddb0ff250817c7fb314de2d26 |
5949283a | 98 | %{!?with_distributable:NoSource: 0} |
99 | %endif | |
100 | ||
5949283a | 101 | %if %{need_sparc_static} |
81a3f5ef | 102 | Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2 |
bfec41aa | 103 | # Source1-md5: c8443b4b83b21a56fdd8dc3526eaf46f |
7187d619 | 104 | %{!?with_distributable:NoSource: 1} |
5949283a | 105 | %endif |
106 | ||
5949283a | 107 | %if %{need_ppc_static} |
81a3f5ef | 108 | Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2 |
bfec41aa | 109 | # Source2-md5: be68f701224493bbd9a6d62df8eb9b19 |
5949283a | 110 | %{!?with_distributable:NoSource: 2} |
111 | %endif | |
40d43d2d | 112 | |
5949283a | 113 | %if %{need_ix86_shared} |
81a3f5ef | 114 | Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2 |
e954ef1b | 115 | # Source20-md5: cc9a97ae719645b2a2ff092521ab9b6d |
5949283a | 116 | %{!?with_distributable:NoSource: 20} |
117 | %endif | |
118 | ||
5949283a | 119 | %if %{need_sparc_shared} |
81a3f5ef | 120 | Source21: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/shared/gcc-2.95/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2 |
e954ef1b | 121 | # Source21-md5: 33a3437d01c0f24fc3d40e3ccb08c23c |
5949283a | 122 | %{!?with_distributable:NoSource: 21} |
123 | %endif | |
124 | ||
40d43d2d | 125 | |
5949283a | 126 | %if %{need_ppc_shared} |
81a3f5ef | 127 | Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/gcc-2.95/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2 |
e954ef1b | 128 | # Source22-md5: 04ba581b52eb8d21c8889a717f2dbbae |
5949283a | 129 | %{!?with_distributable:NoSource: 22} |
130 | %endif | |
131 | ||
2dbc1636 | 132 | Source4: %{name}.desktop |
35677f25 | 133 | Patch0: %{name}-wrapper.patch |
8cb331c2 | 134 | URL: http://www.opera.com/ |
f6dbdb8e | 135 | BuildRequires: rpmbuild(macros) >= 1.356 |
6eebcb83 | 136 | BuildRequires: sed >= 4.0 |
f6dbdb8e | 137 | Requires: browser-plugins >= 2.0 |
2f4fa75a | 138 | Requires: freetype >= 2 |
3b8cc5d5 | 139 | Provides: wwwbrowser |
ae712f51 | 140 | ExclusiveArch: %{ix86} ppc sparc sparcv9 |
8cb331c2 | 141 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
1e3271ab | 142 | |
fa79b8f2 | 143 | %define _plugindir %{_libdir}/opera/plugins |
7e80713c | 144 | %define _operadocdir %{_docdir}/%{name}-%{ver} |
8cb331c2 | 145 | |
146 | %description | |
147 | Opera is world fastest web browser. It supports most of nowaday | |
2bc795a6 | 148 | extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically} |
a97be43d | 149 | linked with Qt. |
8cb331c2 | 150 | |
14283174 JR |
151 | %description -l pl.UTF-8 |
152 | Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość | |
153 | dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta | |
2bc795a6 | 154 | wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt. |
58d714bb | 155 | |
8cb331c2 | 156 | %prep |
643785f9 | 157 | %ifarch %{ix86} |
ae712f51 | 158 | %setup -q -T -b %{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}} |
2d8d939d | 159 | %endif |
903d158e | 160 | %ifarch sparc sparcv9 |
3d59af54 | 161 | %setup -q -T -b %{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en%{?magicstr:-%{magicstr}} |
643785f9 | 162 | %endif |
195ff7d0 | 163 | %ifarch ppc |
ae712f51 | 164 | %setup -q -T -b %{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}} |
b966c84f | 165 | %endif |
35677f25 | 166 | %patch0 -p1 |
8cb331c2 | 167 | |
168 | %install | |
169 | rm -rf $RPM_BUILD_ROOT | |
54d2851e | 170 | install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}} |
8cb331c2 | 171 | |
f6dbdb8e ER |
172 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF' |
173 | # opera does not use for .xpt files | |
174 | *.xpt | |
6ab3a1e1 ER |
175 | |
176 | # use mplayerplug-in-opera instead | |
177 | mplayerplug-in* | |
929e48ab ER |
178 | |
179 | # opera uses libjava.so to run java | |
180 | libjavaplugin_oji.so | |
f6dbdb8e ER |
181 | EOF |
182 | ||
51e47e74 | 183 | sh install.sh \ |
7e80713c KK |
184 | DESTDIR=$RPM_BUILD_ROOT \ |
185 | --prefix=%{_prefix} \ | |
2d8d939d ER |
186 | --exec_prefix=%{_libdir}/%{name}/bin \ |
187 | --plugindir=%{_libdir}/%{name}/plugins \ | |
7e80713c | 188 | --docdir=%{_operadocdir} |
6239047a | 189 | |
51e47e74 | 190 | # install in kde etc. |
7b1a5f81 | 191 | install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir} |
a8029af7 | 192 | |
54d2851e | 193 | mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir} |
bbfb0780 | 194 | install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir} |
72b0ae2b | 195 | |
8cb331c2 | 196 | %clean |
197 | rm -rf $RPM_BUILD_ROOT | |
198 | ||
f6dbdb8e ER |
199 | %post |
200 | %update_browser_plugins | |
201 | ||
202 | %postun | |
203 | if [ "$1" = 0 ]; then | |
204 | %update_browser_plugins | |
205 | fi | |
206 | ||
8cb331c2 | 207 | %files |
208 | %defattr(644,root,root,755) | |
c2ef0548 | 209 | %doc LICENSE |
54d2851e | 210 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc* |
f6dbdb8e ER |
211 | |
212 | # browser plugins v2 | |
213 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
214 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
215 | ||
1cfa2d1b | 216 | %attr(755,root,root) %{_bindir}/* |
1e3271ab | 217 | %dir %{_libdir}/opera |
98c525bc AM |
218 | %dir %{_libdir}/opera/bin |
219 | %attr(755,root,root) %{_libdir}/opera/bin/* | |
1e3271ab | 220 | %dir %{_plugindir} |
51e47e74 | 221 | %attr(755,root,root) %{_plugindir}/* |
a5b49fac KK |
222 | %dir %{_datadir}/opera |
223 | %{_datadir}/opera/*.* | |
a5b49fac KK |
224 | %{_datadir}/opera/ini |
225 | %{_datadir}/opera/java | |
ae712f51 | 226 | %{_datadir}/opera/images |
a5b49fac KK |
227 | %{_datadir}/opera/skin |
228 | %{_datadir}/opera/styles | |
f8b4ca83 | 229 | %dir %{_datadir}/opera/locale |
230 | %{_datadir}/opera/locale/en | |
a6bb5241 | 231 | %{_datadir}/opera/locale/english.lng |
7b1a5f81 | 232 | %{_desktopdir}/*.desktop |
1e3271ab | 233 | %{_mandir}/man1/opera.1* |
7e80713c | 234 | %{_pixmapsdir}/opera.xpm |