]> git.pld-linux.org Git - packages/opera.git/blob - opera.spec
- up to 9.25
[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.25
14 %define sver            9.25
15 %define fix             %{nil}
16 %define dirrel          20071214
17 %define reltype         final
18 %define magicstr        687
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         %endif
35         %ifarch ppc
36         %define rel             %{ppc_shared_rel}
37         %endif
38 %else
39         %define type            static
40         %define rel             %{x86_static_rel}
41         %ifarch sparc sparcv9
42                 %define rel             %{sparc_static_rel}
43         %endif
44         %ifarch ppc
45                 %define rel             %{ppc_static_rel}
46         %endif
47 %endif
48
49 # define to 0 and then redefine to avoid
50 # not defined macros
51 %define need_ix86_shared        0
52 %define need_sparc_shared       0
53 %define need_ppc_shared         0
54 %define need_ix86_static        0
55 %define need_sparc_static       0
56 %define need_ppc_static         0
57
58 %if %{with incall}
59         %if %{with shared}
60                 %define need_ix86_shared        1
61                 %define need_sparc_shared       1
62                 %define need_ppc_shared 1
63         %else
64                 %define need_ix86_static        1
65                 %define need_sparc_static       1
66                 %define need_ppc_static 1
67         %endif
68 %else
69         %ifarch sparc sparc64
70                 %if     %{with shared}
71                         %define need_sparc_shared       1
72                 %else
73                         %define need_sparc_static       1
74                 %endif
75         %endif
76         %ifarch ppc
77                 %if     %{with shared}
78                         %define need_ppc_shared 1
79                 %else
80                         %define need_ppc_static 1
81                 %endif
82         %endif
83 %endif
84
85 %define         _rel    1
86 Summary:        World fastest web browser
87 Summary(pl.UTF-8):      Najszybsza przeglądarka WWW na świecie
88 Name:           opera
89 Version:        %{ver}%{fix}
90 Release:        %{_rel}
91 Epoch:          2
92 License:        Distributable
93 Group:          X11/Applications/Networking
94
95 %if %{need_ix86_static}
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
97 # Source0-md5:  96b8010ddb0ff250817c7fb314de2d26
98 %{!?with_distributable:NoSource:        0}
99 %endif
100
101 %if %{need_sparc_static}
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
103 # Source1-md5:  c8443b4b83b21a56fdd8dc3526eaf46f
104 %{!?with_distributable:NoSource:        1}
105 %endif
106
107 %if %{need_ppc_static}
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
109 # Source2-md5:  be68f701224493bbd9a6d62df8eb9b19
110 %{!?with_distributable:NoSource:        2}
111 %endif
112
113 %if %{need_ix86_shared}
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
115 # Source20-md5: 186ac3db2d79452e911c1a9eaa9a0d0d
116 %{!?with_distributable:NoSource:        20}
117 %endif
118
119 %if %{need_sparc_shared}
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
121 # Source21-md5: f483713c4a01de7589430d94132e33ed
122 %{!?with_distributable:NoSource:        21}
123 %endif
124
125
126 %if %{need_ppc_shared}
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
128 # Source22-md5: 8c38b2302512ce7e02815238b970d4cf
129 %{!?with_distributable:NoSource:        22}
130 %endif
131
132 Source4:        %{name}.desktop
133 Patch0:         %{name}-wrapper.patch
134 URL:            http://www.opera.com/
135 BuildRequires:  rpmbuild(macros) >= 1.356
136 BuildRequires:  sed >= 4.0
137 Requires:       browser-plugins >= 2.0
138 Requires:       freetype >= 2
139 Provides:       wwwbrowser
140 ExclusiveArch:  %{ix86} ppc sparc sparcv9
141 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
142
143 %define         _plugindir      %{_libdir}/opera/plugins
144 %define         _operadocdir    %{_docdir}/%{name}-%{ver}
145
146 %description
147 Opera is world fastest web browser. It supports most of nowaday
148 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
149 linked with Qt.
150
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
154 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
155
156 %prep
157 %ifarch %{ix86}
158 %setup -q -T -b %{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}}
159 %endif
160 %ifarch sparc sparcv9
161 %setup -q -T -b %{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en%{?magicstr:-%{magicstr}}
162 %endif
163 %ifarch ppc
164 %setup -q -T -b %{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}}
165 %endif
166 %patch0 -p1
167
168 %install
169 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
171
172 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
173 # opera does not use for .xpt files
174 *.xpt
175
176 # use mplayerplug-in-opera instead
177 mplayerplug-in*
178
179 # opera uses libjava.so to run java
180 libjavaplugin_oji.so
181 EOF
182
183 sh install.sh \
184         DESTDIR=$RPM_BUILD_ROOT \
185         --prefix=%{_prefix} \
186         --exec_prefix=%{_libdir}/%{name}/bin \
187         --plugindir=%{_libdir}/%{name}/plugins \
188         --docdir=%{_operadocdir}
189
190 # install in kde etc.
191 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
192
193 mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
194 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
195
196 %clean
197 rm -rf $RPM_BUILD_ROOT
198
199 %post
200 %update_browser_plugins
201
202 %postun
203 if [ "$1" = 0 ]; then
204         %update_browser_plugins
205 fi
206
207 %files
208 %defattr(644,root,root,755)
209 %doc LICENSE
210 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
211
212 # browser plugins v2
213 %{_browserpluginsconfdir}/browsers.d/%{name}.*
214 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
215
216 %attr(755,root,root) %{_bindir}/*
217 %dir %{_libdir}/opera
218 %dir %{_libdir}/opera/bin
219 %attr(755,root,root) %{_libdir}/opera/bin/*
220 %dir %{_plugindir}
221 %attr(755,root,root) %{_plugindir}/*
222 %dir %{_datadir}/opera
223 %{_datadir}/opera/*.*
224 %{_datadir}/opera/ini
225 %{_datadir}/opera/java
226 %{_datadir}/opera/images
227 %{_datadir}/opera/skin
228 %{_datadir}/opera/styles
229 %dir %{_datadir}/opera/locale
230 %{_datadir}/opera/locale/en
231 %{_datadir}/opera/locale/english.lng
232 %{_desktopdir}/*.desktop
233 %{_mandir}/man1/opera.1*
234 %{_pixmapsdir}/opera.xpm
This page took 0.119425 seconds and 4 git commands to generate.