3 %bcond_without alsa # don't build ALSA mm driver
4 %bcond_without capi # don't build CAPI 2.0 (ISDN) support
5 %bcond_without gstreamer # don't build GStreamer filters support
6 %bcond_without sane # don't build TWAIN DLL with scanning support (through SANE)
7 %bcond_without ldap # don't build LDAP DLL
8 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
10 # NOTE: wine detects the following SONAMES for dlopen at build time:
11 # libcrypto,libssl (wininet.dll)
12 # libcups (winspool.dll.so,wineps.dll.so)
13 # libcurses/libncurses (wineconsole program)
14 # libfontconfig (gdi32.dll.so)
15 # libfreetype (wineps.dll.so,gdi32.dll.so)
16 # libGL (x11drv.dll.so,ddraw.dll.so)
17 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
18 # libpng (windowscodecs.dll: SONAME_LIBPNG in dlls/windowscodecs/pngformat.c)
19 # thus requires rebuild after change of any of the above.
21 # library qualifier in rpm generated deps
22 %ifarch %{x8664} ia64 ppc64 s390x sparc64
23 %define libqual ()(64bit)
25 %define libqual %{nil}
29 Summary: Program that lets you launch Win applications
30 Summary(es.UTF-8): Ejecuta programas Windows en Linux
31 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
32 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
38 Group: Applications/Emulators
39 Source0: http://downloads.sourceforge.net/wine/%{name}-%{version}.tar.bz2
40 # Source0-md5: 0c28702ed478df7a1c097f3a9c4cabd6
41 Source1: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86.msi
42 # Source1-md5: 700aaa08724be1992cffed7b87e79a44
43 Source2: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86_64.msi
44 # Source2-md5: 7b4811f667fd01d300fdff68420a9c72
45 Source3: %{name}-uninstaller.desktop
46 Patch0: %{name}-fontcache.patch
47 Patch1: %{name}-makedep.patch
48 Patch2: %{name}-ncurses.patch
49 Patch4: %{name}-disable-valgrind.patch
50 Patch5: %{name}-ca_certificates.patch
51 Patch6: %{name}-manpaths.patch
53 Patch8: wine-gnutls.patch
54 URL: http://www.winehq.org/
55 BuildRequires: OpenAL-devel >= 1.1
56 BuildRequires: OpenGL-GLU-devel
57 %{?with_alsa:BuildRequires: alsa-lib-devel}
58 %{?with_arts:BuildRequires: artsc-devel}
59 BuildRequires: autoconf
60 BuildRequires: automake
62 %{?with_capi:BuildRequires: capi4k-utils-devel}
63 %{?with_cups:BuildRequires: cups-devel}
64 BuildRequires: docbook-dtd31-sgml
65 BuildRequires: docbook-utils
67 BuildRequires: fontconfig-devel
68 BuildRequires: fontforge
69 BuildRequires: freetype-devel >= 2.0.5
71 BuildRequires: gettext-devel
72 BuildRequires: giflib-devel
73 BuildRequires: gnutls-devel
74 %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel}
75 BuildRequires: icoutils
76 BuildRequires: lcms-devel
77 BuildRequires: libgphoto2-devel
78 BuildRequires: libgsm-devel
79 BuildRequires: libjpeg-devel
80 BuildRequires: libmpg123-devel >= 1.5.0
81 BuildRequires: libtool
82 BuildRequires: libv4l-devel
83 BuildRequires: libxslt-devel
84 BuildRequires: ncurses-devel
85 # db2* failed previously - probably openjade or opensp bug
86 BuildRequires: libpng-devel >= 1.5
87 BuildRequires: openjade >= 1:1.3.3-0.pre1
88 %{?with_ldap:BuildRequires: openldap-devel}
89 BuildRequires: opensp >= 1:1.5.1
90 BuildRequires: openssl-devel >= 0.9.7d
91 BuildRequires: pkgconfig
92 BuildRequires: prelink
93 %{?with_sane:BuildRequires: sane-backends-devel}
94 BuildRequires: unixODBC-devel >= 2.2.12-2
95 #BuildRequires: valgrind
96 BuildRequires: xorg-lib-libXcomposite-devel
97 BuildRequires: xorg-lib-libXcursor-devel
98 BuildRequires: xorg-lib-libXi-devel
99 BuildRequires: xorg-lib-libXinerama-devel
100 BuildRequires: xorg-lib-libXmu-devel
101 BuildRequires: xorg-lib-libXrandr-devel
102 BuildRequires: xorg-lib-libXrender-devel
103 BuildRequires: xorg-lib-libXxf86dga-devel
104 BuildRequires: xorg-lib-libXxf86vm-devel
105 Requires: libfreetype.so.6%{libqual}
106 Requires: libpng15.so.15%{libqual}
107 Requires(post): /sbin/ldconfig
108 Suggests: binfmt-detector
109 Suggests: ca-certificates
111 Conflicts: ca-certificates < 20080809-4
112 # for printing needs lpr
113 Suggests: cups-clients
115 Suggests: xorg-app-xmessage
117 Suggests: samba-common >= 1:3.0.25
118 # link to wine/ntdll.dll.so, without any SONAME
119 Provides: libntdll.dll.so
120 Obsoletes: wine-doc-pdf
121 Obsoletes: wine-drv-arts
122 Obsoletes: wine-drv-jack
123 Obsoletes: wine-drv-nas
124 ExclusiveArch: %{ix86} %{x8664}
126 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
128 %define _noautoreqdep libGL.so.1 libGLU.so.1
129 %define no_install_post_strip 1
131 %define _winedir %{_datadir}/%{name}
134 Wine is a program which allows running Microsoft Windows programs
135 (including DOS, Windows 3.x and Win32 executables) on Unix. It
136 consists of a program loader which loads and executes a Microsoft
137 Windows binary, and a library that implements Windows API calls using
138 their Unix or X11 equivalents. The library may also be used for
139 porting Win32 code into native Unix executables.
141 %description -l es.UTF-8
142 Ejecuta programas Windows en Linux.
144 %description -l pl.UTF-8
145 Wine jest programem dzięki któremu można uruchamiać programy napisane
146 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
147 loadera, który pozwala wczytywać i uruchamiać programy w formacie
148 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
149 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
150 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
152 %description -l pt_BR.UTF-8
153 O Wine é um programa que permite rodar programas MS-Windows no X11.
154 Ele consiste de um carregador de programa, que carrega e executa um
155 binário MS-Windows, e de uma biblioteca de emulação que traduz as
156 chamadas da API para as equivalentes Unix/X11.
159 Summary: Wine - header files
160 Summary(es.UTF-8): Biblioteca de desarrollo de wine
161 Summary(pl.UTF-8): Wine - pliki nagłowkowe
162 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
163 Group: Development/Libraries
164 Requires: %{name} = %{epoch}:%{version}-%{release}
169 %description devel -l es.UTF-8
170 Biblioteca de desarrollo de wine.
172 %description devel -l pl.UTF-8
173 Wine - pliki nagłówkowe.
175 %description devel -l pt_BR.UTF-8
176 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
180 Summary: Wine - programs
181 Summary(pl.UTF-8): Wine - programy
183 Requires: %{name} = %{epoch}:%{version}-%{release}
185 %description programs
188 %description programs -l pl.UTF-8
192 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
193 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
194 Group: Applications/Emulators
195 Requires: %{name} = %{epoch}:%{version}-%{release}
197 %description dll-capi
198 CAPI 2.0 (ISDN) implementation DLLs for Wine (through OpenGL).
200 %description dll-capi -l pl.UTF-8
201 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine (poprzez
205 Summary: Direct3D implementation DLLs for Wine
206 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
207 Group: Applications/Emulators
208 Requires: %{name} = %{epoch}:%{version}-%{release}
212 Direct3D implementation DLLs for Wine (through OpenGL).
214 %description dll-d3d -l pl.UTF-8
215 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
218 Summary: OpenGL implementation DLLs for Wine
219 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
220 Group: Applications/Emulators
221 Requires: %{name} = %{epoch}:%{version}-%{release}
225 OpenGL implementation DLLs for Wine.
227 %description dll-gl -l pl.UTF-8
228 Biblioteki DLL z implementacją OpenGL dla Wine.
231 Summary: TWAIN implementation DLL for Wine
232 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
233 Group: Applications/Emulators
234 Requires: %{name} = %{epoch}:%{version}-%{release}
236 %description dll-twain
237 TWAIN implementation DLL for Wine (through SANE).
239 %description dll-twain -l pl.UTF-8
240 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
243 Summary: Win32 LDAP API DLL for Wine
244 Group: Applications/Emulators
245 Requires: %{name} = %{epoch}:%{version}-%{release}
247 %description dll-ldap
248 Lightweight Directory Access Protocol Library.
251 Summary: ALSA driver for WINE mm.dll implementation
252 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
253 Group: Applications/Emulators
254 Requires: %{name} = %{epoch}:%{version}-%{release}
256 %description drv-alsa
257 ALSA driver for WINE mm.dll (multimedia system) implementation.
259 %description drv-alsa -l pl.UTF-8
260 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
274 icotool -x --width=32 --height=32 --bit-depth=32 -o . dlls/user32/resources/oic_winlogo.ico
275 mv -f oic_winlogo_*.png %{name}.png
283 --with%{!?with_alsa:out}-alsa \
284 --with%{!?with_capi:out}-capi \
287 --with%{!?with_cups:out}-cups \
295 --with%{!?with_gstreamer:out}-gstreamer \
297 --with%{!?with_ldap:out}-ldap \
304 --with%{!?with_sane:out}-sane \
321 rm -rf $RPM_BUILD_ROOT
322 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
324 DESTDIR=$RPM_BUILD_ROOT
326 findup -m $RPM_BUILD_ROOT%{_winedir}/fakedlls
328 install -p tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
329 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
332 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
333 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
334 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
335 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
336 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
338 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
339 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
340 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
342 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
346 waveaudio=mciwave.drv
348 videodisc=mcipionr.drv
353 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
358 cd $RPM_BUILD_ROOT%{_libdir}/wine
361 capi2032.dll.so|d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|opengl32.dll.so|sane.ds.so|twain.dll.so|twain_32.dll.so|winealsa.drv.so|wined3d.dll.so|wldap32.dll.so)
364 echo "%attr(755,root,root) %{_libdir}/wine/$f" >> $dir/files.so
369 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
370 for p in $programs; do
371 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
372 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
373 echo "%{_mandir}/man1/$p.1*" >> files.programs
374 grep -v "$p\.exe\.so$" files.so > files.so.
375 mv -f files.so. files.so
378 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
380 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
382 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
385 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
386 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
387 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
390 rm -rf $RPM_BUILD_ROOT
394 %update_desktop_database
396 %postun -p /sbin/ldconfig
398 %triggerpostun -- wine < 1:0.9.12-1.9
399 rm -f /var/lock/subsys/wine
400 if [ -x /sbin/chkconfig ]; then
401 /sbin/chkconfig --del wine
405 %defattr(644,root,root,755)
406 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
407 %lang(de) %doc documentation/README.de
408 %lang(es) %doc documentation/README.es
409 %lang(fr) %doc documentation/README.fr
410 %lang(hu) %doc documentation/README.hu
411 %lang(it) %doc documentation/README.it
412 %lang(ko) %doc documentation/README.ko
413 %lang(nb) %doc documentation/README.no
414 %lang(pt) %doc documentation/README.pt
415 %lang(pt_BR) %doc documentation/README.pt_br
416 %lang(ru) %doc documentation/README.ru
417 %lang(sv) %doc documentation/README.sv
418 %lang(tr) %doc documentation/README.tr
419 %attr(755,root,root) %{_bindir}/msiexec
421 %attr(755,root,root) %{_bindir}/wine
423 %attr(755,root,root) %{_bindir}/wine64
425 %attr(755,root,root) %{_bindir}/wineboot
426 %attr(755,root,root) %{_bindir}/winedbg
427 %attr(755,root,root) %{_bindir}/winecfg
429 %attr(755,root,root) %{_bindir}/wine-preloader
431 %attr(755,root,root) %{_bindir}/wine64-preloader
433 %attr(755,root,root) %{_bindir}/wineserver
434 %attr(755,root,root) %{_libdir}/*.so*
436 %dir %{_libdir}/wine/fakedlls
437 %{_libdir}/wine/fakedlls/*.acm
438 %{_libdir}/wine/fakedlls/*.cpl
439 %{_libdir}/wine/fakedlls/*.dll
441 %{_libdir}/wine/fakedlls/*.dll16
443 %{_libdir}/wine/fakedlls/*.drv
445 %{_libdir}/wine/fakedlls/*.drv16
447 %{_libdir}/wine/fakedlls/*.ds
448 %{_libdir}/wine/fakedlls/*.exe
450 %{_libdir}/wine/fakedlls/*.exe16
451 %{_libdir}/wine/fakedlls/*.mod16
453 %{_libdir}/wine/fakedlls/*.ocx
454 %{_libdir}/wine/fakedlls/*.sys
455 %{_libdir}/wine/fakedlls/*.tlb
457 %{_libdir}/wine/fakedlls/*.vxd
459 %{_mandir}/man1/wine.1*
460 %{_mandir}/man1/msiexec.1*
461 %{_mandir}/man1/wineboot.1*
462 %{_mandir}/man1/winecfg.1*
463 %{_mandir}/man1/winedbg.1*
464 %{_mandir}/man1/wineserver.1*
465 %lang(de) %{_mandir}/de/man1/wineserver.1*
466 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
468 %{_desktopdir}/wine.desktop
469 %{_desktopdir}/wine-uninstaller.desktop
470 %{_pixmapsdir}/%{name}.png
472 %files programs -f files.programs
473 %defattr(644,root,root,755)
476 %defattr(644,root,root,755)
477 %attr(755,root,root) %{_bindir}/fnt2bdf
478 %attr(755,root,root) %{_bindir}/function_grep.pl
479 %attr(755,root,root) %{_bindir}/widl
480 %attr(755,root,root) %{_bindir}/winebuild
481 %attr(755,root,root) %{_bindir}/winedump
482 %attr(755,root,root) %{_bindir}/wineg++
483 %attr(755,root,root) %{_bindir}/winegcc
484 %attr(755,root,root) %{_bindir}/winemaker
485 %attr(755,root,root) %{_bindir}/winecpp
486 %attr(755,root,root) %{_bindir}/wmc
487 %attr(755,root,root) %{_bindir}/wrc
488 %{_libdir}/wine/lib*.def
489 # no shared variants, so not separated
490 %{_libdir}/wine/lib*.def.a
491 %{_libdir}/wine/libadsiid.a
492 %{_libdir}/wine/libdx*.a
493 %{_libdir}/wine/libstrmbase.a
494 %{_libdir}/wine/libstrmiids.a
495 %{_libdir}/wine/libuuid.a
496 %{_libdir}/wine/libwinecrt0.a
498 %{_mandir}/man1/widl.1*
499 %{_mandir}/man1/winebuild.1*
500 %{_mandir}/man1/winecpp.1*
501 %{_mandir}/man1/winedump.1*
502 %{_mandir}/man1/winegcc.1*
503 %{_mandir}/man1/wineg++.1*
504 %{_mandir}/man1/winemaker.1*
505 %lang(de) %{_mandir}/de/man1/winemaker.1*
506 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
507 %{_mandir}/man1/wmc.1*
508 %{_mandir}/man1/wrc.1*
512 %defattr(644,root,root,755)
513 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
516 %defattr(644,root,root,755)
517 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
518 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
519 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
522 %defattr(644,root,root,755)
523 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
524 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
528 %defattr(644,root,root,755)
529 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
530 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
535 %defattr(644,root,root,755)
536 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
541 %defattr(644,root,root,755)
542 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
545 # additional dependencies in *.so not separated (yet?) from main package
546 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
547 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
548 # ttydrv.dll.so depends on ncurses