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}
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.0/%{name}-%{version}.tar.xz
55 # Source0-md5: a148a02826d9bcaa0ba631389cc522f2
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 BuildConflicts: crossmingw32-gcc
70 BuildConflicts: crossmingw64-gcc
71 BuildRequires: Mesa-libOSMesa-devel
72 BuildRequires: OpenAL-devel >= 1.1
73 BuildRequires: OpenCL-devel
74 BuildRequires: OpenGL-GLU-devel
75 %{?with_alsa:BuildRequires: alsa-lib-devel}
76 %{?with_arts:BuildRequires: artsc-devel}
77 BuildRequires: autoconf >= 2.62
78 BuildRequires: automake
80 %{?with_capi:BuildRequires: capi4k-utils-devel}
82 %{?with_cups:BuildRequires: cups-devel}
83 BuildRequires: dbus-devel
84 BuildRequires: flex >= 2.5.33
85 BuildRequires: fontconfig-devel
86 BuildRequires: freetype-devel >= 2.0.5
87 BuildRequires: gettext-devel
89 BuildRequires: gcc >= 6:4.4
91 BuildRequires: gettext-tools
92 BuildRequires: gnutls-devel
93 %{?with_gstreamer:BuildRequires: gstreamer-devel >= 1.0}
94 %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel >= 1.0}
95 # for icotool used in build
96 BuildRequires: icoutils >= 0.29.0
97 BuildRequires: lcms2-devel >= 2
98 BuildRequires: libcap-devel
99 BuildRequires: libgphoto2-devel
100 BuildRequires: libpcap-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 Requires: libfreetype.so.6%{libqual}
116 Requires: libpng16.so.16%{libqual}
117 Requires(post): /sbin/ldconfig
118 Suggests: binfmt-detector
119 Suggests: ca-certificates
121 Conflicts: ca-certificates < 20080809-4
122 # for printing needs lpr
123 Suggests: cups-clients
125 Suggests: xorg-app-xmessage
127 Suggests: samba-common >= 1:3.0.25
128 # link to wine/ntdll.dll.so, without any SONAME
129 Provides: libntdll.dll.so
130 Obsoletes: wine-doc-pdf
131 Obsoletes: wine-drv-arts
132 Obsoletes: wine-drv-jack
133 Obsoletes: wine-drv-nas
134 ExclusiveArch: %{ix86} %{x8664} arm
136 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
138 %define no_install_post_strip 1
139 %define _noautoprov elf\\\\(buildid\\\\)
141 %define _winedir %{_datadir}/%{name}
144 Wine is a program which allows running Microsoft Windows programs
145 (including DOS, Windows 3.x and Win32 executables) on Unix. It
146 consists of a program loader which loads and executes a Microsoft
147 Windows binary, and a library that implements Windows API calls using
148 their Unix or X11 equivalents. The library may also be used for
149 porting Win32 code into native Unix executables.
151 %description -l es.UTF-8
152 Ejecuta programas Windows en Linux.
154 %description -l pl.UTF-8
155 Wine jest programem dzięki któremu można uruchamiać programy napisane
156 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
157 loadera, który pozwala wczytywać i uruchamiać programy w formacie
158 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
159 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
160 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
162 %description -l pt_BR.UTF-8
163 O Wine é um programa que permite rodar programas MS-Windows no X11.
164 Ele consiste de um carregador de programa, que carrega e executa um
165 binário MS-Windows, e de uma biblioteca de emulação que traduz as
166 chamadas da API para as equivalentes Unix/X11.
169 Summary: Wine - header files
170 Summary(es.UTF-8): Biblioteca de desarrollo de wine
171 Summary(pl.UTF-8): Wine - pliki nagłowkowe
172 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
173 Group: Development/Libraries
174 Requires: %{name} = %{epoch}:%{version}-%{release}
179 %description devel -l es.UTF-8
180 Biblioteca de desarrollo de wine.
182 %description devel -l pl.UTF-8
183 Wine - pliki nagłówkowe.
185 %description devel -l pt_BR.UTF-8
186 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
190 Summary: Wine - programs
191 Summary(pl.UTF-8): Wine - programy
193 Requires: %{name} = %{epoch}:%{version}-%{release}
195 %description programs
198 %description programs -l pl.UTF-8
202 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
203 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
204 Group: Applications/Emulators
205 Requires: %{name} = %{epoch}:%{version}-%{release}
207 %description dll-capi
208 CAPI 2.0 (ISDN) implementation DLLs for Wine.
210 %description dll-capi -l pl.UTF-8
211 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine.
214 Summary: Direct3D implementation DLLs for Wine
215 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
216 Group: Applications/Emulators
217 Requires: %{name} = %{epoch}:%{version}-%{release}
221 Direct3D implementation DLLs for Wine (through OpenGL).
223 %description dll-d3d -l pl.UTF-8
224 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
227 Summary: OpenGL implementation DLLs for Wine
228 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
229 Group: Applications/Emulators
230 Requires: %{name} = %{epoch}:%{version}-%{release}
234 OpenGL implementation DLLs for Wine.
236 %description dll-gl -l pl.UTF-8
237 Biblioteki DLL z implementacją OpenGL dla Wine.
240 Summary: TWAIN implementation DLL for Wine
241 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
242 Group: Applications/Emulators
243 Requires: %{name} = %{epoch}:%{version}-%{release}
245 %description dll-twain
246 TWAIN implementation DLL for Wine (through SANE).
248 %description dll-twain -l pl.UTF-8
249 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
252 Summary: Win32 LDAP API DLL for Wine
253 Summary(pl.UTF-8): Biblioteka DLL z implementacją API Win32 LDAP dla Wine
254 Group: Applications/Emulators
255 Requires: %{name} = %{epoch}:%{version}-%{release}
257 %description dll-ldap
258 Lightweight Directory Access Protocol Library for Wine.
260 %description dll-ldap -l pl.UTF-8
261 Biblioteka LDAP (Lightweight Directory Access Protocol) dla Wine.
264 Summary: ALSA driver for WINE mm.dll implementation
265 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
266 Group: Applications/Emulators
267 Requires: %{name} = %{epoch}:%{version}-%{release}
269 %description drv-alsa
270 ALSA driver for WINE mm.dll (multimedia system) implementation.
272 %description drv-alsa -l pl.UTF-8
273 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
288 #workaround for icon extraction error.
289 icotool -x -o . dlls/user32/resources/oic_winlogo.ico
290 mv -f oic_winlogo_*32x32x32.png %{name}.png
291 rm -f oic_winlogo_*.png
299 --with-alsa%{!?with_alsa:=no} \
300 --with-capi%{!?with_capi:=no} \
302 --with-cups%{!?with_cups:=no} \
308 %{__with_without gstreamer} \
309 --with-ldap%{!?with_ldap:=no} \
310 --with%{!?with_netapi:out}-netapi \
318 --with%{!?with_sane:out}-sane \
335 rm -rf $RPM_BUILD_ROOT
336 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
338 DESTDIR=$RPM_BUILD_ROOT
340 install -p tools/sfnt2fon/sfnt2fon $RPM_BUILD_ROOT%{_bindir}
341 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
344 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
345 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
346 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
347 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
348 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
350 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
351 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
352 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
354 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
358 waveaudio=mciwave.drv
360 videodisc=mcipionr.drv
365 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
370 cd $RPM_BUILD_ROOT%{_libdir}/wine
373 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)
376 echo "%attr(755,root,root) %{_libdir}/wine/$f" >> $dir/files.so
381 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
382 for p in $programs; do
383 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
384 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
385 echo "%{_mandir}/man1/$p.1*" >> files.programs
386 grep -v "$p\.exe\.so$" files.so > files.so.
387 mv -f files.so. files.so
390 for dir in $RPM_BUILD_ROOT%{_mandir}/*.UTF-8 ; do
391 mv "$dir" "${dir%.UTF-8}"
395 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine64.1
396 for lang in de fr pl ; do
397 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
398 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine64.1
401 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine.1
402 for lang in de fr pl ; do
403 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
404 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine.1
408 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
410 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
412 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
415 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
416 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
417 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
420 rm -rf $RPM_BUILD_ROOT
424 %update_desktop_database
426 %postun -p /sbin/ldconfig
428 %triggerpostun -- wine < 1:0.9.12-1.9
429 rm -f /var/lock/subsys/wine
430 if [ -x /sbin/chkconfig ]; then
431 /sbin/chkconfig --del wine
435 %defattr(644,root,root,755)
436 %doc README AUTHORS ANNOUNCE
437 %lang(de) %doc documentation/README.de
438 %lang(es) %doc documentation/README.es
439 %lang(fr) %doc documentation/README.fr
440 %lang(hu) %doc documentation/README.hu
441 %lang(it) %doc documentation/README.it
442 %lang(ko) %doc documentation/README.ko
443 %lang(nb) %doc documentation/README.no
444 %lang(pt) %doc documentation/README.pt
445 %lang(pt_BR) %doc documentation/README.pt_br
446 %lang(ru) %doc documentation/README.ru
447 %lang(sv) %doc documentation/README.sv
448 %lang(tr) %doc documentation/README.tr
449 %attr(755,root,root) %{_bindir}/msiexec
451 %attr(755,root,root) %{_bindir}/wine
453 %attr(755,root,root) %{_bindir}/wine64
455 %attr(755,root,root) %{_bindir}/wineboot
456 %attr(755,root,root) %{_bindir}/winedbg
457 %attr(755,root,root) %{_bindir}/winecfg
459 %attr(755,root,root) %{_bindir}/wine-preloader
461 %attr(755,root,root) %{_bindir}/wine64-preloader
463 %attr(755,root,root) %{_bindir}/wineserver
464 %attr(755,root,root) %{_libdir}/*.so*
466 %dir %{_libdir}/wine/fakedlls
467 %{_libdir}/wine/fakedlls/*.acm
468 %{_libdir}/wine/fakedlls/*.cpl
469 %{_libdir}/wine/fakedlls/*.dll
471 %{_libdir}/wine/fakedlls/*.dll16
473 %{_libdir}/wine/fakedlls/*.drv
475 %{_libdir}/wine/fakedlls/*.drv16
477 %{_libdir}/wine/fakedlls/*.ds
478 %{_libdir}/wine/fakedlls/*.exe
480 %{_libdir}/wine/fakedlls/*.exe16
481 %{_libdir}/wine/fakedlls/*.mod16
483 %{_libdir}/wine/fakedlls/*.ocx
484 %{_libdir}/wine/fakedlls/*.sys
485 %{_libdir}/wine/fakedlls/*.tlb
487 %{_libdir}/wine/fakedlls/*.vxd
490 %{_mandir}/man1/wine.1*
491 %lang(de) %{_mandir}/de/man1/wine.1*
492 %lang(fr) %{_mandir}/fr/man1/wine.1*
493 %lang(pl) %{_mandir}/pl/man1/wine.1*
495 %{_mandir}/man1/wine64.1*
496 %lang(de) %{_mandir}/de/man1/wine64.1*
497 %lang(fr) %{_mandir}/fr/man1/wine64.1*
498 %lang(pl) %{_mandir}/pl/man1/wine64.1*
500 %{_mandir}/man1/msiexec.1*
501 %{_mandir}/man1/wineboot.1*
502 %{_mandir}/man1/winecfg.1*
503 %{_mandir}/man1/winedbg.1*
504 %{_mandir}/man1/wineserver.1*
505 %lang(de) %{_mandir}/de/man1/wineserver.1*
506 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
508 %{_desktopdir}/wine.desktop
509 %{_desktopdir}/wine-uninstaller.desktop
510 %{_pixmapsdir}/%{name}.png
512 %files programs -f files.programs
513 %defattr(644,root,root,755)
516 %defattr(644,root,root,755)
517 %attr(755,root,root) %{_bindir}/sfnt2fon
518 %attr(755,root,root) %{_bindir}/function_grep.pl
519 %attr(755,root,root) %{_bindir}/widl
520 %attr(755,root,root) %{_bindir}/winebuild
521 %attr(755,root,root) %{_bindir}/winedump
522 %attr(755,root,root) %{_bindir}/wineg++
523 %attr(755,root,root) %{_bindir}/winegcc
524 %attr(755,root,root) %{_bindir}/winemaker
525 %attr(755,root,root) %{_bindir}/winecpp
526 %attr(755,root,root) %{_bindir}/wmc
527 %attr(755,root,root) %{_bindir}/wrc
528 %{_libdir}/wine/lib*.def
529 # no shared variants, so not separated
530 %{_libdir}/wine/libadsiid.a
531 %{_libdir}/wine/libdinput.a
532 %{_libdir}/wine/libdinput8.a
533 %{_libdir}/wine/libdmoguids.a
534 %{_libdir}/wine/libdx*.a
535 %{_libdir}/wine/libmfuuid.a
536 %{_libdir}/wine/libstrmbase.a
537 %{_libdir}/wine/libstrmiids.a
538 %{_libdir}/wine/libuuid.a
539 %{_libdir}/wine/libwinecrt0.a
540 %{_libdir}/wine/libwmcodecdspuuid.a
542 %{_mandir}/man1/widl.1*
543 %{_mandir}/man1/winebuild.1*
544 %{_mandir}/man1/winecpp.1*
545 %{_mandir}/man1/winedump.1*
546 %{_mandir}/man1/winegcc.1*
547 %{_mandir}/man1/wineg++.1*
548 %{_mandir}/man1/winemaker.1*
549 %lang(de) %{_mandir}/de/man1/winemaker.1*
550 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
551 %{_mandir}/man1/wmc.1*
552 %{_mandir}/man1/wrc.1*
556 %defattr(644,root,root,755)
557 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
560 %defattr(644,root,root,755)
561 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
562 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
563 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
566 %defattr(644,root,root,755)
567 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
568 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
572 %defattr(644,root,root,755)
573 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
574 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
579 %defattr(644,root,root,755)
580 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
585 %defattr(644,root,root,755)
586 %attr(755,root,root) %{_libdir}/wine/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