3 # libvkd3d https://wiki.winehq.org/Vkd3d
6 %bcond_without alsa # don't build ALSA mm driver
7 %bcond_without 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}
37 %define gecko_ver 2.47.2
38 Summary: Program that lets you launch Win applications
39 Summary(es.UTF-8): Ejecuta programas Windows en Linux
40 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
41 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
47 Group: Applications/Emulators
48 Source0: https://dl.winehq.org/wine/source/7.0/%{name}-%{version}.tar.xz
49 # Source0-md5: a148a02826d9bcaa0ba631389cc522f2
50 Source1: https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}-gecko-%{gecko_ver}-x86.msi
51 # Source1-md5: e0a26e37397961b2c7f624575590ef66
52 Source2: https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}-gecko-%{gecko_ver}-x86_64.msi
53 # Source2-md5: ff7168b08fa901516fbaa8a66aa3cee6
54 Source3: %{name}-uninstaller.desktop
55 Patch0: %{name}-gphoto2_bool.patch
56 Patch1: %{name}-makedep.patch
57 Patch2: %{name}-ncurses.patch
58 Patch4: %{name}-disable-valgrind.patch
59 Patch5: %{name}-ca_certificates.patch
61 Patch7: %{name}-wine64_man.patch
62 URL: http://www.winehq.org/
63 BuildRequires: Mesa-libOSMesa-devel
64 BuildRequires: OpenAL-devel >= 1.1
65 BuildRequires: OpenCL-devel
66 BuildRequires: OpenGL-GLU-devel
67 %{?with_alsa:BuildRequires: alsa-lib-devel}
68 %{?with_arts:BuildRequires: artsc-devel}
69 BuildRequires: autoconf >= 2.62
70 BuildRequires: automake
72 %{?with_capi:BuildRequires: capi4k-utils-devel}
73 %{?with_cups:BuildRequires: cups-devel}
74 BuildRequires: dbus-devel
75 BuildRequires: flex >= 2.5.33
76 BuildRequires: fontconfig-devel
77 BuildRequires: freetype-devel >= 2.0.5
78 BuildRequires: gettext-devel
80 BuildRequires: gcc >= 6:4.4
82 BuildRequires: gettext-tools
83 BuildRequires: gnutls-devel
84 %{?with_gstreamer:BuildRequires: gstreamer-devel >= 1.0}
85 %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel >= 1.0}
86 # for icotool used in build
87 BuildRequires: icoutils >= 0.29.0
88 BuildRequires: lcms2-devel >= 2
89 BuildRequires: libcap-devel
90 BuildRequires: libgphoto2-devel
91 BuildRequires: libpcap-devel
92 %{?with_ldap:BuildRequires: openldap-devel}
93 BuildRequires: pkgconfig
94 BuildRequires: pulseaudio-devel
95 BuildRequires: samba-devel
96 %{?with_sane:BuildRequires: sane-backends-devel}
97 BuildRequires: xorg-lib-libX11-devel
98 BuildRequires: xorg-lib-libXcomposite-devel
99 BuildRequires: xorg-lib-libXcursor-devel
100 BuildRequires: xorg-lib-libXext-devel
101 BuildRequires: xorg-lib-libXi-devel
102 BuildRequires: xorg-lib-libXinerama-devel
103 BuildRequires: xorg-lib-libXrandr-devel
104 BuildRequires: xorg-lib-libXrender-devel
105 BuildRequires: xorg-lib-libXxf86vm-devel
106 Requires: libfreetype.so.6%{libqual}
107 Requires: libpng16.so.16%{libqual}
108 Requires(post): /sbin/ldconfig
109 Suggests: binfmt-detector
110 Suggests: ca-certificates
112 Conflicts: ca-certificates < 20080809-4
113 # for printing needs lpr
114 Suggests: cups-clients
116 Suggests: xorg-app-xmessage
118 Suggests: samba-common >= 1:3.0.25
119 # link to wine/ntdll.dll.so, without any SONAME
120 Provides: libntdll.dll.so
121 Obsoletes: wine-doc-pdf
122 Obsoletes: wine-drv-arts
123 Obsoletes: wine-drv-jack
124 Obsoletes: wine-drv-nas
125 ExclusiveArch: %{ix86} %{x8664} arm
127 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
129 %define no_install_post_strip 1
130 %define _noautoprov elf\\\\(buildid\\\\)
132 %define _winedir %{_datadir}/%{name}
135 Wine is a program which allows running Microsoft Windows programs
136 (including DOS, Windows 3.x and Win32 executables) on Unix. It
137 consists of a program loader which loads and executes a Microsoft
138 Windows binary, and a library that implements Windows API calls using
139 their Unix or X11 equivalents. The library may also be used for
140 porting Win32 code into native Unix executables.
142 %description -l es.UTF-8
143 Ejecuta programas Windows en Linux.
145 %description -l pl.UTF-8
146 Wine jest programem dzięki któremu można uruchamiać programy napisane
147 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
148 loadera, który pozwala wczytywać i uruchamiać programy w formacie
149 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
150 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
151 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
153 %description -l pt_BR.UTF-8
154 O Wine é um programa que permite rodar programas MS-Windows no X11.
155 Ele consiste de um carregador de programa, que carrega e executa um
156 binário MS-Windows, e de uma biblioteca de emulação que traduz as
157 chamadas da API para as equivalentes Unix/X11.
160 Summary: Wine - header files
161 Summary(es.UTF-8): Biblioteca de desarrollo de wine
162 Summary(pl.UTF-8): Wine - pliki nagłowkowe
163 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
164 Group: Development/Libraries
165 Requires: %{name} = %{epoch}:%{version}-%{release}
170 %description devel -l es.UTF-8
171 Biblioteca de desarrollo de wine.
173 %description devel -l pl.UTF-8
174 Wine - pliki nagłówkowe.
176 %description devel -l pt_BR.UTF-8
177 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
181 Summary: Wine - programs
182 Summary(pl.UTF-8): Wine - programy
184 Requires: %{name} = %{epoch}:%{version}-%{release}
186 %description programs
189 %description programs -l pl.UTF-8
193 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
194 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
195 Group: Applications/Emulators
196 Requires: %{name} = %{epoch}:%{version}-%{release}
198 %description dll-capi
199 CAPI 2.0 (ISDN) implementation DLLs for Wine.
201 %description dll-capi -l pl.UTF-8
202 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine.
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 Summary(pl.UTF-8): Biblioteka DLL z implementacją API Win32 LDAP dla Wine
245 Group: Applications/Emulators
246 Requires: %{name} = %{epoch}:%{version}-%{release}
248 %description dll-ldap
249 Lightweight Directory Access Protocol Library for Wine.
251 %description dll-ldap -l pl.UTF-8
252 Biblioteka LDAP (Lightweight Directory Access Protocol) dla Wine.
255 Summary: ALSA driver for WINE mm.dll implementation
256 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
257 Group: Applications/Emulators
258 Requires: %{name} = %{epoch}:%{version}-%{release}
260 %description drv-alsa
261 ALSA driver for WINE mm.dll (multimedia system) implementation.
263 %description drv-alsa -l pl.UTF-8
264 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
280 #workaround for icon extraction error.
281 icotool -x -o . dlls/user32/resources/oic_winlogo.ico
282 mv -f oic_winlogo_*32x32x32.png %{name}.png
283 rm -f oic_winlogo_*.png
291 --with-alsa%{!?with_alsa:=no} \
292 --with-capi%{!?with_capi:=no} \
294 --with-cups%{!?with_cups:=no} \
300 %{__with_without gstreamer} \
301 --with-ldap%{!?with_ldap:=no} \
302 --with%{!?with_netapi:out}-netapi \
310 --with%{!?with_sane:out}-sane \
327 rm -rf $RPM_BUILD_ROOT
328 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
330 DESTDIR=$RPM_BUILD_ROOT
332 install -p tools/sfnt2fon/sfnt2fon $RPM_BUILD_ROOT%{_bindir}
333 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
336 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
337 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
338 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
339 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
340 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
342 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
343 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
344 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
346 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
350 waveaudio=mciwave.drv
352 videodisc=mcipionr.drv
357 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
362 cd $RPM_BUILD_ROOT%{_libdir}/wine
365 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)
368 echo "%attr(755,root,root) %{_libdir}/wine/$f" >> $dir/files.so
373 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
374 for p in $programs; do
375 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
376 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
377 echo "%{_mandir}/man1/$p.1*" >> files.programs
378 grep -v "$p\.exe\.so$" files.so > files.so.
379 mv -f files.so. files.so
382 for dir in $RPM_BUILD_ROOT%{_mandir}/*.UTF-8 ; do
383 mv "$dir" "${dir%.UTF-8}"
387 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine64.1
388 for lang in de fr pl ; do
389 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
390 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine64.1
393 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine.1
394 for lang in de fr pl ; do
395 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
396 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine.1
400 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
402 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
404 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
407 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
408 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
409 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
412 rm -rf $RPM_BUILD_ROOT
416 %update_desktop_database
418 %postun -p /sbin/ldconfig
420 %triggerpostun -- wine < 1:0.9.12-1.9
421 rm -f /var/lock/subsys/wine
422 if [ -x /sbin/chkconfig ]; then
423 /sbin/chkconfig --del wine
427 %defattr(644,root,root,755)
428 %doc README AUTHORS ANNOUNCE
429 %lang(de) %doc documentation/README.de
430 %lang(es) %doc documentation/README.es
431 %lang(fr) %doc documentation/README.fr
432 %lang(hu) %doc documentation/README.hu
433 %lang(it) %doc documentation/README.it
434 %lang(ko) %doc documentation/README.ko
435 %lang(nb) %doc documentation/README.no
436 %lang(pt) %doc documentation/README.pt
437 %lang(pt_BR) %doc documentation/README.pt_br
438 %lang(ru) %doc documentation/README.ru
439 %lang(sv) %doc documentation/README.sv
440 %lang(tr) %doc documentation/README.tr
441 %attr(755,root,root) %{_bindir}/msiexec
443 %attr(755,root,root) %{_bindir}/wine
445 %attr(755,root,root) %{_bindir}/wine64
447 %attr(755,root,root) %{_bindir}/wineboot
448 %attr(755,root,root) %{_bindir}/winedbg
449 %attr(755,root,root) %{_bindir}/winecfg
451 %attr(755,root,root) %{_bindir}/wine-preloader
453 %attr(755,root,root) %{_bindir}/wine64-preloader
455 %attr(755,root,root) %{_bindir}/wineserver
456 %attr(755,root,root) %{_libdir}/*.so*
458 %dir %{_libdir}/wine/fakedlls
459 %{_libdir}/wine/fakedlls/*.acm
460 %{_libdir}/wine/fakedlls/*.cpl
461 %{_libdir}/wine/fakedlls/*.dll
463 %{_libdir}/wine/fakedlls/*.dll16
465 %{_libdir}/wine/fakedlls/*.drv
467 %{_libdir}/wine/fakedlls/*.drv16
469 %{_libdir}/wine/fakedlls/*.ds
470 %{_libdir}/wine/fakedlls/*.exe
472 %{_libdir}/wine/fakedlls/*.exe16
473 %{_libdir}/wine/fakedlls/*.mod16
475 %{_libdir}/wine/fakedlls/*.ocx
476 %{_libdir}/wine/fakedlls/*.sys
477 %{_libdir}/wine/fakedlls/*.tlb
479 %{_libdir}/wine/fakedlls/*.vxd
482 %{_mandir}/man1/wine.1*
483 %lang(de) %{_mandir}/de/man1/wine.1*
484 %lang(fr) %{_mandir}/fr/man1/wine.1*
485 %lang(pl) %{_mandir}/pl/man1/wine.1*
487 %{_mandir}/man1/wine64.1*
488 %lang(de) %{_mandir}/de/man1/wine64.1*
489 %lang(fr) %{_mandir}/fr/man1/wine64.1*
490 %lang(pl) %{_mandir}/pl/man1/wine64.1*
492 %{_mandir}/man1/msiexec.1*
493 %{_mandir}/man1/wineboot.1*
494 %{_mandir}/man1/winecfg.1*
495 %{_mandir}/man1/winedbg.1*
496 %{_mandir}/man1/wineserver.1*
497 %lang(de) %{_mandir}/de/man1/wineserver.1*
498 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
500 %{_desktopdir}/wine.desktop
501 %{_desktopdir}/wine-uninstaller.desktop
502 %{_pixmapsdir}/%{name}.png
504 %files programs -f files.programs
505 %defattr(644,root,root,755)
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_bindir}/sfnt2fon
510 %attr(755,root,root) %{_bindir}/function_grep.pl
511 %attr(755,root,root) %{_bindir}/widl
512 %attr(755,root,root) %{_bindir}/winebuild
513 %attr(755,root,root) %{_bindir}/winedump
514 %attr(755,root,root) %{_bindir}/wineg++
515 %attr(755,root,root) %{_bindir}/winegcc
516 %attr(755,root,root) %{_bindir}/winemaker
517 %attr(755,root,root) %{_bindir}/winecpp
518 %attr(755,root,root) %{_bindir}/wmc
519 %attr(755,root,root) %{_bindir}/wrc
520 %{_libdir}/wine/lib*.def
521 # no shared variants, so not separated
522 %{_libdir}/wine/libadsiid.a
523 %{_libdir}/wine/libdinput.a
524 %{_libdir}/wine/libdinput8.a
525 %{_libdir}/wine/libdmoguids.a
526 %{_libdir}/wine/libdx*.a
527 %{_libdir}/wine/libmfuuid.a
528 %{_libdir}/wine/libstrmbase.a
529 %{_libdir}/wine/libstrmiids.a
530 %{_libdir}/wine/libuuid.a
531 %{_libdir}/wine/libwinecrt0.a
532 %{_libdir}/wine/libwmcodecdspuuid.a
534 %{_mandir}/man1/widl.1*
535 %{_mandir}/man1/winebuild.1*
536 %{_mandir}/man1/winecpp.1*
537 %{_mandir}/man1/winedump.1*
538 %{_mandir}/man1/winegcc.1*
539 %{_mandir}/man1/wineg++.1*
540 %{_mandir}/man1/winemaker.1*
541 %lang(de) %{_mandir}/de/man1/winemaker.1*
542 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
543 %{_mandir}/man1/wmc.1*
544 %{_mandir}/man1/wrc.1*
548 %defattr(644,root,root,755)
549 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
552 %defattr(644,root,root,755)
553 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
554 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
555 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
558 %defattr(644,root,root,755)
559 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
560 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
564 %defattr(644,root,root,755)
565 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
566 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
571 %defattr(644,root,root,755)
572 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
577 %defattr(644,root,root,755)
578 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
581 # additional dependencies in *.so not separated (yet?) from main package
582 # ddraw.dll.so,winex11.drv.so depend on X11 libs
583 # ole2disp.dll16.so,oleaut32.dll.so,typelib.dll16.so depend on libX11