]> git.pld-linux.org Git - SPECS.git/blob - ies4linux.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / ies4linux.spec
1 #
2 # TODO
3 # - few install errors (ignored):
4 #   ln: creating symbolic link `/usr/bin/ie55': Permission denied
5 #   ln: creating symbolic link `/usr/bin/ie5': Permission denied
6 # - sources downloaded via install script as NoSourceXX
7 # - move profiles to $HOME directory
8 # - License tag specifies package license? then it should not be GPL
9 #
10 # This spec file is released under the GNU General Public License version 2.0
11 # (http://www.gnu.org/licenses/gpl.txt).
12 #
13 # NOTE: Releasing this spec file under the GPL does not alter the licensing
14 # of Internet Explorer itself. Satisfying the terms of Internet Explorer's
15 # license remains the user's responsibility.
16
17 # NOTE: For IE7 you should have normaliz.dll and inetcplc.dll from your
18 #       WindowsXP SP2 installation!
19
20 %bcond_with     ie7     # build ie7 package
21
22 %bcond_with     all_locales     # build for all locales
23 %bcond_without  locale_en_US    # build without en_US version
24 %bcond_with     locale_ar       # build with ar version
25 %bcond_with     locale_cs       # build with cs version
26 %bcond_with     locale_da       # build with da version
27 %bcond_with     locale_de       # build with de version
28 %bcond_with     locale_el       # build with el version
29 %bcond_with     locale_es       # build with es version
30 %bcond_with     locale_fi       # build with fi version
31 %bcond_with     locale_fr       # build with fr version
32 %bcond_with     locale_he       # build with he version
33 %bcond_with     locale_hu       # build with hu version
34 %bcond_with     locale_it       # build with it version
35 %bcond_with     locale_ja       # build with ja version
36 %bcond_with     locale_ko       # build with ko version
37 %bcond_with     locale_nl       # build with nl version
38 %bcond_with     locale_no       # build with no version
39 %bcond_with     locale_pl       # build with pl version
40 %bcond_with     locale_pt       # build with pt version
41 %bcond_with     locale_pt_BR    # build with pt_BR version
42 %bcond_with     locale_ru       # build with ru version
43 %bcond_with     locale_sv       # build with sv version
44 %bcond_with     locale_tr       # build with tr version
45 %bcond_with     locale_zh_CN    # build with zh_CN version
46 %bcond_with     locale_zh_TW    # build with zh_TW version
47
48 Summary:        Run IE 7, 6, 5.5 and 5 on Linux with Wine
49 Summary(pl.UTF-8):      Uruchamianie IE 7, 6, 5.5 i 5 pod Linuksem przy użyciu Wine
50 Name:           ies4linux
51 Version:        2.0.5
52 Release:        2
53 License:        GPL v2
54 Group:          X11/Applications/Networking
55 Source0:        http://www.tatanka.com.br/ies4linux/downloads/%{name}-%{version}.tar.gz
56 # Source0-md5:  a2983360de355d1a407eb20077c39792
57 Source1:        %{name}.ie.sh
58 %if %{with ie7}
59 %if %{with locale_en_US}
60 Source2:        http://download.microsoft.com/download/3/8/8/38889DC1-848C-4BF2-8335-86C573AD86D9/IE7-WindowsXP-x86-enu.exe
61 NoSource:       2
62 %endif
63 Source3:        normaliz.dll
64 NoSource:       3
65 Source4:        inetcplc.dll
66 NoSource:       4
67 %if %{with locale_pl}
68 Source5:        http://download.microsoft.com/download/6/a/0/6a01b4fa-66e5-4447-8f36-9330a8725ecd/IE7-WindowsXP-x86-plk.exe
69 NoSource:       5
70 %endif
71 %endif
72 Patch0:         %{name}-destdir.patch
73 Patch1:         %{name}.patch
74 URL:            http://www.tatanka.com.br/ies4linux/page/Main_Page
75 #BuildRequires: bash
76 BuildRequires:  cabextract
77 BuildRequires:  unzip
78 BuildRequires:  wine
79 Requires(postun):       /usr/sbin/groupdel
80 Requires(postun):       /usr/sbin/userdel
81 Requires(pre):  /bin/id
82 Requires(pre):  /usr/sbin/groupadd
83 Requires(pre):  /usr/sbin/useradd
84 #Requires:      dcom98
85 Requires:       wine >= 1:0.9.37
86 #Requires:      wine-programs
87 ExclusiveArch:  %{ix86}
88 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89
90 %define         _preserve_env %_preserve_env_base TERM
91 %define         _installdir     %{_datadir}/ies4linux
92
93 %if %{with all_locales}
94 %define with_locale_ar 1
95 %define with_locale_cs 1
96 %define with_locale_da 1
97 %define with_locale_de 1
98 %define with_locale_el 1
99 %define with_locale_en_US 1
100 %define with_locale_es 1
101 %define with_locale_fi 1
102 %define with_locale_fr 1
103 %define with_locale_he 1
104 %define with_locale_hu 1
105 %define with_locale_it 1
106 %define with_locale_ja 1
107 %define with_locale_ko 1
108 %define with_locale_nl 1
109 %define with_locale_no 1
110 %define with_locale_pl 1
111 %define with_locale_pt 1
112 %define with_locale_pt_BR 1
113 %define with_locale_ru 1
114 %define with_locale_sv 1
115 %define with_locale_tr 1
116 %define with_locale_zh_CN 1
117 %define with_locale_zh_TW 1
118 %endif
119
120 %define loc_en_US       en-US
121 %if %{without locale_en_US}
122 %define loc_en_US       ""
123 %endif
124
125 %define loc_pt_BR       ""
126 %if %{with locale_pt_BR}
127 %define loc_pt_BR       pt-BR
128 %endif
129
130 %define loc_de  ""
131 %if %{with locale_de}
132 %define loc_de  de
133 %endif
134
135 %define loc_fr  ""
136 %if %{with locale_fr}
137 %define loc_fr  fr
138 %endif
139
140 %define loc_es  ""
141 %if %{with locale_es}
142 %define loc_es  es
143 %endif
144
145 %define loc_it  ""
146 %if %{with locale_it}
147 %define loc_it  it
148 %endif
149
150 %define loc_nl  ""
151 %if %{with locale_nl}
152 %define loc_nl  nl
153 %endif
154
155 %define loc_sv  ""
156 %if %{with locale_sv}
157 %define loc_sv  sv
158 %endif
159
160 %define loc_ja  ""
161 %if %{with locale_ja}
162 %define loc_ja  ja
163 %endif
164
165 %define loc_ko  ""
166 %if %{with locale_ko}
167 %define loc_ko  ko
168 %endif
169
170 %define loc_no  ""
171 %if %{with locale_no}
172 %define loc_no  no
173 %endif
174
175 %define loc_da  ""
176 %if %{with locale_da}
177 %define loc_da  da
178 %endif
179
180 %define loc_cn  ""
181 %if %{with locale_zh_CN}
182 %define loc_cn  cn
183 %endif
184
185 %define loc_tw  ""
186 %if %{with locale_zh_TW}
187 %define loc_tw  tw
188 %endif
189
190 %define loc_fi  ""
191 %if %{with locale_fi}
192 %define loc_fi  fi
193 %endif
194
195 %define loc_pl  ""
196 %if %{with locale_pl}
197 %define loc_pl  pl
198 %endif
199
200 %define loc_hu  ""
201 %if %{with locale_hu}
202 %define loc_hu  hu
203 %endif
204
205 %define loc_ar  ""
206 %if %{with locale_ar}
207 %define loc_ar  ar
208 %endif
209
210 %define loc_he  ""
211 %if %{with locale_he}
212 %define loc_he  he
213 %endif
214
215 %define loc_cs  ""
216 %if %{with locale_cs}
217 %define loc_cs  cs
218 %endif
219
220 %define loc_pt  ""
221 %if %{with locale_pt}
222 %define loc_pt  pt
223 %endif
224
225 %define loc_ru  ""
226 %if %{with locale_ru}
227 %define loc_ru  ru
228 %endif
229
230 %define loc_el  ""
231 %if %{with locale_el}
232 %define loc_el  el
233 %endif
234
235 %define loc_tr  ""
236 %if %{with locale_tr}
237 %define loc_tr  tr
238 %endif
239
240 %define locales %{loc_en_US} %{loc_pt_BR} %{loc_de} %{loc_fr} %{loc_es} %{loc_it} %{loc_nl} %{loc_sv} %{loc_ja} %{loc_ko} %{loc_no} %{loc_da} %{loc_cn} %{loc_tw} %{loc_fi} %{loc_pl} %{loc_hu} %{loc_ar} %{loc_he} %{loc_cs} %{loc_pt} %{loc_ru} %{loc_el} %{loc_tr}
241
242 %description
243 IEs4Linux is the simpler way to have Microsoft Internet Explorer
244 running on Linux.
245
246 %description -l pl.UTF-8
247 IEs4Linux to prostszy sposób na uruchamianie Microsoft Internet
248 Explorera pod Linuksem.
249
250 %package ie5-en_US
251 Summary:        Internet Explorer 5
252 Summary(pl.UTF-8):      Internet Explorer 5
253 Group:          X11/Applications/Networking
254 Requires:       ies4linux = %{version}-%{release}
255 Obsoletes:      ies4linux-ie5
256
257 %description ie5-en_US
258 Internet Explorer 5.
259
260 %description ie5-en_US -l pl.UTF-8
261 Internet Explorer 5.
262
263 %package ie55-en_US
264 Summary:        Internet Explorer 5.5
265 Summary(pl.UTF-8):      Internet Explorer 5.5
266 Group:          X11/Applications/Networking
267 Requires:       ies4linux = %{version}-%{release}
268 Obsoletes:      ies4linux-ie55
269
270 %description ie55-en_US
271 Internet Explorer 5.5.
272
273 %description ie55-en_US -l pl.UTF-8
274 Internet Explorer 5.5.
275
276 %package ie6-ar
277 Summary:        Internet Explorer 6 Arabic edition
278 Summary(pl.UTF-8):      Internet Explorer 6 w wersji arabskiej
279 Group:          X11/Applications/Networking
280 Requires:       ies4linux = %{version}-%{release}
281
282 %description ie6-ar
283 Internet Explorer 6 Arabic edition.
284
285 %description ie6-ar -l pl.UTF-8
286 Internet Explorer 6 w wersji arabskiej.
287
288 %package ie6-cs
289 Summary:        Internet Explorer 6 Czech edition
290 Summary(pl.UTF-8):      Internet Explorer 6 w wersji czeskiej
291 Group:          X11/Applications/Networking
292 Requires:       ies4linux = %{version}-%{release}
293
294 %description ie6-cs
295 Internet Explorer 6 Czech edition.
296
297 %description ie6-cs -l pl.UTF-8
298 Internet Explorer 6 w wersji czeskiej.
299
300 %package ie6-da
301 Summary:        Internet Explorer 6 Danish edition
302 Summary(pl.UTF-8):      Internet Explorer 6 w wersji duńskiej
303 Group:          X11/Applications/Networking
304 Requires:       ies4linux = %{version}-%{release}
305
306 %description ie6-da
307 Internet Explorer 6 Danish edition.
308
309 %description ie6-da -l pl.UTF-8
310 Internet Explorer 6 w wersji duńskiej.
311
312 %package ie6-de
313 Summary:        Internet Explorer 6 German edition
314 Summary(pl.UTF-8):      Internet Explorer 6 w wersji niemieckiej
315 Group:          X11/Applications/Networking
316 Requires:       ies4linux = %{version}-%{release}
317
318 %description ie6-de
319 Internet Explorer 6 German edition.
320
321 %description ie6-de -l pl.UTF-8
322 Internet Explorer 6 w wersji niemieckiej.
323
324 %package ie6-el
325 Summary:        Internet Explorer 6 Greek edition
326 Summary(pl.UTF-8):      Internet Explorer 6 w wersji greckiej
327 Group:          X11/Applications/Networking
328 Requires:       ies4linux = %{version}-%{release}
329
330 %description ie6-el
331 Internet Explorer 6 Greek edition.
332
333 %description ie6-el -l pl.UTF-8
334 Internet Explorer 6 w wersji greckiej.
335
336 %package ie6-en_US
337 Summary:        Internet Explorer 6 US English edition
338 Summary(pl.UTF-8):      Internet Explorer 6 w wersji angielskiej (USA)
339 Group:          X11/Applications/Networking
340 Requires:       ies4linux = %{version}-%{release}
341 Obsoletes:      ies4linux-ie6
342
343 %description ie6-en_US
344 Internet Explorer 6 US English edition.
345
346 %description ie6-en_US -l pl.UTF-8
347 Internet Explorer 6 w wersji angielskiej (USA).
348
349 %package ie6-es
350 Summary:        Internet Explorer 6 Spanish edition
351 Summary(pl.UTF-8):      Internet Explorer 6 w wersji hiszpańskiej
352 Group:          X11/Applications/Networking
353 Requires:       ies4linux = %{version}-%{release}
354
355 %description ie6-es
356 Internet Explorer 6 Spanish edition.
357
358 %description ie6-es -l pl.UTF-8
359 Internet Explorer 6 w wersji hiszpańskiej.
360
361 %package ie6-fi
362 Summary:        Internet Explorer 6 Finnish edition
363 Summary(pl.UTF-8):      Internet Explorer 6 w wersji fińskiej
364 Group:          X11/Applications/Networking
365 Requires:       ies4linux = %{version}-%{release}
366
367 %description ie6-fi
368 Internet Explorer 6 Finnish edition.
369
370 %description ie6-fi -l pl.UTF-8
371 Internet Explorer 6 w wersji fińskiej.
372
373 %package ie6-fr
374 Summary:        Internet Explorer 6 French edition
375 Summary(pl.UTF-8):      Internet Explorer 6 w wersji francuskiej
376 Group:          X11/Applications/Networking
377 Requires:       ies4linux = %{version}-%{release}
378
379 %description ie6-fr
380 Internet Explorer 6 French edition.
381
382 %description ie6-fr -l pl.UTF-8
383 Internet Explorer 6 w wersji francuskiej.
384
385 %package ie6-he
386 Summary:        Internet Explorer 6 Hebrew edition
387 Summary(pl.UTF-8):      Internet Explorer 6 w wersji hebrajskiej
388 Group:          X11/Applications/Networking
389 Requires:       ies4linux = %{version}-%{release}
390
391 %description ie6-he
392 Internet Explorer 6 Hebrew edition.
393
394 %description ie6-he -l pl.UTF-8
395 Internet Explorer 6 w wersji hebrajskiej.
396
397 %package ie6-hu
398 Summary:        Internet Explorer 6 Hungarian edition
399 Summary(pl.UTF-8):      Internet Explorer 6 w wersji węgierskiej
400 Group:          X11/Applications/Networking
401 Requires:       ies4linux = %{version}-%{release}
402
403 %description ie6-hu
404 Internet Explorer 6 Hungarian edition.
405
406 %description ie6-hu -l pl.UTF-8
407 Internet Explorer 6 w wersji węgierskiej.
408
409 %package ie6-it
410 Summary:        Internet Explorer 6 Italian edition
411 Summary(pl.UTF-8):      Internet Explorer 6 w wersji włoskiej
412 Group:          X11/Applications/Networking
413 Requires:       ies4linux = %{version}-%{release}
414
415 %description ie6-it
416 Internet Explorer 6 Italian edition.
417
418 %description ie6-it -l pl.UTF-8
419 Internet Explorer 6 w wersji włoskiej.
420
421 %package ie6-ja
422 Summary:        Internet Explorer 6 Japanese edition
423 Summary(pl.UTF-8):      Internet Explorer 6 w wersji japońskiej
424 Group:          X11/Applications/Networking
425 Requires:       ies4linux = %{version}-%{release}
426
427 %description ie6-ja
428 Internet Explorer 6 Japanese edition.
429
430 %description ie6-ja -l pl.UTF-8
431 Internet Explorer 6 w wersji japońskiej.
432
433 %package ie6-ko
434 Summary:        Internet Explorer 6 Korean edition
435 Summary(pl.UTF-8):      Internet Explorer 6 w wersji koreańskiej
436 Group:          X11/Applications/Networking
437 Requires:       ies4linux = %{version}-%{release}
438
439 %description ie6-ko
440 Internet Explorer 6 Korean edition.
441
442 %description ie6-ko -l pl.UTF-8
443 Internet Explorer 6 w wersji koreańskiej.
444
445 %package ie6-nl
446 Summary:        Internet Explorer 6 Dutch edition
447 Summary(pl.UTF-8):      Internet Explorer 6 w wersji holenderskiej
448 Group:          X11/Applications/Networking
449 Requires:       ies4linux = %{version}-%{release}
450
451 %description ie6-nl
452 Internet Explorer 6 Dutch edition.
453
454 %description ie6-nl -l pl.UTF-8
455 Internet Explorer 6 w wersji holenderskiej.
456
457 %package ie6-no
458 Summary:        Internet Explorer 6 Norwegian edition
459 Summary(pl.UTF-8):      Internet Explorer 6 w wersji norweskiej
460 Group:          X11/Applications/Networking
461 Requires:       ies4linux = %{version}-%{release}
462
463 %description ie6-no
464 Internet Explorer 6 Norwegian edition.
465
466 %description ie6-no -l pl.UTF-8
467 Internet Explorer 6 w wersji norweskiej.
468
469 %package ie6-pl
470 Summary:        Internet Explorer 6 Polish edition
471 Summary(pl.UTF-8):      Internet Explorer 6 w wersji polskiej
472 Group:          X11/Applications/Networking
473 Requires:       ies4linux = %{version}-%{release}
474
475 %description ie6-pl
476 Internet Explorer 6 Polish edition.
477
478 %description ie6-pl -l pl.UTF-8
479 Internet Explorer 6 w wersji polskiej.
480
481 %package ie6-pt
482 Summary:        Internet Explorer 6 Portuguese edition
483 Summary(pl.UTF-8):      Internet Explorer 6 w wersji portugalskiej
484 Group:          X11/Applications/Networking
485 Requires:       ies4linux = %{version}-%{release}
486
487 %description ie6-pt
488 Internet Explorer 6 Portuguese edition.
489
490 %description ie6-pt -l pl.UTF-8
491 Internet Explorer 6 w wersji portugalskiej.
492
493 %package ie6-pt_BR
494 Summary:        Internet Explorer 6 Brazilian Portuguese edition
495 Summary(pl.UTF-8):      Internet Explorer 6 w wersji portugalskiej (dla Brazylii)
496 Group:          X11/Applications/Networking
497 Requires:       ies4linux = %{version}-%{release}
498
499 %description ie6-pt_BR
500 Internet Explorer 6 Brazilian Portuguese edition.
501
502 %description ie6-pt_BR -l pl.UTF-8
503 Internet Explorer 6 w wersji portugalskiej (dla Brazylii).
504
505 %package ie6-ru
506 Summary:        Internet Explorer 6 Russian edition
507 Summary(pl.UTF-8):      Internet Explorer 6 w wersji rosyjskiej
508 Group:          X11/Applications/Networking
509 Requires:       ies4linux = %{version}-%{release}
510
511 %description ie6-ru
512 Internet Explorer 6 Russian edition.
513
514 %description ie6-ru -l pl.UTF-8
515 Internet Explorer 6 w wersji rosyjskiej.
516
517 %package ie6-sv
518 Summary:        Internet Explorer 6 Swedish edition
519 Summary(pl.UTF-8):      Internet Explorer 6 w wersji szwedzkiej
520 Group:          X11/Applications/Networking
521 Requires:       ies4linux = %{version}-%{release}
522
523 %description ie6-sv
524 Internet Explorer 6 Swedish edition.
525
526 %description ie6-sv -l pl.UTF-8
527 Internet Explorer 6 w wersji szwedzkiej.
528
529 %package ie6-tr
530 Summary:        Internet Explorer 6 Turkish edition
531 Summary(pl.UTF-8):      Internet Explorer 6 w wersji tureckiej
532 Group:          X11/Applications/Networking
533 Requires:       ies4linux = %{version}-%{release}
534
535 %description ie6-tr
536 Internet Explorer 6 Turkish edition.
537
538 %description ie6-tr -l pl.UTF-8
539 Internet Explorer 6 w wersji tureckiej.
540
541 %package ie6-zh_CN
542 Summary:        Internet Explorer 6 Chinese (China) edition
543 Summary(pl.UTF-8):      Internet Explorer 6 w wersji chińskiej (dla Chin)
544 Group:          X11/Applications/Networking
545 Requires:       ies4linux = %{version}-%{release}
546
547 %description ie6-zh_CN
548 Internet Explorer 6 Chinese (China) edition.
549
550 %description ie6-zh_CN -l pl.UTF-8
551 Internet Explorer 6 w wersji chińskiej (dla Chin).
552
553 %package ie6-zh_TW
554 Summary:        Internet Explorer 6 Chinese (Taiwan) edition
555 Summary(pl.UTF-8):      Internet Explorer 6 w wersji chińskiej (dla Tajwanu)
556 Group:          X11/Applications/Networking
557 Requires:       ies4linux = %{version}-%{release}
558
559 %description ie6-zh_TW
560 Internet Explorer 6 Chinese (Taiwan) edition.
561
562 %description ie6-zh_TW -l pl.UTF-8
563 Internet Explorer 6 w wersji chińskiej (dla Tajwanu).
564
565 %package ie7-en_US
566 Summary:        Internet Explorer 7 US English edition
567 Summary(pl.UTF-8):      Internet Explorer 7 w wersji angielskiej (USA)
568 Group:          X11/Applications/Networking
569 Requires:       ies4linux = %{version}-%{release}
570 Obsoletes:      ies4linux-ie7
571
572 %description ie7-en_US
573 Internet Explorer 7 US English edition.
574
575 %description ie7-en_US -l pl.UTF-8
576 Internet Explorer 7 w wersji angielskiej (USA).
577
578 %package ie7-pl
579 Summary:        Internet Explorer 7 Polish edition
580 Summary(pl.UTF-8):      Internet Explorer 7 w wersji polskiej
581 Group:          X11/Applications/Networking
582 Requires:       ies4linux = %{version}-%{release}
583
584 %description ie7-pl
585 Internet Explorer 7 Polish edition.
586
587 %description ie7-pl -l pl.UTF-8
588 Internet Explorer 7 w wersji polskiej.
589
590 %prep
591 %setup -q
592 %patch0 -p1
593 %patch1 -p1
594
595 #
596 # IE 7
597 #
598 %if %{with ie7}
599
600 %if %{with locale_en_US}
601 mkdir -p ie7/en-US
602 cd ie7/en-US
603 cabextract %{SOURCE2}
604 cd -
605 %endif
606
607 %if %{with locale_pl}
608 mkdir -p ie7/pl
609 cd ie7/pl
610 cabextract %{SOURCE5}
611 cd -
612 %endif
613
614 cp %{SOURCE3} ie7
615 cp %{SOURCE4} ie7
616 %endif
617
618 %install
619 rm -rf $RPM_BUILD_ROOT
620 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_bindir},%{_pixmapsdir}}
621
622 cp %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ies4linux
623
624 gen_desktopfile()
625 {
626         LOCALE=$1
627         VERSION=$2
628         VER=`echo $VERSION | sed 's:\.0::; s:\.::'`
629         cat > $RPM_BUILD_ROOT%{_desktopdir}/ie$VER-$LOCALE.desktop << EOF
630 [Desktop Entry]
631 Name=Internet Explorer $VERSION ($LOCALE)
632 Name[pl]=Internet Explorer $VERSION ($LOCALE)
633 GenericName=Web Browser
634 GenericName[pl]=Przeglądarka WWW
635 Comment=Internet Explorer $VERSION ($LOCALE)
636 Comment[pl]=Internet Explorer $VERSION ($LOCALE)
637 Type=Application
638 Exec=ie$VER-$LOCALE
639 Icon=%{_pixmapsdir}/ies4linux.svg
640 Categories=Network;WebBrowser;
641 Encoding=UTF-8
642 # vi: encoding=utf-8
643 EOF
644 }
645
646 cat > add_file_to_list << 'EOF'
647 #!/bin/sh
648
649         LOCALE="$1"
650         VERSION="$2"
651         FULLFILE="$3"
652         PKGFILE=`echo "$FULLFILE" | sed "s:$RPM_BUILD_ROOT::"`
653         LIST=ie$VERSION-$LOCALE.files
654
655         if [ -d "$FULLFILE" ]; then
656                 echo "%%dir \"$PKGFILE\"" >> $LIST
657         else
658                 EXE=`basename "$PKGFILE" | sed -r 's:.+.(exe):\1:g'`
659                 if [ "$EXE" = "EXE" ]; then
660                         echo "%%attr(755,root,root) \"$PKGFILE\"" >> $LIST
661                 else
662                         echo "\"$PKGFILE\"" >> $LIST
663                 fi
664         fi
665 EOF
666 chmod +x add_file_to_list
667
668 gen_filelist()
669 {
670         #
671         # It seems that some files are written in background
672         # so we have to wait for them to be available.
673         #
674         sleep 5s
675
676         LOCALE="$1"
677         VERSION="$2"
678         LIST=ie$VERSION-$LOCALE.files
679         echo "%defattr(644,root,root,755)" > $LIST
680
681         find $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie$VERSION -exec ./add_file_to_list $LOCALE $VERSION '{}' ';'
682
683         echo "%%attr(755,root,root) %{_bindir}/ie$VERSION-$LOCALE" >> $LIST
684         [ "$LOCALE" = "en-US" ] && echo "%%attr(755,root,root) %{_bindir}/ie$VERSION" >> $LIST
685         echo "%{_desktopdir}/ie$VERSION-$LOCALE.desktop" >> $LIST
686         echo "%%dir %{_installdir}/$LOCALE" >> $LIST
687 }
688
689 # IE 5, 5.5 built only with en_US locale
690 # IE 7 needs more sources for other locales
691 for LOCALE in %{locales}; do
692         [ "$LOCALE" = "" ] && continue
693         OPTS=""
694         [ "xen-US" = "x$LOCALE" ] && OPTS="--install-ie55 --install-ie5"
695
696         bash ./ies4linux \
697                 $OPTS \
698                 --basedir %{_installdir}/$LOCALE \
699                 --bindir %{_bindir} \
700                 --destdir $RPM_BUILD_ROOT \
701                 --downloaddir %{_sourcedir} \
702                 --locale $LOCALE \
703                 --install-flash
704
705         if [ ! -d $RPM_BUILD_ROOT%{_installdir}/profiles ]; then
706                 install -d $RPM_BUILD_ROOT%{_installdir}/profiles
707
708                 # somewhy it is created as $USER not "All Users" with wine-1.1.22
709                 USER=$(id -un)
710                 if  [ "$RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie6/drive_c/windows/profiles/$USER" ]; then
711                         mv "$RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie6/drive_c/windows/profiles/"{$USER,"All Users"}
712                 fi
713
714                 cp -a "$RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie6/drive_c/windows/profiles/All Users" \
715                         $RPM_BUILD_ROOT%{_installdir}/profiles
716         fi
717         [ ! -f $RPM_BUILD_ROOT%{_pixmapsdir}/ies4linux.svg ] && \
718                 cp $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ies4linux.svg \
719                         $RPM_BUILD_ROOT%{_pixmapsdir}
720         rm -f $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ies4linux.svg
721         rm -rf $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie{5,55,6}/drive_c/windows/profiles
722         rm -f $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie{5,55,6}/.firstrun
723
724         #
725         # Shell scripts
726         #
727         rm -rf $RPM_BUILD_ROOT%{_installdir}/$LOCALE/bin
728         ln -sf ies4linux $RPM_BUILD_ROOT%{_bindir}/ie6-$LOCALE
729         gen_desktopfile $LOCALE 6.0
730         ln -sf %{_installdir}/profiles $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie6/drive_c/windows/profiles
731
732         if [ "$LOCALE" = "en-US" ]; then
733                 ln -sf ies4linux $RPM_BUILD_ROOT%{_bindir}/ie5
734                 ln -sf ies4linux $RPM_BUILD_ROOT%{_bindir}/ie5-en-US
735                 ln -sf ies4linux $RPM_BUILD_ROOT%{_bindir}/ie55
736                 ln -sf ies4linux $RPM_BUILD_ROOT%{_bindir}/ie55-en-US
737                 ln -sf ies4linux $RPM_BUILD_ROOT%{_bindir}/ie6
738                 gen_desktopfile $LOCALE 5
739                 gen_desktopfile $LOCALE 5.5
740                 ln -sf %{_installdir}/profiles $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie5/drive_c/windows/profiles
741                 ln -sf %{_installdir}/profiles $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie55/drive_c/windows/profiles
742                 gen_filelist $LOCALE 5
743                 gen_filelist $LOCALE 55
744         fi
745
746         %if %{with ie7}
747         if [ "$LOCALE" = "en-US" ] || [ "$LOCALE" = "pl" ]; then
748                 [ "$LOCALE" = "en-US" ] && ln -sf ies4linux $RPM_BUILD_ROOT%{_bindir}/ie7
749                 ln -sf ies4linux $RPM_BUILD_ROOT%{_bindir}/ie7-$LOCALE
750                 gen_desktopfile $LOCALE 7
751
752                 cp -a $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie6 $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie7
753                 cp ie7/$LOCALE/{wininet,iertutil,shlwapi,urlmon,jscript,vbscript,mshtml,mshtmled,mshtmler,advpack}.dll \
754                         ie7/$LOCALE/inetcpl.cpl ie7/inetcplc.dll ie7/normaliz.dll \
755                         $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie7/drive_c/windows/system
756
757                 cat $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie6/user.reg | \
758                         sed 's:"Version"="win98":"Version"="win98"\n\n[Software\\Wine\\AppDefaults\\iexplore.exe] 1161336541\n"Version"="winxp"\n:' \
759                         > $RPM_BUILD_ROOT%{_installdir}/$LOCALE/ie7/user.reg
760
761                 gen_filelist $LOCALE 7
762         fi
763         %endif
764
765         gen_filelist $LOCALE 6
766 done
767
768 %clean
769 rm -rf $RPM_BUILD_ROOT
770
771 %pre
772 %groupadd -g 212 -r -f ies4linux
773
774 %post
775 if [ "$1" = 1 ]; then
776 %banner -e %{name} <<'EOF'
777 Remember to add users which will use IEs to ies4linux group or they won't be
778 able to create their profiles and running IEs will fail.
779 EOF
780 #'
781 fi
782
783 %postun
784 if [ "$1" = "0" ]; then
785         %groupremove ies4linux
786 fi
787
788 %files
789 %defattr(644,root,root,755)
790 %doc README
791 %dir %{_installdir}
792 %attr(755,root,root) %{_bindir}/ies4linux
793 %{_pixmapsdir}/%{name}.svg
794 %dir %attr(770,root,ies4linux) %{_installdir}/profiles
795 %dir "%{_installdir}/profiles/All Users"
796 %dir "%{_installdir}/profiles/All Users/Application Data"
797 %dir "%{_installdir}/profiles/All Users/Desktop"
798 %dir "%{_installdir}/profiles/All Users/Documents"
799 %dir "%{_installdir}/profiles/All Users/Favorites"
800 %dir "%{_installdir}/profiles/All Users/Start Menu"
801 %dir "%{_installdir}/profiles/All Users/Start Menu/Programs"
802 %dir "%{_installdir}/profiles/All Users/Start Menu/Programs/StartUp"
803 %dir "%{_installdir}/profiles/All Users/Templates"
804
805 %if %{with locale_en_US}
806 %files ie5-en_US -f ie5-en-US.files
807 %defattr(644,root,root,755)
808 %files ie55-en_US -f ie55-en-US.files
809 %defattr(644,root,root,755)
810 %files ie6-en_US -f ie6-en-US.files
811 %defattr(644,root,root,755)
812 %endif
813
814 %if %{with locale_ar}
815 %files ie6-ar -f ie6-ar.files
816 %defattr(644,root,root,755)
817 %endif
818
819 %if %{with locale_cs}
820 %files ie6-cs -f ie6-cs.files
821 %defattr(644,root,root,755)
822 %endif
823
824 %if %{with locale_da}
825 %files ie6-da -f ie6-da.files
826 %defattr(644,root,root,755)
827 %endif
828
829 %if %{with locale_de}
830 %files ie6-de -f ie6-de.files
831 %defattr(644,root,root,755)
832 %endif
833
834 %if %{with locale_el}
835 %files ie6-el -f ie6-el.files
836 %defattr(644,root,root,755)
837 %endif
838
839 %if %{with locale_es}
840 %files ie6-es -f ie6-es.files
841 %defattr(644,root,root,755)
842 %endif
843
844 %if %{with locale_fi}
845 %files ie6-fi -f ie6-fi.files
846 %defattr(644,root,root,755)
847 %endif
848
849 %if %{with locale_fr}
850 %files ie6-fr -f ie6-fr.files
851 %defattr(644,root,root,755)
852 %endif
853
854 %if %{with locale_he}
855 %files ie6-he -f ie6-he.files
856 %defattr(644,root,root,755)
857 %endif
858
859 %if %{with locale_hu}
860 %files ie6-hu -f ie6-hu.files
861 %defattr(644,root,root,755)
862 %endif
863
864 %if %{with locale_it}
865 %files ie6-it -f ie6-it.files
866 %defattr(644,root,root,755)
867 %endif
868
869 %if %{with locale_ja}
870 %files ie6-ja -f ie6-ja.files
871 %defattr(644,root,root,755)
872 %endif
873
874 %if %{with locale_ko}
875 %files ie6-ko -f ie6-ko.files
876 %defattr(644,root,root,755)
877 %endif
878
879 %if %{with locale_nl}
880 %files ie6-nl -f ie6-nl.files
881 %defattr(644,root,root,755)
882 %endif
883
884 %if %{with locale_no}
885 %files ie6-no -f ie6-no.files
886 %defattr(644,root,root,755)
887 %endif
888
889 %if %{with locale_pl}
890 %files ie6-pl -f ie6-pl.files
891 %defattr(644,root,root,755)
892 %endif
893
894 %if %{with locale_pt}
895 %files ie6-pt -f ie6-pt.files
896 %defattr(644,root,root,755)
897 %endif
898
899 %if %{with locale_pt_BR}
900 %files ie6-pt_BR -f ie6-pt-BR.files
901 %defattr(644,root,root,755)
902 %endif
903
904 %if %{with locale_ru}
905 %files ie6-ru -f ie6-ru.files
906 %defattr(644,root,root,755)
907 %endif
908
909 %if %{with locale_sv}
910 %files ie6-sv -f ie6-sv.files
911 %defattr(644,root,root,755)
912 %endif
913
914 %if %{with locale_tr}
915 %files ie6-tr -f ie6-tr.files
916 %defattr(644,root,root,755)
917 %endif
918
919 %if %{with locale_zh_CN}
920 %files ie6-zh_CN -f ie6-cn.files
921 %defattr(644,root,root,755)
922 %endif
923
924 %if %{with locale_zh_TW}
925 %files ie6-zh_TW -f ie6-tw.files
926 %defattr(644,root,root,755)
927 %endif
928
929 %if %{with ie7}
930 %if %{with locale_en_US}
931 %files ie7-en_US -f ie7-en-US.files
932 %defattr(644,root,root,755)
933 %endif
934 %if %{with locale_pl}
935 %files ie7-pl -f ie7-pl.files
936 %defattr(644,root,root,755)
937 %endif
938 %endif
This page took 4.953294 seconds and 3 git commands to generate.