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