]> git.pld-linux.org Git - packages/opera.git/blob - opera.spec
- fix sparc build (enable sparc shared). why it was disabled?; rel 2
[packages/opera.git] / opera.spec
1 # BRANCHES:
2 # - HEAD - stable version
3 # - DEVEL - development version
4 # - WEEKLY - weekly development version
5
6 # TODO:
7 # - move translations into a separate, noarch package
8 #
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)
12
13 %define ver             9.24
14 %define sver            9.24
15 %define fix             %{nil}
16 %define dirrel          20071015
17 %define reltype         final
18 %define magicstr        671
19
20 %define shver           %(echo %{ver} | tr -d .)%{fix}
21 %define x86_shared_rel          %{dirrel}.5
22 %define x86_static_rel          %{dirrel}.1
23 %define sparc_shared_rel        %{dirrel}.2
24 %define sparc_static_rel        %{dirrel}.1
25 %define ppc_shared_rel          %{dirrel}.3
26 %define ppc_static_rel          %{dirrel}.1
27
28 %if %{with shared}
29 %define type            shared
30 # We should be able to build src.rpm also on not supported archs
31 %define rel             %{x86_shared_rel}
32 %ifarch sparc sparcv9
33 #%%define       rel             %{sparc_shared_rel}
34 %define rel             %{sparc_static_rel}
35 %else
36 %ifarch ppc
37 %define rel             %{ppc_shared_rel}
38 %endif
39 %endif
40 %else
41 %define type            static
42 %define rel             %{x86_static_rel}
43 %ifarch sparc sparcv9
44 %define rel             %{sparc_static_rel}
45 %else
46 %ifarch ppc
47 %define rel             %{ppc_static_rel}
48 %endif
49 %endif
50 %endif
51
52 # define to 0 and then redefine to avoid
53 # not defined macros
54 %define need_ix86_shared        0
55 %define need_sparc_shared       0
56 %define need_ppc_shared         0
57 %define need_ix86_static        0
58 %define need_sparc_static       0
59 %define need_ppc_static         0
60
61 %if %{with incall}
62 #       with incall?    [if]
63 %if %{with shared}
64 #                       with shared?    [if]
65 %define need_ix86_shared        1
66 %define need_sparc_shared       1
67 %define need_ppc_shared 1
68 %else
69 #                       with shared:    [else]
70 %define need_ix86_static        1
71 %define need_sparc_static       1
72 %define need_ppc_static 1
73 %endif
74 #                       with shared;    [endif]
75 %else
76 #       with incall:    [else]
77 %ifarch %{ix86}
78 #               is ix86?        [if]
79 %else
80 #               is ix86:        [else]
81 %ifarch sparc sparc64
82 #               is sparc?       [if]
83 %if     %{with shared}
84 #                               with shared?    [if]
85 %define need_sparc_shared       1
86 %else
87 #                               with shared:    [else]
88 %define need_sparc_static       1
89 %endif
90 #                               with shared;    [endif]
91 %else
92 #               is sparc:       [else]
93 %ifarch ppc
94 #               is ppc?         [if]
95 %if     %{with shared}
96 #                               with shared?    [if]
97 %define need_ppc_shared 1
98 %else
99 #                               with shared:    [else]
100 %define need_ppc_static 1
101 %endif
102 #                               with shared;    [endif]
103 %endif
104 #               is ppc;         [endif]
105 %endif
106 #               is sparc;       [endif]
107 %endif
108 #               is ix86;        [endif]
109 %endif
110 #       with incall;    [endif]
111
112 %define         _rel    2
113 Summary:        World fastest web browser
114 Summary(pl.UTF-8):      Najszybsza przeglądarka WWW na świecie
115 Name:           opera
116 Version:        %{ver}%{fix}
117 Release:        %{_rel}
118 Epoch:          2
119 License:        Distributable
120 Group:          X11/Applications/Networking
121
122 %if %{need_ix86_static}
123 Source0:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
124 # Source0-md5:  96b8010ddb0ff250817c7fb314de2d26
125 %{!?with_distributable:NoSource:        0}
126 %endif
127
128 %if %{need_sparc_static}
129 Source1:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
130 # Source1-md5:  c8443b4b83b21a56fdd8dc3526eaf46f
131 %{!?with_distributable:NoSource:        1}
132 %endif
133
134 %if %{need_ppc_static}
135 Source2:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
136 # Source2-md5:  be68f701224493bbd9a6d62df8eb9b19
137 %{!?with_distributable:NoSource:        2}
138 %endif
139
140 %if %{need_ix86_shared}
141 Source20:       ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
142 # Source20-md5: e7d934c0fe9ce0ef7cec67981b71332d
143 %{!?with_distributable:NoSource:        20}
144 %endif
145
146 %if %{need_sparc_shared}
147 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
148 # Source21-md5: 84df0097ac9c52e95bc74e73407386ee
149 %{!?with_distributable:NoSource:        21}
150 %endif
151
152
153 %if %{need_ppc_shared}
154 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
155 # Source22-md5: 07f97223ffcb2d2ab87c921ead880018
156 %{!?with_distributable:NoSource:        22}
157 %endif
158
159 Source4:        %{name}.desktop
160 Patch0:         %{name}-wrapper.patch
161 URL:            http://www.opera.com/
162 BuildRequires:  rpmbuild(macros) >= 1.356
163 BuildRequires:  sed >= 4.0
164 Requires:       browser-plugins >= 2.0
165 Requires:       freetype >= 2
166 Provides:       wwwbrowser
167 ExclusiveArch:  %{ix86} ppc sparc sparcv9
168 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
169
170 %define         _plugindir      %{_libdir}/opera/plugins
171 %define         _operadocdir    %{_docdir}/%{name}-%{ver}
172
173 %description
174 Opera is world fastest web browser. It supports most of nowaday
175 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
176 linked with Qt.
177
178 %description -l pl.UTF-8
179 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
180 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
181 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
182
183 %prep
184 %ifarch %{ix86}
185 %setup -q -T -b %{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}}
186 %endif
187 %ifarch sparc sparcv9
188 %setup -q -T -b %{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en-en%{?magicstr:-%{magicstr}}
189 %endif
190 %ifarch ppc
191 %setup -q -T -b %{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}}
192 %endif
193 %patch0 -p1
194
195 %install
196 rm -rf $RPM_BUILD_ROOT
197 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
198
199 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
200 # opera does not use for .xpt files
201 *.xpt
202
203 # use mplayerplug-in-opera instead
204 mplayerplug-in*
205
206 # opera uses libjava.so to run java
207 libjavaplugin_oji.so
208 EOF
209
210 sh install.sh \
211         DESTDIR=$RPM_BUILD_ROOT \
212         --prefix=%{_prefix} \
213         --exec_prefix=%{_libdir}/%{name}/bin \
214         --plugindir=%{_libdir}/%{name}/plugins \
215         --docdir=%{_operadocdir}
216
217 # install in kde etc.
218 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
219
220 mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
221 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
222
223 %clean
224 rm -rf $RPM_BUILD_ROOT
225
226 %post
227 %update_browser_plugins
228
229 %postun
230 if [ "$1" = 0 ]; then
231         %update_browser_plugins
232 fi
233
234 %files
235 %defattr(644,root,root,755)
236 %doc LICENSE
237 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
238
239 # browser plugins v2
240 %{_browserpluginsconfdir}/browsers.d/%{name}.*
241 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
242
243 %attr(755,root,root) %{_bindir}/*
244 %dir %{_libdir}/opera
245 %dir %{_libdir}/opera/bin
246 %attr(755,root,root) %{_libdir}/opera/bin/*
247 %dir %{_plugindir}
248 %attr(755,root,root) %{_plugindir}/*
249 %dir %{_datadir}/opera
250 %{_datadir}/opera/*.*
251 %{_datadir}/opera/ini
252 %{_datadir}/opera/java
253 %{_datadir}/opera/images
254 %{_datadir}/opera/skin
255 %{_datadir}/opera/styles
256 %dir %{_datadir}/opera/locale
257 %{_datadir}/opera/locale/en
258 %{_datadir}/opera/locale/english.lng
259 %{_desktopdir}/*.desktop
260 %{_mandir}/man1/opera.1*
261 %{_pixmapsdir}/opera.xpm
This page took 0.103732 seconds and 4 git commands to generate.