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
50 Group: Applications/Emulators
51 Source0: https://dl.winehq.org/wine/source/4.0/%{name}-%{version}.tar.xz
52 # Source0-md5: 411cbb15606e2f7eb5d5eca3bca10ce2
53 Source1: https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}_gecko-%{gecko_ver}-x86.msi
54 # Source1-md5: 5ebc4ec71c92b3db3d84b334a1db385d
55 Source2: https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}_gecko-%{gecko_ver}-x86_64.msi
56 # Source2-md5: d93ac0d2e6aceafe9113a9918916df45
57 Source3: %{name}-uninstaller.desktop
58 Patch0: %{name}-gphoto2_bool.patch
59 Patch1: %{name}-makedep.patch
60 Patch2: %{name}-ncurses.patch
61 Patch4: %{name}-disable-valgrind.patch
62 Patch5: %{name}-ca_certificates.patch
64 Patch7: %{name}-wine64_man.patch
65 URL: http://www.winehq.org/
66 BuildRequires: Mesa-libOSMesa-devel
67 BuildRequires: OpenAL-devel >= 1.1
68 BuildRequires: OpenCL-devel
69 BuildRequires: OpenGL-GLU-devel
70 %{?with_alsa:BuildRequires: alsa-lib-devel}
71 %{?with_arts:BuildRequires: artsc-devel}
72 BuildRequires: autoconf >= 2.62
73 BuildRequires: automake
75 %{?with_capi:BuildRequires: capi4k-utils-devel}
76 %{?with_cups:BuildRequires: cups-devel}
77 BuildRequires: dbus-devel
78 BuildRequires: flex >= 2.5.33
79 BuildRequires: fontconfig-devel
80 BuildRequires: freetype-devel >= 2.0.5
81 BuildRequires: gettext-devel
83 BuildRequires: gcc >= 6:4.4
85 BuildRequires: gettext-tools
86 BuildRequires: gnutls-devel
87 %{?with_gstreamer:BuildRequires: gstreamer-devel >= 1.0}
88 %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel >= 1.0}
89 %{?with_hal:BuildRequires: hal-devel}
90 # for icotool used in build
91 BuildRequires: icoutils >= 0.29.0
92 BuildRequires: lcms2-devel >= 2
93 BuildRequires: libcap-devel
94 BuildRequires: libgphoto2-devel
95 BuildRequires: libgsm-devel
96 BuildRequires: libjpeg-devel
97 BuildRequires: libmpg123-devel >= 1.5.0
98 BuildRequires: libpcap-devel
99 BuildRequires: libpng-devel >= 1.5
100 BuildRequires: libtiff-devel
101 BuildRequires: libv4l-devel
102 BuildRequires: libxml2-devel >= 2.0
103 BuildRequires: libxslt-devel
104 BuildRequires: ncurses-devel
105 %{?with_ldap:BuildRequires: openldap-devel}
106 BuildRequires: pkgconfig
107 BuildRequires: pulseaudio-devel
108 BuildRequires: samba-devel
109 %{?with_sane:BuildRequires: sane-backends-devel}
110 BuildRequires: xorg-lib-libX11-devel
111 BuildRequires: xorg-lib-libXcomposite-devel
112 BuildRequires: xorg-lib-libXcursor-devel
113 BuildRequires: xorg-lib-libXext-devel
114 BuildRequires: xorg-lib-libXi-devel
115 BuildRequires: xorg-lib-libXinerama-devel
116 BuildRequires: xorg-lib-libXrandr-devel
117 BuildRequires: xorg-lib-libXrender-devel
118 BuildRequires: xorg-lib-libXxf86vm-devel
119 BuildRequires: zlib-devel
120 Requires: libfreetype.so.6%{libqual}
121 Requires: libpng16.so.16%{libqual}
122 Requires(post): /sbin/ldconfig
123 Suggests: binfmt-detector
124 Suggests: ca-certificates
126 Conflicts: ca-certificates < 20080809-4
127 # for printing needs lpr
128 Suggests: cups-clients
130 Suggests: xorg-app-xmessage
132 Suggests: samba-common >= 1:3.0.25
133 # link to wine/ntdll.dll.so, without any SONAME
134 Provides: libntdll.dll.so
135 Obsoletes: wine-doc-pdf
136 Obsoletes: wine-drv-arts
137 Obsoletes: wine-drv-jack
138 Obsoletes: wine-drv-nas
139 ExclusiveArch: %{ix86} %{x8664} arm
141 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
143 %define no_install_post_strip 1
144 %define _noautoprov elf\\\\(buildid\\\\)
146 %define _winedir %{_datadir}/%{name}
149 Wine is a program which allows running Microsoft Windows programs
150 (including DOS, Windows 3.x and Win32 executables) on Unix. It
151 consists of a program loader which loads and executes a Microsoft
152 Windows binary, and a library that implements Windows API calls using
153 their Unix or X11 equivalents. The library may also be used for
154 porting Win32 code into native Unix executables.
156 %description -l es.UTF-8
157 Ejecuta programas Windows en Linux.
159 %description -l pl.UTF-8
160 Wine jest programem dzięki któremu można uruchamiać programy napisane
161 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
162 loadera, który pozwala wczytywać i uruchamiać programy w formacie
163 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
164 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
165 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
167 %description -l pt_BR.UTF-8
168 O Wine é um programa que permite rodar programas MS-Windows no X11.
169 Ele consiste de um carregador de programa, que carrega e executa um
170 binário MS-Windows, e de uma biblioteca de emulação que traduz as
171 chamadas da API para as equivalentes Unix/X11.
174 Summary: Wine - header files
175 Summary(es.UTF-8): Biblioteca de desarrollo de wine
176 Summary(pl.UTF-8): Wine - pliki nagłowkowe
177 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
178 Group: Development/Libraries
179 Requires: %{name} = %{epoch}:%{version}-%{release}
184 %description devel -l es.UTF-8
185 Biblioteca de desarrollo de wine.
187 %description devel -l pl.UTF-8
188 Wine - pliki nagłówkowe.
190 %description devel -l pt_BR.UTF-8
191 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
195 Summary: Wine - programs
196 Summary(pl.UTF-8): Wine - programy
198 Requires: %{name} = %{epoch}:%{version}-%{release}
200 %description programs
203 %description programs -l pl.UTF-8
207 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
208 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
209 Group: Applications/Emulators
210 Requires: %{name} = %{epoch}:%{version}-%{release}
212 %description dll-capi
213 CAPI 2.0 (ISDN) implementation DLLs for Wine.
215 %description dll-capi -l pl.UTF-8
216 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine.
219 Summary: Direct3D implementation DLLs for Wine
220 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
221 Group: Applications/Emulators
222 Requires: %{name} = %{epoch}:%{version}-%{release}
226 Direct3D implementation DLLs for Wine (through OpenGL).
228 %description dll-d3d -l pl.UTF-8
229 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
232 Summary: OpenGL implementation DLLs for Wine
233 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
234 Group: Applications/Emulators
235 Requires: %{name} = %{epoch}:%{version}-%{release}
239 OpenGL implementation DLLs for Wine.
241 %description dll-gl -l pl.UTF-8
242 Biblioteki DLL z implementacją OpenGL dla Wine.
245 Summary: TWAIN implementation DLL for Wine
246 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
247 Group: Applications/Emulators
248 Requires: %{name} = %{epoch}:%{version}-%{release}
250 %description dll-twain
251 TWAIN implementation DLL for Wine (through SANE).
253 %description dll-twain -l pl.UTF-8
254 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
257 Summary: Win32 LDAP API DLL for Wine
258 Summary(pl.UTF-8): Biblioteka DLL z implementacją API Win32 LDAP dla Wine
259 Group: Applications/Emulators
260 Requires: %{name} = %{epoch}:%{version}-%{release}
262 %description dll-ldap
263 Lightweight Directory Access Protocol Library for Wine.
265 %description dll-ldap -l pl.UTF-8
266 Biblioteka LDAP (Lightweight Directory Access Protocol) dla Wine.
269 Summary: ALSA driver for WINE mm.dll implementation
270 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
271 Group: Applications/Emulators
272 Requires: %{name} = %{epoch}:%{version}-%{release}
274 %description drv-alsa
275 ALSA driver for WINE mm.dll (multimedia system) implementation.
277 %description drv-alsa -l pl.UTF-8
278 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
294 #workaround for icon extraction error.
295 icotool -x -o . dlls/user32/resources/oic_winlogo.ico
296 mv -f oic_winlogo_*32x32x32.png %{name}.png
297 rm -f oic_winlogo_*.png
305 --with-alsa%{!?with_alsa:=no} \
306 --with-capi%{!?with_capi:=no} \
309 --with-cups%{!?with_cups:=no} \
318 %{__with_without gstreamer} \
319 %{__with_without hal} \
321 --with-ldap%{!?with_ldap:=no} \
323 --with%{!?with_netapi:out}-netapi \
332 --with%{!?with_sane:out}-sane \
353 rm -rf $RPM_BUILD_ROOT
354 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
356 DESTDIR=$RPM_BUILD_ROOT
358 install -p tools/sfnt2fon/sfnt2fon $RPM_BUILD_ROOT%{_bindir}
359 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
362 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
363 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
364 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
365 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
366 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
368 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
369 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
370 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
372 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
376 waveaudio=mciwave.drv
378 videodisc=mcipionr.drv
383 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
388 cd $RPM_BUILD_ROOT%{_libdir}/wine
391 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)
394 echo "%attr(755,root,root) %{_libdir}/wine/$f" >> $dir/files.so
399 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
400 for p in $programs; do
401 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
402 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
403 echo "%{_mandir}/man1/$p.1*" >> files.programs
404 grep -v "$p\.exe\.so$" files.so > files.so.
405 mv -f files.so. files.so
408 for dir in $RPM_BUILD_ROOT%{_mandir}/*.UTF-8 ; do
409 mv "$dir" "${dir%.UTF-8}"
413 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine64.1
414 for lang in de fr pl ; do
415 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
416 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine64.1
419 install loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine.1
420 for lang in de fr pl ; do
421 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
422 install loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine.1
426 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
428 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
430 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
433 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
434 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
435 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
438 rm -rf $RPM_BUILD_ROOT
442 %update_desktop_database
444 %postun -p /sbin/ldconfig
446 %triggerpostun -- wine < 1:0.9.12-1.9
447 rm -f /var/lock/subsys/wine
448 if [ -x /sbin/chkconfig ]; then
449 /sbin/chkconfig --del wine
453 %defattr(644,root,root,755)
454 %doc README AUTHORS ANNOUNCE
455 %lang(de) %doc documentation/README.de
456 %lang(es) %doc documentation/README.es
457 %lang(fr) %doc documentation/README.fr
458 %lang(hu) %doc documentation/README.hu
459 %lang(it) %doc documentation/README.it
460 %lang(ko) %doc documentation/README.ko
461 %lang(nb) %doc documentation/README.no
462 %lang(pt) %doc documentation/README.pt
463 %lang(pt_BR) %doc documentation/README.pt_br
464 %lang(ru) %doc documentation/README.ru
465 %lang(sv) %doc documentation/README.sv
466 %lang(tr) %doc documentation/README.tr
467 %attr(755,root,root) %{_bindir}/msiexec
469 %attr(755,root,root) %{_bindir}/wine
471 %attr(755,root,root) %{_bindir}/wine64
473 %attr(755,root,root) %{_bindir}/wineboot
474 %attr(755,root,root) %{_bindir}/winedbg
475 %attr(755,root,root) %{_bindir}/winecfg
477 %attr(755,root,root) %{_bindir}/wine-preloader
479 %attr(755,root,root) %{_bindir}/wine64-preloader
481 %attr(755,root,root) %{_bindir}/wineserver
482 %attr(755,root,root) %{_libdir}/*.so*
484 %dir %{_libdir}/wine/fakedlls
485 %{_libdir}/wine/fakedlls/*.acm
486 %{_libdir}/wine/fakedlls/*.cpl
487 %{_libdir}/wine/fakedlls/*.dll
489 %{_libdir}/wine/fakedlls/*.dll16
491 %{_libdir}/wine/fakedlls/*.drv
493 %{_libdir}/wine/fakedlls/*.drv16
495 %{_libdir}/wine/fakedlls/*.ds
496 %{_libdir}/wine/fakedlls/*.exe
498 %{_libdir}/wine/fakedlls/*.exe16
499 %{_libdir}/wine/fakedlls/*.mod16
501 %{_libdir}/wine/fakedlls/*.ocx
502 %{_libdir}/wine/fakedlls/*.sys
503 %{_libdir}/wine/fakedlls/*.tlb
505 %{_libdir}/wine/fakedlls/*.vxd
508 %{_mandir}/man1/wine.1*
509 %lang(de) %{_mandir}/de/man1/wine.1*
510 %lang(fr) %{_mandir}/fr/man1/wine.1*
511 %lang(pl) %{_mandir}/pl/man1/wine.1*
513 %{_mandir}/man1/wine64.1*
514 %lang(de) %{_mandir}/de/man1/wine64.1*
515 %lang(fr) %{_mandir}/fr/man1/wine64.1*
516 %lang(pl) %{_mandir}/pl/man1/wine64.1*
518 %{_mandir}/man1/msiexec.1*
519 %{_mandir}/man1/wineboot.1*
520 %{_mandir}/man1/winecfg.1*
521 %{_mandir}/man1/winedbg.1*
522 %{_mandir}/man1/wineserver.1*
523 %lang(de) %{_mandir}/de/man1/wineserver.1*
524 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
526 %{_desktopdir}/wine.desktop
527 %{_desktopdir}/wine-uninstaller.desktop
528 %{_pixmapsdir}/%{name}.png
530 %files programs -f files.programs
531 %defattr(644,root,root,755)
534 %defattr(644,root,root,755)
535 %attr(755,root,root) %{_bindir}/sfnt2fon
536 %attr(755,root,root) %{_bindir}/function_grep.pl
537 %attr(755,root,root) %{_bindir}/widl
538 %attr(755,root,root) %{_bindir}/winebuild
539 %attr(755,root,root) %{_bindir}/winedump
540 %attr(755,root,root) %{_bindir}/wineg++
541 %attr(755,root,root) %{_bindir}/winegcc
542 %attr(755,root,root) %{_bindir}/winemaker
543 %attr(755,root,root) %{_bindir}/winecpp
544 %attr(755,root,root) %{_bindir}/wmc
545 %attr(755,root,root) %{_bindir}/wrc
546 %{_libdir}/wine/lib*.def
547 # no shared variants, so not separated
548 %{_libdir}/wine/libadsiid.a
549 %{_libdir}/wine/libdinput.a
550 %{_libdir}/wine/libdinput8.a
551 %{_libdir}/wine/libdmoguids.a
552 %{_libdir}/wine/libdx*.a
553 %{_libdir}/wine/libmfuuid.a
554 %{_libdir}/wine/libstrmbase.a
555 %{_libdir}/wine/libstrmiids.a
556 %{_libdir}/wine/libuuid.a
557 %{_libdir}/wine/libwinecrt0.a
558 %{_libdir}/wine/libwmcodecdspuuid.a
560 %{_mandir}/man1/widl.1*
561 %{_mandir}/man1/winebuild.1*
562 %{_mandir}/man1/winecpp.1*
563 %{_mandir}/man1/winedump.1*
564 %{_mandir}/man1/winegcc.1*
565 %{_mandir}/man1/wineg++.1*
566 %{_mandir}/man1/winemaker.1*
567 %lang(de) %{_mandir}/de/man1/winemaker.1*
568 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
569 %{_mandir}/man1/wmc.1*
570 %{_mandir}/man1/wrc.1*
574 %defattr(644,root,root,755)
575 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
578 %defattr(644,root,root,755)
579 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
580 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
581 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
584 %defattr(644,root,root,755)
585 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
586 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
590 %defattr(644,root,root,755)
591 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
592 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
597 %defattr(644,root,root,755)
598 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
603 %defattr(644,root,root,755)
604 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
607 # additional dependencies in *.so not separated (yet?) from main package
608 # ddraw.dll.so,winex11.drv.so depend on X11 libs
609 # ole2disp.dll16.so,oleaut32.dll.so,typelib.dll16.so depend on libX11