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