]> git.pld-linux.org Git - packages/opera.git/blob - opera.spec
- Package english.lng for snapshot (Opera doesn't start without this file)
[packages/opera.git] / opera.spec
1 # TODO:
2 # - move translations into a separate, noarch package
3 #
4 %bcond_without  shared          # static or shared version
5 %bcond_without  distributable   # distributable or not
6 %bcond_without  incall          # include all tarballs into src.rpm (but splitted into shared/static)
7 %bcond_with     snap            # snap version
8
9 %if %{with snap}
10 %define ver             7.60
11 %define dirrel          20040824
12 # type of release, usually final or beta or Preview-4 for snaps
13 %define reltype         Preview-1
14 %else
15 %define ver             7.54
16 %define dirrel          20040824
17 # type of release, usually final or beta or Preview-4 for snaps
18 %define reltype         final
19 %endif
20
21 %define shver           %(echo %{ver} | tr -d .)
22 %define x86_shared_rel          %{dirrel}.5
23 %define x86_static_rel          %{dirrel}.1
24 %define sparc_shared_rel        %{dirrel}.2
25 %define sparc_static_rel        %{dirrel}.1
26 %define ppc_shared_rel          %{dirrel}.2
27 %define ppc_static_rel          %{dirrel}.1
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 sparc64 sparc
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 sparc64
42 %define rel             %{sparc_static_rel}
43 %endif
44 %ifarch ppc
45 %define rel             %{ppc_static_rel}
46 %endif
47 %endif
48
49 Summary:        World fastest web browser
50 Summary(pl):    Najszybsza przegl±darka WWW na ¶wiecie
51 Name:           opera
52 Version:        %{ver}.%{rel}
53 Release:        3
54 License:        Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
55 Group:          X11/Applications/Networking
56 %if %{without shared}
57 %{!?with_incall:%ifarch %{ix86}}
58 %if ! %{with snap}
59 Source0:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{ver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
60 # Source0-md5:  0a7e933ef593d4b7a897041c9f87bba2
61 %else
62 Source100:      http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{ver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
63 %endif
64 %{!?with_distributable:NoSource:        0}
65 %if ! %{with incall}
66 %endif
67 %ifarch sparc sparc64
68 %endif
69 %if ! %{with snap}
70 Source1:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{ver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
71 # Source1-md5:  04976a6ace7a4345ce5e4cf763159939
72 %else
73 #Source101:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{ver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
74 %endif
75 %{!?with_distributable:NoSource:        1}
76 %if ! %{with incall}
77 %endif
78 %ifarch ppc
79 %endif
80 %if ! %{with snap}
81 Source2:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{ver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
82 # Source2-md5:  c11a4c78d18bdaa4bd338b4c0dc27f38
83 %else
84 Source102:      http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{ver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
85 %endif
86 %{!?with_distributable:NoSource:        2}
87 %{!?with_incall:%endif}
88 %else
89 %{!?with_incall:%ifarch %{ix86}}
90 %if ! %{with snap}
91 Source20:       ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{ver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
92 # Source20-md5: 0e407a050f3aa4559011a3cea707cd20
93 %else
94 Source1020:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{ver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
95 # Source1020-md5:       da4df3c5d65057eac4e063b4359fafa6
96 %endif
97 %{!?with_distributable:NoSource:        20}
98 %if ! %{with incall}
99 %endif
100 %ifarch sparc sparc64
101 %endif
102 %if ! %{with snap}
103 Source21:       ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/shared/gcc-2.95/%{name}-%{ver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
104 # Source21-md5: d8635013dac0c98c680997fcc9dd66c4
105 %else
106 #Source1021:    http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{ver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
107 %endif
108 %{!?with_distributable:NoSource:        21}
109 %if ! %{with incall}
110 %endif
111 %ifarch ppc
112 %endif
113 %if ! %{with snap}
114 Source22:       ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/gcc-2.95/%{name}-%{ver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
115 # Source22-md5: 516992e68c5a710d795a1ecc791c7f4d
116 %else
117 Source1022:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{ver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
118 # Source1022-md5:      6496d9871a2ca7337377ed3ecc298559
119 %endif
120 %{!?with_distributable:NoSource:        22}
121 %endif
122 %{!?with_incall:%endif}
123 Source4:        %{name}.desktop
124 URL:            http://www.opera.com/
125 ExclusiveArch:  %{ix86} ppc sparc sparc64
126 Requires:       freetype >= 2
127
128 Requires:       openmotif >= 2
129 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
130
131 %define         _plugindir      %{_libdir}/opera/plugins
132 %define         _operadocdir    %{_docdir}/%{name}-%{ver}.%{rel}
133 %define         configfile      %{_datadir}/opera/config/opera6rc
134
135 %description
136 Opera is world fastest web browser. It supports most of nowaday
137 extensions of HTML. And it is quite stable. Only disadvantage are
138 advertisements on the top of its window. Version static linked with
139 qt.
140
141 %description -l pl
142 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
143 dzisiejszych rozszerzeñ HTMLa. Dodatkowo jest w miarê stabilna. Jedyn±
144 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
145 statycznie skonsolidowana z qt.
146
147 %prep
148 %ifarch %{ix86}
149 %setup -q %{?with_shared:-T -b %{?with_snap:10}20} -n %{name}-%{ver}-%{rel}-%{type}-qt.i386-en
150 %endif
151 %ifarch sparc sparc64
152 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{ver}-%{rel}-%{type}-qt.sparc-en
153 %endif
154 %ifarch ppc
155 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{ver}-%{rel}-%{type}-qt.ppc-en
156 %endif
157
158 %install
159 rm -rf $RPM_BUILD_ROOT
160
161 install -d $RPM_BUILD_ROOT{/etc,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
162
163 cat install.sh | sed 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' > install2.sh
164 mv install2.sh install.sh
165
166 echo y |\
167 sh install.sh \
168   --prefix=$RPM_BUILD_ROOT%{_prefix} \
169   --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
170   --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
171   --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
172   --exec_prefix=$RPM_BUILD_ROOT%{_datadir}/opera/bin \
173   --plugindir=$RPM_BUILD_ROOT%{_plugindir}
174
175 # man install
176 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
177
178 # wrapper correction
179 sed s#$RPM_BUILD_ROOT## > $RPM_BUILD_ROOT%{_bindir}/opera2 $RPM_BUILD_ROOT%{_bindir}/opera
180 mv $RPM_BUILD_ROOT%{_bindir}/opera2 $RPM_BUILD_ROOT%{_bindir}/opera
181
182 # install in kde etc.
183 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
184
185 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
186
187 # symlink który niweluje burkanie siê opery :>
188 #ln -sf %{_datadir}/opera/ $RPM_BUILD_ROOT/usr/share/
189 #ln -sf %{_libdir}/opera $RPM_BUILD_ROOT/usr/lib/
190
191 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
192
193 # always use wrapper linked with libXm.so.3
194 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
195 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
196 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
197
198 # %{_libdir} is not the best place for it but opera doesn't search for it in better
199 # places :/
200 install lib/spellcheck.so $RPM_BUILD_ROOT%{_libdir}
201
202 %clean
203 rm -rf $RPM_BUILD_ROOT
204
205 %files
206 %defattr(644,root,root,755)
207 %doc LICENSE bugreport help
208 %attr(755,root,root) %{_bindir}/*
209 %dir %{_datadir}/opera
210 %dir %{_datadir}/opera/bin
211 %attr(755,root,root) %{_datadir}/opera/bin/*
212 %{_datadir}/opera/config
213 %{_datadir}/opera/help
214 %{_datadir}/opera/images
215 %{_datadir}/opera/java
216 %{_datadir}/opera/skin
217 %{_datadir}/opera/styles
218 %{_datadir}/opera/ini
219 %{_datadir}/opera/search.ini
220 %{_datadir}/opera/*.html
221 %{_datadir}/opera/*.ssr
222 %{_datadir}/opera/*.txt
223 %ifarch %{ix86}
224 %attr(755,root,root) %{_datadir}/opera/chartables.bin
225 %endif
226 %ifarch ppc
227 %attr(755,root,root) %{_datadir}/opera/chartables-be.bin
228 %endif
229 %attr(755,root,root) %{_datadir}/opera/opera6.adr
230 %attr(755,root,root) %{_libdir}/*.so
231 %dir %{_libdir}/opera
232 %dir %{_plugindir}
233 %attr(755,root,root) %{_plugindir}/*
234
235 %dir %{_datadir}/opera/locale
236 %{_datadir}/opera/locale/en
237 %{?with_snap:%{_datadir}/opera/locale/english.lng}
238
239 %{_pixmapsdir}/opera.xpm
240 %{_desktopdir}/*.desktop
241
242 %{_mandir}/man1/opera.1*
This page took 0.049455 seconds and 4 git commands to generate.