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_with hal # HAL dynamic device support [deprecated]
8 %bcond_without ldap # don't build LDAP DLL
9 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
10 %bcond_without netapi # don't use the Samba NetAPI library
12 # NOTE: wine detects the following SONAMES for dlopen at build time:
13 # libGL (winex11.drv.so)
14 # libOSMesa (gdi32.dll.so)
15 # libX11 libXcomposite libXcursor libXext libXi libXinerama libXrandr libXrender libXxf86vm (winex11.drv.so)
16 # libcapi20 (capi2032.dll.so)
17 # libcups (winspool.drv.so)
18 # libdbus (mountmgr.sys.so)
19 # libfontconfig (gdi32.dll.so)
20 # libfreetype (gdi32.dll.so)
21 # libgnutls (secur32.dll.so)
22 # libhal (mountmgr.sys.so)
23 # libjpeg (gphoto2.ds.so windowscodecs.dll.so)
24 # libncurses (kernel32.dll.so)
25 # libodbc (odbc32.dll.so)
26 # libpng (windowscodecs.dll.so)
27 # libsane (sane.ds.so)
28 # libtiff (windowscodecs.dll.so)
29 # libv4l1 (qcap.dll.so)
30 # libxslt (msxml3.dll.so)
31 # thus requires rebuild after change of any of the above.
33 # library qualifier in rpm generated deps
34 %ifarch %{x8664} ia64 ppc64 s390x sparc64
35 %define libqual ()(64bit)
37 %define libqual %{nil}
40 %define gecko_ver 2.24
41 Summary: Program that lets you launch Win applications
42 Summary(es.UTF-8): Ejecuta programas Windows en Linux
43 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
44 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
52 Group: Applications/Emulators
53 Source0: http://downloads.sourceforge.net/wine/%{name}-%{version}.tar.bz2
54 # Source0-md5: 96b51a2f2ae727802d71095354e69fef
55 Source1: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86.msi
56 # Source1-md5: 766bb034172f7f0a97443951a02a0df8
57 Source2: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86_64.msi
58 # Source2-md5: 1912fd191872c72d5f562283e44e8ab4
59 Source3: %{name}-uninstaller.desktop
60 Patch0: %{name}-gphoto2_bool.patch
61 Patch1: %{name}-makedep.patch
62 Patch2: %{name}-ncurses.patch
63 Patch4: %{name}-disable-valgrind.patch
64 Patch5: %{name}-ca_certificates.patch
66 Patch7: %{name}-wine64_man.patch
67 URL: http://www.winehq.org/
68 BuildRequires: Mesa-libOSMesa-devel
69 BuildRequires: OpenAL-devel >= 1.1
70 BuildRequires: OpenCL-devel
71 BuildRequires: OpenGL-GLU-devel
72 %{?with_alsa:BuildRequires: alsa-lib-devel}
73 %{?with_arts:BuildRequires: artsc-devel}
74 BuildRequires: autoconf >= 2.62
75 BuildRequires: automake
77 %{?with_capi:BuildRequires: capi4k-utils-devel}
78 %{?with_cups:BuildRequires: cups-devel}
79 BuildRequires: dbus-devel
80 BuildRequires: flex >= 2.5.33
81 BuildRequires: fontconfig-devel
82 BuildRequires: freetype-devel >= 2.0.5
83 # for findup used after make install
85 BuildRequires: gettext-devel
87 BuildRequires: gcc >= 6:4.4
89 BuildRequires: gettext-tools
90 BuildRequires: gnutls-devel
91 %{?with_gstreamer:BuildRequires: gstreamer0.10-devel >= 0.10}
92 %{?with_gstreamer:BuildRequires: gstreamer0.10-plugins-base-devel >= 0.10}
93 %{?with_hal:BuildRequires: hal-devel}
94 # for icotool used in build
95 BuildRequires: icoutils >= 0.29.0
96 BuildRequires: lcms2-devel >= 2
97 BuildRequires: libcap-devel
98 BuildRequires: libgphoto2-devel
99 BuildRequires: libgsm-devel
100 BuildRequires: libjpeg-devel
101 BuildRequires: libmpg123-devel >= 1.5.0
102 BuildRequires: libpcap-devel
103 BuildRequires: libpng-devel >= 1.5
104 BuildRequires: libtiff-devel
105 BuildRequires: libv4l-devel
106 BuildRequires: libxml2-devel >= 2.0
107 BuildRequires: libxslt-devel
108 BuildRequires: ncurses-devel
109 %{?with_ldap:BuildRequires: openldap-devel}
110 BuildRequires: pkgconfig
111 BuildRequires: pulseaudio-devel
112 BuildRequires: samba-devel
113 %{?with_sane:BuildRequires: sane-backends-devel}
114 BuildRequires: xorg-lib-libX11-devel
115 BuildRequires: xorg-lib-libXcomposite-devel
116 BuildRequires: xorg-lib-libXcursor-devel
117 BuildRequires: xorg-lib-libXext-devel
118 BuildRequires: xorg-lib-libXi-devel
119 BuildRequires: xorg-lib-libXinerama-devel
120 BuildRequires: xorg-lib-libXrandr-devel
121 BuildRequires: xorg-lib-libXrender-devel
122 BuildRequires: xorg-lib-libXxf86vm-devel
123 BuildRequires: zlib-devel
124 Requires: libfreetype.so.6%{libqual}
125 Requires: libpng16.so.16%{libqual}
126 Requires(post): /sbin/ldconfig
127 Suggests: binfmt-detector
128 Suggests: ca-certificates
130 Conflicts: ca-certificates < 20080809-4
131 # for printing needs lpr
132 Suggests: cups-clients
134 Suggests: xorg-app-xmessage
136 Suggests: samba-common >= 1:3.0.25
137 # link to wine/ntdll.dll.so, without any SONAME
138 Provides: libntdll.dll.so
139 Obsoletes: wine-doc-pdf
140 Obsoletes: wine-drv-arts
141 Obsoletes: wine-drv-jack
142 Obsoletes: wine-drv-nas
143 ExclusiveArch: %{ix86} %{x8664} arm
145 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
147 %define no_install_post_strip 1
149 %define _winedir %{_datadir}/%{name}
152 Wine is a program which allows running Microsoft Windows programs
153 (including DOS, Windows 3.x and Win32 executables) on Unix. It
154 consists of a program loader which loads and executes a Microsoft
155 Windows binary, and a library that implements Windows API calls using
156 their Unix or X11 equivalents. The library may also be used for
157 porting Win32 code into native Unix executables.
159 %description -l es.UTF-8
160 Ejecuta programas Windows en Linux.
162 %description -l pl.UTF-8
163 Wine jest programem dzięki któremu można uruchamiać programy napisane
164 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
165 loadera, który pozwala wczytywać i uruchamiać programy w formacie
166 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
167 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
168 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
170 %description -l pt_BR.UTF-8
171 O Wine é um programa que permite rodar programas MS-Windows no X11.
172 Ele consiste de um carregador de programa, que carrega e executa um
173 binário MS-Windows, e de uma biblioteca de emulação que traduz as
174 chamadas da API para as equivalentes Unix/X11.
177 Summary: Wine - header files
178 Summary(es.UTF-8): Biblioteca de desarrollo de wine
179 Summary(pl.UTF-8): Wine - pliki nagłowkowe
180 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
181 Group: Development/Libraries
182 Requires: %{name} = %{epoch}:%{version}-%{release}
187 %description devel -l es.UTF-8
188 Biblioteca de desarrollo de wine.
190 %description devel -l pl.UTF-8
191 Wine - pliki nagłówkowe.
193 %description devel -l pt_BR.UTF-8
194 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
198 Summary: Wine - programs
199 Summary(pl.UTF-8): Wine - programy
201 Requires: %{name} = %{epoch}:%{version}-%{release}
203 %description programs
206 %description programs -l pl.UTF-8
210 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
211 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
212 Group: Applications/Emulators
213 Requires: %{name} = %{epoch}:%{version}-%{release}
215 %description dll-capi
216 CAPI 2.0 (ISDN) implementation DLLs for Wine.
218 %description dll-capi -l pl.UTF-8
219 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine.
222 Summary: Direct3D implementation DLLs for Wine
223 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
224 Group: Applications/Emulators
225 Requires: %{name} = %{epoch}:%{version}-%{release}
229 Direct3D implementation DLLs for Wine (through OpenGL).
231 %description dll-d3d -l pl.UTF-8
232 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
235 Summary: OpenGL implementation DLLs for Wine
236 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
237 Group: Applications/Emulators
238 Requires: %{name} = %{epoch}:%{version}-%{release}
242 OpenGL implementation DLLs for Wine.
244 %description dll-gl -l pl.UTF-8
245 Biblioteki DLL z implementacją OpenGL dla Wine.
248 Summary: TWAIN implementation DLL for Wine
249 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
250 Group: Applications/Emulators
251 Requires: %{name} = %{epoch}:%{version}-%{release}
253 %description dll-twain
254 TWAIN implementation DLL for Wine (through SANE).
256 %description dll-twain -l pl.UTF-8
257 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
260 Summary: Win32 LDAP API DLL for Wine
261 Summary(pl.UTF-8): Biblioteka DLL z implementacją API Win32 LDAP dla Wine
262 Group: Applications/Emulators
263 Requires: %{name} = %{epoch}:%{version}-%{release}
265 %description dll-ldap
266 Lightweight Directory Access Protocol Library for Wine.
268 %description dll-ldap -l pl.UTF-8
269 Biblioteka LDAP (Lightweight Directory Access Protocol) dla Wine.
272 Summary: ALSA driver for WINE mm.dll implementation
273 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
274 Group: Applications/Emulators
275 Requires: %{name} = %{epoch}:%{version}-%{release}
277 %description drv-alsa
278 ALSA driver for WINE mm.dll (multimedia system) implementation.
280 %description drv-alsa -l pl.UTF-8
281 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
296 icotool -x --width=32 --height=32 --bit-depth=32 -o . dlls/user32/resources/oic_winlogo.ico
297 mv -f oic_winlogo_*.png %{name}.png
305 --with-alsa%{!?with_alsa:=no} \
306 --with-capi%{!?with_capi:=no} \
309 --with-cups%{!?with_cups:=no} \
318 %{__with_without gstreamer} \
319 %{__with_without hal} \
321 --with-ldap%{!?with_ldap:=no} \
323 --with%{!?with_netapi:out}-netapi \
333 --with%{!?with_sane:out}-sane \
354 rm -rf $RPM_BUILD_ROOT
355 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
357 DESTDIR=$RPM_BUILD_ROOT
359 install -p tools/sfnt2fon/sfnt2fon $RPM_BUILD_ROOT%{_bindir}
360 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
363 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
364 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
365 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
366 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
367 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
369 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
370 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
371 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
373 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
377 waveaudio=mciwave.drv
379 videodisc=mcipionr.drv
384 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
389 cd $RPM_BUILD_ROOT%{_libdir}/wine
392 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)
395 echo "%attr(755,root,root) %{_libdir}/wine/$f" >> $dir/files.so
400 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
401 for p in $programs; do
402 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
403 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
404 echo "%{_mandir}/man1/$p.1*" >> files.programs
405 grep -v "$p\.exe\.so$" files.so > files.so.
406 mv -f files.so. files.so
409 for dir in $RPM_BUILD_ROOT%{_mandir}/*.UTF-8 ; do
410 mv "$dir" "${dir%.UTF-8}"
414 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine64.1
415 for lang in de fr pl ; do
416 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
417 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine64.1
420 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine.1
421 for lang in de fr pl ; do
422 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
423 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine.1
427 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
429 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
431 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
434 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
435 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
436 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
439 rm -rf $RPM_BUILD_ROOT
443 %update_desktop_database
445 %postun -p /sbin/ldconfig
447 %triggerpostun -- wine < 1:0.9.12-1.9
448 rm -f /var/lock/subsys/wine
449 if [ -x /sbin/chkconfig ]; then
450 /sbin/chkconfig --del wine
454 %defattr(644,root,root,755)
455 %doc README AUTHORS ANNOUNCE
456 %lang(de) %doc documentation/README.de
457 %lang(es) %doc documentation/README.es
458 %lang(fr) %doc documentation/README.fr
459 %lang(hu) %doc documentation/README.hu
460 %lang(it) %doc documentation/README.it
461 %lang(ko) %doc documentation/README.ko
462 %lang(nb) %doc documentation/README.no
463 %lang(pt) %doc documentation/README.pt
464 %lang(pt_BR) %doc documentation/README.pt_br
465 %lang(ru) %doc documentation/README.ru
466 %lang(sv) %doc documentation/README.sv
467 %lang(tr) %doc documentation/README.tr
468 %attr(755,root,root) %{_bindir}/msiexec
470 %attr(755,root,root) %{_bindir}/wine
472 %attr(755,root,root) %{_bindir}/wine64
474 %attr(755,root,root) %{_bindir}/wineboot
475 %attr(755,root,root) %{_bindir}/winedbg
476 %attr(755,root,root) %{_bindir}/winecfg
478 %attr(755,root,root) %{_bindir}/wine-preloader
480 %attr(755,root,root) %{_bindir}/wine64-preloader
482 %attr(755,root,root) %{_bindir}/wineserver
483 %attr(755,root,root) %{_libdir}/*.so*
485 %dir %{_libdir}/wine/fakedlls
486 %{_libdir}/wine/fakedlls/*.acm
487 %{_libdir}/wine/fakedlls/*.cpl
488 %{_libdir}/wine/fakedlls/*.dll
490 %{_libdir}/wine/fakedlls/*.dll16
492 %{_libdir}/wine/fakedlls/*.drv
494 %{_libdir}/wine/fakedlls/*.drv16
496 %{_libdir}/wine/fakedlls/*.ds
497 %{_libdir}/wine/fakedlls/*.exe
499 %{_libdir}/wine/fakedlls/*.exe16
500 %{_libdir}/wine/fakedlls/*.mod16
502 %{_libdir}/wine/fakedlls/*.ocx
503 %{_libdir}/wine/fakedlls/*.sys
504 %{_libdir}/wine/fakedlls/*.tlb
506 %{_libdir}/wine/fakedlls/*.vxd
509 %{_mandir}/man1/wine.1*
510 %lang(de) %{_mandir}/de/man1/wine.1*
511 %lang(fr) %{_mandir}/fr/man1/wine.1*
512 %lang(pl) %{_mandir}/pl/man1/wine.1*
514 %{_mandir}/man1/wine64.1*
515 %lang(de) %{_mandir}/de/man1/wine64.1*
516 %lang(fr) %{_mandir}/fr/man1/wine64.1*
517 %lang(pl) %{_mandir}/pl/man1/wine64.1*
519 %{_mandir}/man1/msiexec.1*
520 %{_mandir}/man1/wineboot.1*
521 %{_mandir}/man1/winecfg.1*
522 %{_mandir}/man1/winedbg.1*
523 %{_mandir}/man1/wineserver.1*
524 %lang(de) %{_mandir}/de/man1/wineserver.1*
525 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
527 %{_desktopdir}/wine.desktop
528 %{_desktopdir}/wine-uninstaller.desktop
529 %{_pixmapsdir}/%{name}.png
531 %files programs -f files.programs
532 %defattr(644,root,root,755)
535 %defattr(644,root,root,755)
536 %attr(755,root,root) %{_bindir}/sfnt2fon
537 %attr(755,root,root) %{_bindir}/function_grep.pl
538 %attr(755,root,root) %{_bindir}/widl
539 %attr(755,root,root) %{_bindir}/winebuild
540 %attr(755,root,root) %{_bindir}/winedump
541 %attr(755,root,root) %{_bindir}/wineg++
542 %attr(755,root,root) %{_bindir}/winegcc
543 %attr(755,root,root) %{_bindir}/winemaker
544 %attr(755,root,root) %{_bindir}/winecpp
545 %attr(755,root,root) %{_bindir}/wmc
546 %attr(755,root,root) %{_bindir}/wrc
547 %{_libdir}/wine/lib*.def
548 # no shared variants, so not separated
549 %{_libdir}/wine/lib*.def.a
550 %{_libdir}/wine/libadsiid.a
551 %{_libdir}/wine/libdx*.a
552 %{_libdir}/wine/libstrmbase.a
553 %{_libdir}/wine/libstrmiids.a
554 %{_libdir}/wine/libuuid.a
555 %{_libdir}/wine/libwinecrt0.a
557 %{_mandir}/man1/widl.1*
558 %{_mandir}/man1/winebuild.1*
559 %{_mandir}/man1/winecpp.1*
560 %{_mandir}/man1/winedump.1*
561 %{_mandir}/man1/winegcc.1*
562 %{_mandir}/man1/wineg++.1*
563 %{_mandir}/man1/winemaker.1*
564 %lang(de) %{_mandir}/de/man1/winemaker.1*
565 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
566 %{_mandir}/man1/wmc.1*
567 %{_mandir}/man1/wrc.1*
571 %defattr(644,root,root,755)
572 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
575 %defattr(644,root,root,755)
576 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
577 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
578 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
581 %defattr(644,root,root,755)
582 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
583 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
587 %defattr(644,root,root,755)
588 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
589 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
594 %defattr(644,root,root,755)
595 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
600 %defattr(644,root,root,755)
601 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
604 # additional dependencies in *.so not separated (yet?) from main package
605 # ddraw.dll.so,winex11.drv.so depend on X11 libs
606 # ole2disp.dll16.so,oleaut32.dll.so,typelib.dll16.so depend on libX11