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.
279 #workaround for icon extraction error.
280 icotool -x -o . dlls/user32/resources/oic_winlogo.ico
281 mv -f oic_winlogo_*32x32x32.png %{name}.png
282 rm -f oic_winlogo_*.png
290 --with-alsa%{!?with_alsa:=no} \
291 --with-capi%{!?with_capi:=no} \
293 --with-cups%{!?with_cups:=no} \
299 %{__with_without gstreamer} \
300 --with-ldap%{!?with_ldap:=no} \
301 --with%{!?with_netapi:out}-netapi \
309 --with%{!?with_sane:out}-sane \
326 rm -rf $RPM_BUILD_ROOT
327 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
329 DESTDIR=$RPM_BUILD_ROOT
331 install -p tools/sfnt2fon/sfnt2fon $RPM_BUILD_ROOT%{_bindir}
332 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
335 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
336 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
337 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
338 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
339 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
341 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
342 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
343 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
345 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
349 waveaudio=mciwave.drv
351 videodisc=mcipionr.drv
356 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
361 cd $RPM_BUILD_ROOT%{_libdir}/wine
364 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)
367 echo "%attr(755,root,root) %{_libdir}/wine/$f" >> $dir/files.so
372 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
373 for p in $programs; do
374 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
375 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
376 echo "%{_mandir}/man1/$p.1*" >> files.programs
377 grep -v "$p\.exe\.so$" files.so > files.so.
378 mv -f files.so. files.so
381 for dir in $RPM_BUILD_ROOT%{_mandir}/*.UTF-8 ; do
382 mv "$dir" "${dir%.UTF-8}"
386 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine64.1
387 for lang in de fr pl ; do
388 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
389 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine64.1
392 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine.1
393 for lang in de fr pl ; do
394 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
395 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine.1
399 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
401 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
403 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
406 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
407 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
408 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
411 rm -rf $RPM_BUILD_ROOT
415 %update_desktop_database
417 %postun -p /sbin/ldconfig
419 %triggerpostun -- wine < 1:0.9.12-1.9
420 rm -f /var/lock/subsys/wine
421 if [ -x /sbin/chkconfig ]; then
422 /sbin/chkconfig --del wine
426 %defattr(644,root,root,755)
427 %doc README AUTHORS ANNOUNCE
428 %lang(de) %doc documentation/README.de
429 %lang(es) %doc documentation/README.es
430 %lang(fr) %doc documentation/README.fr
431 %lang(hu) %doc documentation/README.hu
432 %lang(it) %doc documentation/README.it
433 %lang(ko) %doc documentation/README.ko
434 %lang(nb) %doc documentation/README.no
435 %lang(pt) %doc documentation/README.pt
436 %lang(pt_BR) %doc documentation/README.pt_br
437 %lang(ru) %doc documentation/README.ru
438 %lang(sv) %doc documentation/README.sv
439 %lang(tr) %doc documentation/README.tr
440 %attr(755,root,root) %{_bindir}/msiexec
442 %attr(755,root,root) %{_bindir}/wine
444 %attr(755,root,root) %{_bindir}/wine64
446 %attr(755,root,root) %{_bindir}/wineboot
447 %attr(755,root,root) %{_bindir}/winedbg
448 %attr(755,root,root) %{_bindir}/winecfg
450 %attr(755,root,root) %{_bindir}/wine-preloader
452 %attr(755,root,root) %{_bindir}/wine64-preloader
454 %attr(755,root,root) %{_bindir}/wineserver
455 %attr(755,root,root) %{_libdir}/*.so*
457 %dir %{_libdir}/wine/fakedlls
458 %{_libdir}/wine/fakedlls/*.acm
459 %{_libdir}/wine/fakedlls/*.cpl
460 %{_libdir}/wine/fakedlls/*.dll
462 %{_libdir}/wine/fakedlls/*.dll16
464 %{_libdir}/wine/fakedlls/*.drv
466 %{_libdir}/wine/fakedlls/*.drv16
468 %{_libdir}/wine/fakedlls/*.ds
469 %{_libdir}/wine/fakedlls/*.exe
471 %{_libdir}/wine/fakedlls/*.exe16
472 %{_libdir}/wine/fakedlls/*.mod16
474 %{_libdir}/wine/fakedlls/*.ocx
475 %{_libdir}/wine/fakedlls/*.sys
476 %{_libdir}/wine/fakedlls/*.tlb
478 %{_libdir}/wine/fakedlls/*.vxd
481 %{_mandir}/man1/wine.1*
482 %lang(de) %{_mandir}/de/man1/wine.1*
483 %lang(fr) %{_mandir}/fr/man1/wine.1*
484 %lang(pl) %{_mandir}/pl/man1/wine.1*
486 %{_mandir}/man1/wine64.1*
487 %lang(de) %{_mandir}/de/man1/wine64.1*
488 %lang(fr) %{_mandir}/fr/man1/wine64.1*
489 %lang(pl) %{_mandir}/pl/man1/wine64.1*
491 %{_mandir}/man1/msiexec.1*
492 %{_mandir}/man1/wineboot.1*
493 %{_mandir}/man1/winecfg.1*
494 %{_mandir}/man1/winedbg.1*
495 %{_mandir}/man1/wineserver.1*
496 %lang(de) %{_mandir}/de/man1/wineserver.1*
497 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
499 %{_desktopdir}/wine.desktop
500 %{_desktopdir}/wine-uninstaller.desktop
501 %{_pixmapsdir}/%{name}.png
503 %files programs -f files.programs
504 %defattr(644,root,root,755)
507 %defattr(644,root,root,755)
508 %attr(755,root,root) %{_bindir}/sfnt2fon
509 %attr(755,root,root) %{_bindir}/function_grep.pl
510 %attr(755,root,root) %{_bindir}/widl
511 %attr(755,root,root) %{_bindir}/winebuild
512 %attr(755,root,root) %{_bindir}/winedump
513 %attr(755,root,root) %{_bindir}/wineg++
514 %attr(755,root,root) %{_bindir}/winegcc
515 %attr(755,root,root) %{_bindir}/winemaker
516 %attr(755,root,root) %{_bindir}/winecpp
517 %attr(755,root,root) %{_bindir}/wmc
518 %attr(755,root,root) %{_bindir}/wrc
519 %{_libdir}/wine/lib*.def
520 # no shared variants, so not separated
521 %{_libdir}/wine/libadsiid.a
522 %{_libdir}/wine/libdinput.a
523 %{_libdir}/wine/libdinput8.a
524 %{_libdir}/wine/libdmoguids.a
525 %{_libdir}/wine/libdx*.a
526 %{_libdir}/wine/libmfuuid.a
527 %{_libdir}/wine/libstrmbase.a
528 %{_libdir}/wine/libstrmiids.a
529 %{_libdir}/wine/libuuid.a
530 %{_libdir}/wine/libwinecrt0.a
531 %{_libdir}/wine/libwmcodecdspuuid.a
533 %{_mandir}/man1/widl.1*
534 %{_mandir}/man1/winebuild.1*
535 %{_mandir}/man1/winecpp.1*
536 %{_mandir}/man1/winedump.1*
537 %{_mandir}/man1/winegcc.1*
538 %{_mandir}/man1/wineg++.1*
539 %{_mandir}/man1/winemaker.1*
540 %lang(de) %{_mandir}/de/man1/winemaker.1*
541 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
542 %{_mandir}/man1/wmc.1*
543 %{_mandir}/man1/wrc.1*
547 %defattr(644,root,root,755)
548 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
551 %defattr(644,root,root,755)
552 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
553 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
554 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
557 %defattr(644,root,root,755)
558 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
559 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
563 %defattr(644,root,root,755)
564 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
565 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
570 %defattr(644,root,root,755)
571 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
576 %defattr(644,root,root,755)
577 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
580 # additional dependencies in *.so not separated (yet?) from main package
581 # ddraw.dll.so,winex11.drv.so depend on X11 libs
582 # ole2disp.dll16.so,oleaut32.dll.so,typelib.dll16.so depend on libX11