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.47
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: https://dl.winehq.org/wine/source/3.0/%{name}-%{version}.tar.xz
54 # Source0-md5: 21f71387f4975493c392e3019f5d536b
55 Source1: https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}_gecko-%{gecko_ver}-x86.msi
56 # Source1-md5: 5ebc4ec71c92b3db3d84b334a1db385d
57 Source2: https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}_gecko-%{gecko_ver}-x86_64.msi
58 # Source2-md5: d93ac0d2e6aceafe9113a9918916df45
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 BuildRequires: gettext-devel
85 BuildRequires: gcc >= 6:4.4
87 BuildRequires: gettext-tools
88 BuildRequires: gnutls-devel
89 %{?with_gstreamer:BuildRequires: gstreamer-devel >= 1.0}
90 %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel >= 1.0}
91 %{?with_hal:BuildRequires: hal-devel}
92 # for icotool used in build
93 BuildRequires: icoutils >= 0.29.0
94 BuildRequires: lcms2-devel >= 2
95 BuildRequires: libcap-devel
96 BuildRequires: libgphoto2-devel
97 BuildRequires: libgsm-devel
98 BuildRequires: libjpeg-devel
99 BuildRequires: libmpg123-devel >= 1.5.0
100 BuildRequires: libpcap-devel
101 BuildRequires: libpng-devel >= 1.5
102 BuildRequires: libtiff-devel
103 BuildRequires: libv4l-devel
104 BuildRequires: libxml2-devel >= 2.0
105 BuildRequires: libxslt-devel
106 BuildRequires: ncurses-devel
107 %{?with_ldap:BuildRequires: openldap-devel}
108 BuildRequires: pkgconfig
109 BuildRequires: pulseaudio-devel
110 BuildRequires: samba-devel
111 %{?with_sane:BuildRequires: sane-backends-devel}
112 BuildRequires: xorg-lib-libX11-devel
113 BuildRequires: xorg-lib-libXcomposite-devel
114 BuildRequires: xorg-lib-libXcursor-devel
115 BuildRequires: xorg-lib-libXext-devel
116 BuildRequires: xorg-lib-libXi-devel
117 BuildRequires: xorg-lib-libXinerama-devel
118 BuildRequires: xorg-lib-libXrandr-devel
119 BuildRequires: xorg-lib-libXrender-devel
120 BuildRequires: xorg-lib-libXxf86vm-devel
121 BuildRequires: zlib-devel
122 Requires: libfreetype.so.6%{libqual}
123 Requires: libpng16.so.16%{libqual}
124 Requires(post): /sbin/ldconfig
125 Suggests: binfmt-detector
126 Suggests: ca-certificates
128 Conflicts: ca-certificates < 20080809-4
129 # for printing needs lpr
130 Suggests: cups-clients
132 Suggests: xorg-app-xmessage
134 Suggests: samba-common >= 1:3.0.25
135 # link to wine/ntdll.dll.so, without any SONAME
136 Provides: libntdll.dll.so
137 Obsoletes: wine-doc-pdf
138 Obsoletes: wine-drv-arts
139 Obsoletes: wine-drv-jack
140 Obsoletes: wine-drv-nas
141 ExclusiveArch: %{ix86} %{x8664} arm
143 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
145 %define no_install_post_strip 1
146 %define _noautoprov elf\\\\(buildid\\\\)
148 %define _winedir %{_datadir}/%{name}
151 Wine is a program which allows running Microsoft Windows programs
152 (including DOS, Windows 3.x and Win32 executables) on Unix. It
153 consists of a program loader which loads and executes a Microsoft
154 Windows binary, and a library that implements Windows API calls using
155 their Unix or X11 equivalents. The library may also be used for
156 porting Win32 code into native Unix executables.
158 %description -l es.UTF-8
159 Ejecuta programas Windows en Linux.
161 %description -l pl.UTF-8
162 Wine jest programem dzięki któremu można uruchamiać programy napisane
163 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
164 loadera, który pozwala wczytywać i uruchamiać programy w formacie
165 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
166 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
167 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
169 %description -l pt_BR.UTF-8
170 O Wine é um programa que permite rodar programas MS-Windows no X11.
171 Ele consiste de um carregador de programa, que carrega e executa um
172 binário MS-Windows, e de uma biblioteca de emulação que traduz as
173 chamadas da API para as equivalentes Unix/X11.
176 Summary: Wine - header files
177 Summary(es.UTF-8): Biblioteca de desarrollo de wine
178 Summary(pl.UTF-8): Wine - pliki nagłowkowe
179 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
180 Group: Development/Libraries
181 Requires: %{name} = %{epoch}:%{version}-%{release}
186 %description devel -l es.UTF-8
187 Biblioteca de desarrollo de wine.
189 %description devel -l pl.UTF-8
190 Wine - pliki nagłówkowe.
192 %description devel -l pt_BR.UTF-8
193 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
197 Summary: Wine - programs
198 Summary(pl.UTF-8): Wine - programy
200 Requires: %{name} = %{epoch}:%{version}-%{release}
202 %description programs
205 %description programs -l pl.UTF-8
209 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
210 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
211 Group: Applications/Emulators
212 Requires: %{name} = %{epoch}:%{version}-%{release}
214 %description dll-capi
215 CAPI 2.0 (ISDN) implementation DLLs for Wine.
217 %description dll-capi -l pl.UTF-8
218 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine.
221 Summary: Direct3D implementation DLLs for Wine
222 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
223 Group: Applications/Emulators
224 Requires: %{name} = %{epoch}:%{version}-%{release}
228 Direct3D implementation DLLs for Wine (through OpenGL).
230 %description dll-d3d -l pl.UTF-8
231 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
234 Summary: OpenGL implementation DLLs for Wine
235 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
236 Group: Applications/Emulators
237 Requires: %{name} = %{epoch}:%{version}-%{release}
241 OpenGL implementation DLLs for Wine.
243 %description dll-gl -l pl.UTF-8
244 Biblioteki DLL z implementacją OpenGL dla Wine.
247 Summary: TWAIN implementation DLL for Wine
248 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
249 Group: Applications/Emulators
250 Requires: %{name} = %{epoch}:%{version}-%{release}
252 %description dll-twain
253 TWAIN implementation DLL for Wine (through SANE).
255 %description dll-twain -l pl.UTF-8
256 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
259 Summary: Win32 LDAP API DLL for Wine
260 Summary(pl.UTF-8): Biblioteka DLL z implementacją API Win32 LDAP dla Wine
261 Group: Applications/Emulators
262 Requires: %{name} = %{epoch}:%{version}-%{release}
264 %description dll-ldap
265 Lightweight Directory Access Protocol Library for Wine.
267 %description dll-ldap -l pl.UTF-8
268 Biblioteka LDAP (Lightweight Directory Access Protocol) dla Wine.
271 Summary: ALSA driver for WINE mm.dll implementation
272 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
273 Group: Applications/Emulators
274 Requires: %{name} = %{epoch}:%{version}-%{release}
276 %description drv-alsa
277 ALSA driver for WINE mm.dll (multimedia system) implementation.
279 %description drv-alsa -l pl.UTF-8
280 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
295 icotool -x --width=32 --height=32 --bit-depth=32 -o . dlls/user32/resources/oic_winlogo.ico
296 mv -f oic_winlogo_*.png %{name}.png
304 --with-alsa%{!?with_alsa:=no} \
305 --with-capi%{!?with_capi:=no} \
308 --with-cups%{!?with_cups:=no} \
317 %{__with_without gstreamer} \
318 %{__with_without hal} \
320 --with-ldap%{!?with_ldap:=no} \
322 --with%{!?with_netapi:out}-netapi \
331 --with%{!?with_sane:out}-sane \
352 rm -rf $RPM_BUILD_ROOT
353 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
355 DESTDIR=$RPM_BUILD_ROOT
357 install -p tools/sfnt2fon/sfnt2fon $RPM_BUILD_ROOT%{_bindir}
358 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
361 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
362 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
363 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
364 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
365 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
367 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
368 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
369 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
371 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
375 waveaudio=mciwave.drv
377 videodisc=mcipionr.drv
382 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
387 cd $RPM_BUILD_ROOT%{_libdir}/wine
390 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)
393 echo "%attr(755,root,root) %{_libdir}/wine/$f" >> $dir/files.so
398 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
399 for p in $programs; do
400 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
401 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
402 echo "%{_mandir}/man1/$p.1*" >> files.programs
403 grep -v "$p\.exe\.so$" files.so > files.so.
404 mv -f files.so. files.so
407 for dir in $RPM_BUILD_ROOT%{_mandir}/*.UTF-8 ; do
408 mv "$dir" "${dir%.UTF-8}"
412 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine64.1
413 for lang in de fr pl ; do
414 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
415 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine64.1
418 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine.1
419 for lang in de fr pl ; do
420 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
421 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine.1
425 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
427 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
429 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
432 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
433 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
434 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
437 rm -rf $RPM_BUILD_ROOT
441 %update_desktop_database
443 %postun -p /sbin/ldconfig
445 %triggerpostun -- wine < 1:0.9.12-1.9
446 rm -f /var/lock/subsys/wine
447 if [ -x /sbin/chkconfig ]; then
448 /sbin/chkconfig --del wine
452 %defattr(644,root,root,755)
453 %doc README AUTHORS ANNOUNCE
454 %lang(de) %doc documentation/README.de
455 %lang(es) %doc documentation/README.es
456 %lang(fr) %doc documentation/README.fr
457 %lang(hu) %doc documentation/README.hu
458 %lang(it) %doc documentation/README.it
459 %lang(ko) %doc documentation/README.ko
460 %lang(nb) %doc documentation/README.no
461 %lang(pt) %doc documentation/README.pt
462 %lang(pt_BR) %doc documentation/README.pt_br
463 %lang(ru) %doc documentation/README.ru
464 %lang(sv) %doc documentation/README.sv
465 %lang(tr) %doc documentation/README.tr
466 %attr(755,root,root) %{_bindir}/msiexec
468 %attr(755,root,root) %{_bindir}/wine
470 %attr(755,root,root) %{_bindir}/wine64
472 %attr(755,root,root) %{_bindir}/wineboot
473 %attr(755,root,root) %{_bindir}/winedbg
474 %attr(755,root,root) %{_bindir}/winecfg
476 %attr(755,root,root) %{_bindir}/wine-preloader
478 %attr(755,root,root) %{_bindir}/wine64-preloader
480 %attr(755,root,root) %{_bindir}/wineserver
481 %attr(755,root,root) %{_libdir}/*.so*
483 %dir %{_libdir}/wine/fakedlls
484 %{_libdir}/wine/fakedlls/*.acm
485 %{_libdir}/wine/fakedlls/*.cpl
486 %{_libdir}/wine/fakedlls/*.dll
488 %{_libdir}/wine/fakedlls/*.dll16
490 %{_libdir}/wine/fakedlls/*.drv
492 %{_libdir}/wine/fakedlls/*.drv16
494 %{_libdir}/wine/fakedlls/*.ds
495 %{_libdir}/wine/fakedlls/*.exe
497 %{_libdir}/wine/fakedlls/*.exe16
498 %{_libdir}/wine/fakedlls/*.mod16
500 %{_libdir}/wine/fakedlls/*.ocx
501 %{_libdir}/wine/fakedlls/*.sys
502 %{_libdir}/wine/fakedlls/*.tlb
504 %{_libdir}/wine/fakedlls/*.vxd
507 %{_mandir}/man1/wine.1*
508 %lang(de) %{_mandir}/de/man1/wine.1*
509 %lang(fr) %{_mandir}/fr/man1/wine.1*
510 %lang(pl) %{_mandir}/pl/man1/wine.1*
512 %{_mandir}/man1/wine64.1*
513 %lang(de) %{_mandir}/de/man1/wine64.1*
514 %lang(fr) %{_mandir}/fr/man1/wine64.1*
515 %lang(pl) %{_mandir}/pl/man1/wine64.1*
517 %{_mandir}/man1/msiexec.1*
518 %{_mandir}/man1/wineboot.1*
519 %{_mandir}/man1/winecfg.1*
520 %{_mandir}/man1/winedbg.1*
521 %{_mandir}/man1/wineserver.1*
522 %lang(de) %{_mandir}/de/man1/wineserver.1*
523 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
525 %{_desktopdir}/wine.desktop
526 %{_desktopdir}/wine-uninstaller.desktop
527 %{_pixmapsdir}/%{name}.png
529 %files programs -f files.programs
530 %defattr(644,root,root,755)
533 %defattr(644,root,root,755)
534 %attr(755,root,root) %{_bindir}/sfnt2fon
535 %attr(755,root,root) %{_bindir}/function_grep.pl
536 %attr(755,root,root) %{_bindir}/widl
537 %attr(755,root,root) %{_bindir}/winebuild
538 %attr(755,root,root) %{_bindir}/winedump
539 %attr(755,root,root) %{_bindir}/wineg++
540 %attr(755,root,root) %{_bindir}/winegcc
541 %attr(755,root,root) %{_bindir}/winemaker
542 %attr(755,root,root) %{_bindir}/winecpp
543 %attr(755,root,root) %{_bindir}/wmc
544 %attr(755,root,root) %{_bindir}/wrc
545 %{_libdir}/wine/lib*.def
546 # no shared variants, so not separated
547 %{_libdir}/wine/libadsiid.a
548 %{_libdir}/wine/libdinput.a
549 %{_libdir}/wine/libdx*.a
550 %{_libdir}/wine/libmfuuid.a
551 %{_libdir}/wine/libstrmbase.a
552 %{_libdir}/wine/libstrmiids.a
553 %{_libdir}/wine/libuuid.a
554 %{_libdir}/wine/libwinecrt0.a
556 %{_mandir}/man1/widl.1*
557 %{_mandir}/man1/winebuild.1*
558 %{_mandir}/man1/winecpp.1*
559 %{_mandir}/man1/winedump.1*
560 %{_mandir}/man1/winegcc.1*
561 %{_mandir}/man1/wineg++.1*
562 %{_mandir}/man1/winemaker.1*
563 %lang(de) %{_mandir}/de/man1/winemaker.1*
564 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
565 %{_mandir}/man1/wmc.1*
566 %{_mandir}/man1/wrc.1*
570 %defattr(644,root,root,755)
571 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
574 %defattr(644,root,root,755)
575 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
576 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
577 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
580 %defattr(644,root,root,755)
581 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
582 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
586 %defattr(644,root,root,755)
587 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
588 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
593 %defattr(644,root,root,755)
594 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
599 %defattr(644,root,root,755)
600 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
603 # additional dependencies in *.so not separated (yet?) from main package
604 # ddraw.dll.so,winex11.drv.so depend on X11 libs
605 # ole2disp.dll16.so,oleaut32.dll.so,typelib.dll16.so depend on libX11