3 # libvkd3d https://wiki.winehq.org/Vkd3d
6 %bcond_without alsa # don't build ALSA mm driver
7 %bcond_with capi # don't build CAPI 2.0 (ISDN) support
8 %bcond_without gstreamer # don't build GStreamer filters support
9 %bcond_without sane # don't build TWAIN DLL with scanning support (through SANE)
10 %bcond_without ldap # don't build LDAP DLL
11 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
12 %bcond_without netapi # don't use the Samba NetAPI library
14 # NOTE: wine detects the following SONAMES for dlopen at build time:
15 # libGL (winex11.drv.so)
16 # libOSMesa (gdi32.dll.so)
17 # libX11 libXcomposite libXcursor libXext libXi libXinerama libXrandr libXrender libXxf86vm (winex11.drv.so)
18 # libcapi20 (capi2032.dll.so)
19 # libcups (winspool.drv.so)
20 # libdbus (mountmgr.sys.so)
21 # libfontconfig (gdi32.dll.so)
22 # libfreetype (gdi32.dll.so)
23 # libgnutls (secur32.dll.so)
24 # libncurses (kernel32.dll.so)
25 # libodbc (odbc32.dll.so)
26 # libsane (sane.ds.so)
27 # libtiff (windowscodecs.dll.so)
28 # thus requires rebuild after change of any of the above.
30 # library qualifier in rpm generated deps
31 %ifarch %{x8664} ia64 ppc64 s390x sparc64
32 %define libqual ()(64bit)
34 %define libqual %{nil}
38 %define winelib x86_64
43 %define gecko_ver 2.47.2
44 Summary: Program that lets you launch Win applications
45 Summary(es.UTF-8): Ejecuta programas Windows en Linux
46 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
47 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
53 Group: Applications/Emulators
54 Source0: https://dl.winehq.org/wine/source/7.x/%{name}-%{version}.tar.xz
55 # Source0-md5: 2a15c22b7a7f56503291381a9f608ecb
56 Source1: https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}-gecko-%{gecko_ver}-x86.msi
57 # Source1-md5: e0a26e37397961b2c7f624575590ef66
58 Source2: https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}-gecko-%{gecko_ver}-x86_64.msi
59 # Source2-md5: ff7168b08fa901516fbaa8a66aa3cee6
60 Source3: %{name}-uninstaller.desktop
61 Patch0: %{name}-gphoto2_bool.patch
62 Patch1: %{name}-makedep.patch
63 Patch2: %{name}-ncurses.patch
64 Patch4: %{name}-disable-valgrind.patch
65 Patch5: %{name}-ca_certificates.patch
67 Patch7: %{name}-wine64_man.patch
68 URL: http://www.winehq.org/
69 BuildRequires: Mesa-libOSMesa-devel
70 BuildRequires: OpenAL-devel >= 1.1
71 BuildRequires: OpenCL-devel
72 BuildRequires: OpenGL-GLU-devel
73 BuildRequires: SDL2-devel
74 %{?with_alsa:BuildRequires: alsa-lib-devel}
75 %{?with_arts:BuildRequires: artsc-devel}
76 BuildRequires: autoconf >= 2.62
77 BuildRequires: automake
79 %{?with_capi:BuildRequires: capi4k-utils-devel}
80 %{?with_cups:BuildRequires: cups-devel}
81 BuildRequires: dbus-devel
82 BuildRequires: flex >= 2.5.33
83 BuildRequires: fontconfig-devel
84 BuildRequires: freetype-devel >= 2.0.5
85 BuildRequires: gettext-devel
87 BuildRequires: gcc >= 6:4.4
89 BuildRequires: gettext-tools
90 BuildRequires: gnutls-devel
91 %{?with_gstreamer:BuildRequires: gstreamer-devel >= 1.0}
92 %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel >= 1.0}
93 # for icotool used in build
94 BuildRequires: icoutils >= 0.29.0
95 BuildRequires: lcms2-devel >= 2
96 BuildRequires: libcap-devel
97 BuildRequires: libglvnd-libEGL-devel
98 BuildRequires: libgphoto2-devel
99 BuildRequires: libpcap-devel
100 BuildRequires: libv4l-devel
101 %{?with_ldap:BuildRequires: openldap-devel}
102 BuildRequires: pkgconfig
103 BuildRequires: pulseaudio-devel
104 BuildRequires: samba-devel
105 %{?with_sane:BuildRequires: sane-backends-devel}
106 BuildRequires: xorg-lib-libX11-devel
107 BuildRequires: xorg-lib-libXcomposite-devel
108 BuildRequires: xorg-lib-libXcursor-devel
109 BuildRequires: xorg-lib-libXext-devel
110 BuildRequires: xorg-lib-libXi-devel
111 BuildRequires: xorg-lib-libXinerama-devel
112 BuildRequires: xorg-lib-libXrandr-devel
113 BuildRequires: xorg-lib-libXrender-devel
114 BuildRequires: xorg-lib-libXxf86vm-devel
115 BuildConflicts: crossmingw32-gcc
116 BuildConflicts: crossmingw64-gcc
117 BuildConflicts: lld-link
118 Requires: libfreetype.so.6%{libqual}
119 Requires: libpng16.so.16%{libqual}
120 Requires(post): /sbin/ldconfig
121 Suggests: binfmt-detector
122 Suggests: ca-certificates
124 Conflicts: ca-certificates < 20080809-4
125 # for printing needs lpr
126 Suggests: cups-clients
128 Suggests: xorg-app-xmessage
130 Suggests: samba-common >= 1:3.0.25
131 # link to wine/ntdll.dll.so, without any SONAME
132 Provides: libntdll.dll.so
133 Obsoletes: wine-doc-pdf
134 Obsoletes: wine-drv-arts
135 Obsoletes: wine-drv-jack
136 Obsoletes: wine-drv-nas
137 ExclusiveArch: %{ix86} %{x8664} arm
139 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
141 %define no_install_post_strip 1
142 %define _noautoprov elf\\\\(buildid\\\\)
144 %define _winedir %{_datadir}/%{name}
147 Wine is a program which allows running Microsoft Windows programs
148 (including DOS, Windows 3.x and Win32 executables) on Unix. It
149 consists of a program loader which loads and executes a Microsoft
150 Windows binary, and a library that implements Windows API calls using
151 their Unix or X11 equivalents. The library may also be used for
152 porting Win32 code into native Unix executables.
154 %description -l es.UTF-8
155 Ejecuta programas Windows en Linux.
157 %description -l pl.UTF-8
158 Wine jest programem dzięki któremu można uruchamiać programy napisane
159 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
160 loadera, który pozwala wczytywać i uruchamiać programy w formacie
161 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
162 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
163 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
165 %description -l pt_BR.UTF-8
166 O Wine é um programa que permite rodar programas MS-Windows no X11.
167 Ele consiste de um carregador de programa, que carrega e executa um
168 binário MS-Windows, e de uma biblioteca de emulação que traduz as
169 chamadas da API para as equivalentes Unix/X11.
172 Summary: Wine - header files
173 Summary(es.UTF-8): Biblioteca de desarrollo de wine
174 Summary(pl.UTF-8): Wine - pliki nagłowkowe
175 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
176 Group: Development/Libraries
177 Requires: %{name} = %{epoch}:%{version}-%{release}
182 %description devel -l es.UTF-8
183 Biblioteca de desarrollo de wine.
185 %description devel -l pl.UTF-8
186 Wine - pliki nagłówkowe.
188 %description devel -l pt_BR.UTF-8
189 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
193 Summary: Wine - programs
194 Summary(pl.UTF-8): Wine - programy
196 Requires: %{name} = %{epoch}:%{version}-%{release}
198 %description programs
201 %description programs -l pl.UTF-8
205 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
206 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
207 Group: Applications/Emulators
208 Requires: %{name} = %{epoch}:%{version}-%{release}
210 %description dll-capi
211 CAPI 2.0 (ISDN) implementation DLLs for Wine.
213 %description dll-capi -l pl.UTF-8
214 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine.
217 Summary: Direct3D implementation DLLs for Wine
218 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
219 Group: Applications/Emulators
220 Requires: %{name} = %{epoch}:%{version}-%{release}
224 Direct3D implementation DLLs for Wine (through OpenGL).
226 %description dll-d3d -l pl.UTF-8
227 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
230 Summary: OpenGL implementation DLLs for Wine
231 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
232 Group: Applications/Emulators
233 Requires: %{name} = %{epoch}:%{version}-%{release}
237 OpenGL implementation DLLs for Wine.
239 %description dll-gl -l pl.UTF-8
240 Biblioteki DLL z implementacją OpenGL dla Wine.
243 Summary: TWAIN implementation DLL for Wine
244 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
245 Group: Applications/Emulators
246 Requires: %{name} = %{epoch}:%{version}-%{release}
248 %description dll-twain
249 TWAIN implementation DLL for Wine (through SANE).
251 %description dll-twain -l pl.UTF-8
252 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
255 Summary: Win32 LDAP API DLL for Wine
256 Summary(pl.UTF-8): Biblioteka DLL z implementacją API Win32 LDAP dla Wine
257 Group: Applications/Emulators
258 Requires: %{name} = %{epoch}:%{version}-%{release}
260 %description dll-ldap
261 Lightweight Directory Access Protocol Library for Wine.
263 %description dll-ldap -l pl.UTF-8
264 Biblioteka LDAP (Lightweight Directory Access Protocol) dla Wine.
267 Summary: ALSA driver for WINE mm.dll implementation
268 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
269 Group: Applications/Emulators
270 Requires: %{name} = %{epoch}:%{version}-%{release}
272 %description drv-alsa
273 ALSA driver for WINE mm.dll (multimedia system) implementation.
275 %description drv-alsa -l pl.UTF-8
276 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
291 #workaround for icon extraction error.
292 icotool -x -o . dlls/user32/resources/oic_winlogo.ico
293 mv -f oic_winlogo_*32x32x32.png %{name}.png
294 rm -f oic_winlogo_*.png
302 --with-alsa%{!?with_alsa:=no} \
303 --with-capi%{!?with_capi:=no} \
305 --with-cups%{!?with_cups:=no} \
311 %{__with_without gstreamer} \
312 --with-ldap%{!?with_ldap:=no} \
313 --with%{!?with_netapi:out}-netapi \
321 --with%{!?with_sane:out}-sane \
338 rm -rf $RPM_BUILD_ROOT
339 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
341 DESTDIR=$RPM_BUILD_ROOT
343 install -p tools/sfnt2fon/sfnt2fon $RPM_BUILD_ROOT%{_bindir}
344 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
347 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
348 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
349 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
350 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
351 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
353 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
354 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
355 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
357 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
361 waveaudio=mciwave.drv
363 videodisc=mcipionr.drv
368 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
374 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
375 for p in $programs; do
376 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
377 echo "%attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/$p.exe" >> files.programs
378 echo "%{_mandir}/man1/$p.1*" >> files.programs
379 # grep -v "$p\.exe\.so$" files.so > files.so.
380 # mv -f files.so. files.so
383 for dir in $RPM_BUILD_ROOT%{_mandir}/*.UTF-8 ; do
384 mv "$dir" "${dir%.UTF-8}"
388 cp -p loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine64.1
389 for lang in de fr pl ; do
390 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
391 cp -p loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine64.1
394 cp -p loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine.1
395 for lang in de fr pl ; do
396 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
397 cp -p loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine.1
401 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
403 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
405 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
408 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
409 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
410 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
413 rm -rf $RPM_BUILD_ROOT
417 %update_desktop_database
419 %postun -p /sbin/ldconfig
421 %triggerpostun -- wine < 1:0.9.12-1.9
422 rm -f /var/lock/subsys/wine
423 if [ -x /sbin/chkconfig ]; then
424 /sbin/chkconfig --del wine
428 %defattr(644,root,root,755)
429 %doc README AUTHORS ANNOUNCE
430 %lang(de) %doc documentation/README.de
431 %lang(es) %doc documentation/README.es
432 %lang(fr) %doc documentation/README.fr
433 %lang(hu) %doc documentation/README.hu
434 %lang(it) %doc documentation/README.it
435 %lang(ko) %doc documentation/README.ko
436 %lang(nb) %doc documentation/README.no
437 %lang(pt) %doc documentation/README.pt
438 %lang(pt_BR) %doc documentation/README.pt_br
439 %lang(ru) %doc documentation/README.ru
440 %lang(sv) %doc documentation/README.sv
441 %lang(tr) %doc documentation/README.tr
442 %attr(755,root,root) %{_bindir}/msidb
443 %attr(755,root,root) %{_bindir}/msiexec
445 %attr(755,root,root) %{_bindir}/wine
447 %attr(755,root,root) %{_bindir}/wine64
449 %attr(755,root,root) %{_bindir}/wineboot
450 %attr(755,root,root) %{_bindir}/winedbg
451 %attr(755,root,root) %{_bindir}/winecfg
453 %attr(755,root,root) %{_bindir}/wine-preloader
455 %attr(755,root,root) %{_bindir}/wine64-preloader
457 %attr(755,root,root) %{_bindir}/wineserver
459 %dir %{_libdir}/wine/%{winelib}-unix
460 %attr(755,root,root) %{_libdir}/wine/%{winelib}-unix/*.so*
461 %dir %{_libdir}/wine/%{winelib}-windows
462 %{_libdir}/wine/%{winelib}-windows/*.acm
463 %{_libdir}/wine/%{winelib}-windows/*.ax
464 %{_libdir}/wine/%{winelib}-windows/*.com
465 %{_libdir}/wine/%{winelib}-windows/*.cpl
466 %{_libdir}/wine/%{winelib}-windows/*.dll
468 %{_libdir}/wine/%{winelib}-windows/*.dll16
470 %{_libdir}/wine/%{winelib}-windows/*.drv
472 %{_libdir}/wine/%{winelib}-windows/*.drv16
474 %{_libdir}/wine/%{winelib}-windows/*.ds
475 %{_libdir}/wine/%{winelib}-windows/*.exe
477 %{_libdir}/wine/%{winelib}-windows/*.exe16
478 %{_libdir}/wine/%{winelib}-windows/*.mod16
480 %{_libdir}/wine/%{winelib}-windows/*.msstyles
481 %{_libdir}/wine/%{winelib}-windows/*.ocx
482 %{_libdir}/wine/%{winelib}-windows/*.sys
483 %{_libdir}/wine/%{winelib}-windows/*.tlb
485 %{_libdir}/wine/%{winelib}-windows/*.vxd
488 %{_mandir}/man1/wine.1*
489 %lang(de) %{_mandir}/de/man1/wine.1*
490 %lang(fr) %{_mandir}/fr/man1/wine.1*
491 %lang(pl) %{_mandir}/pl/man1/wine.1*
493 %{_mandir}/man1/wine64.1*
494 %lang(de) %{_mandir}/de/man1/wine64.1*
495 %lang(fr) %{_mandir}/fr/man1/wine64.1*
496 %lang(pl) %{_mandir}/pl/man1/wine64.1*
498 %{_mandir}/man1/msiexec.1*
499 %{_mandir}/man1/wineboot.1*
501 %{_mandir}/man1/winecfg.1*
502 %{_mandir}/man1/winedbg.1*
503 %{_mandir}/man1/wineserver.1*
504 %lang(de) %{_mandir}/de/man1/wineserver.1*
505 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
507 %{_desktopdir}/wine.desktop
508 %{_desktopdir}/wine-uninstaller.desktop
509 %{_pixmapsdir}/%{name}.png
511 %files programs -f files.programs
512 %defattr(644,root,root,755)
515 %defattr(644,root,root,755)
516 %attr(755,root,root) %{_bindir}/sfnt2fon
517 %attr(755,root,root) %{_bindir}/function_grep.pl
518 %attr(755,root,root) %{_bindir}/widl
519 %attr(755,root,root) %{_bindir}/winebuild
520 %attr(755,root,root) %{_bindir}/winedump
521 %attr(755,root,root) %{_bindir}/wineg++
522 %attr(755,root,root) %{_bindir}/winegcc
523 %attr(755,root,root) %{_bindir}/winemaker
524 %attr(755,root,root) %{_bindir}/winecpp
525 %attr(755,root,root) %{_bindir}/wmc
526 %attr(755,root,root) %{_bindir}/wrc
527 # no shared variants, so not separated
528 %{_libdir}/wine/%{winelib}-unix/lib*.a
529 #%{_libdir}/wine/%{winelib}-windows/lib*.a
531 %{_mandir}/man1/widl.1*
532 %{_mandir}/man1/winebuild.1*
533 %{_mandir}/man1/winecpp.1*
534 %{_mandir}/man1/winedump.1*
535 %{_mandir}/man1/winegcc.1*
536 %{_mandir}/man1/wineg++.1*
537 %{_mandir}/man1/winemaker.1*
538 %lang(de) %{_mandir}/de/man1/winemaker.1*
539 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
540 %{_mandir}/man1/wmc.1*
541 %{_mandir}/man1/wrc.1*
546 %defattr(644,root,root,755)
547 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/capi2032.dll
548 %attr(755,root,root) %{_libdir}/wine/%{winelib}-unix/capi2032.so
552 %defattr(644,root,root,755)
553 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/d3d8.dll
554 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/d3d8thk.dll
555 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/d3d9.dll
556 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/d3d10*.dll
557 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/d3d11.dll
558 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/wined3d.dll
559 %attr(755,root,root) %{_libdir}/wine/%{winelib}-unix/wined3d.dll.so
562 %defattr(644,root,root,755)
563 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/glu32.dll
564 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/opengl32.dll
568 %defattr(644,root,root,755)
569 %attr(755,root,root) %{_libdir}/wine/%{winelib}-unix/sane.so
570 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/twain*.dll
572 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/twain*.dll16
578 %defattr(644,root,root,755)
579 %attr(755,root,root) %{_libdir}/wine/%{winelib}-unix/wldap*.so
580 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/wldap*.dll
585 %defattr(644,root,root,755)
586 %attr(755,root,root) %{_libdir}/wine/%{winelib}-unix/winealsa.drv.so
589 # additional dependencies in *.so not separated (yet?) from main package
590 # ddraw.dll.so,winex11.drv.so depend on X11 libs
591 # ole2disp.dll16.so,oleaut32.dll.so,typelib.dll16.so depend on libX11