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_without ldap # don't build LDAP DLL
8 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
9 %bcond_without netapi # don't use the Samba NetAPI library
10 %bcond_without compholio # don't use the compholio patches for Silverlight
12 # NOTE: wine detects the following SONAMES for dlopen at build time:
13 # libcrypto,libssl (wininet.dll)
14 # libcups (winspool.dll.so,wineps.dll.so)
15 # libcurses/libncurses (wineconsole program)
16 # libfontconfig (gdi32.dll.so)
17 # libfreetype (wineps.dll.so,gdi32.dll.so)
18 # libGL (x11drv.dll.so,ddraw.dll.so)
19 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
20 # libpng (windowscodecs.dll: SONAME_LIBPNG in dlls/windowscodecs/pngformat.c)
21 # thus requires rebuild after change of any of the above.
23 # library qualifier in rpm generated deps
24 %ifarch %{x8664} ia64 ppc64 s390x sparc64
25 %define libqual ()(64bit)
27 %define libqual %{nil}
30 %define gecko_ver 2.24
31 %define compholio_ver %{version}
32 Summary: Program that lets you launch Win applications
33 Summary(es.UTF-8): Ejecuta programas Windows en Linux
34 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
35 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
38 # 1.7.x – development (DEVEL branch)
43 Group: Applications/Emulators
44 Source0: http://downloads.sourceforge.net/wine/%{name}-%{version}.tar.bz2
45 # Source0-md5: b13c19ef69a99f2aa6c0b3fd08ae8d90
46 Source1: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86.msi
47 # Source1-md5: 766bb034172f7f0a97443951a02a0df8
48 Source2: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86_64.msi
49 # Source2-md5: 1912fd191872c72d5f562283e44e8ab4
50 Source3: %{name}-uninstaller.desktop
51 Source4: https://github.com/compholio/wine-compholio-daily/archive/v%{compholio_ver}/wine-compholio-%{compholio_ver}.tar.gz
52 # Source4-md5: 7e5b25b732415112f6d4b9418a2e5945
53 Patch0: %{name}-gphoto2_bool.patch
54 Patch1: %{name}-makedep.patch
55 Patch2: %{name}-ncurses.patch
56 Patch4: %{name}-disable-valgrind.patch
57 Patch5: %{name}-ca_certificates.patch
59 Patch7: %{name}-wine64_man.patch
60 URL: http://www.winehq.org/
61 BuildRequires: OpenAL-devel >= 1.1
62 BuildRequires: ocl-icd-libOpenCL-devel
63 BuildRequires: OpenGL-GLU-devel
64 BuildRequires: Mesa-libOSMesa-devel
65 %{?with_alsa:BuildRequires: alsa-lib-devel}
66 %{?with_arts:BuildRequires: artsc-devel}
67 %{?with_compholio:BuildRequires: attr-devel}
68 BuildRequires: autoconf
69 BuildRequires: automake
71 %{?with_capi:BuildRequires: capi4k-utils-devel}
72 %{?with_cups:BuildRequires: cups-devel}
73 BuildRequires: dbus-devel
74 BuildRequires: docbook-dtd31-sgml
75 BuildRequires: docbook-utils
77 BuildRequires: fontconfig-devel
78 BuildRequires: fontforge
79 BuildRequires: freetype-devel >= 2.0.5
81 BuildRequires: gettext-devel
82 BuildRequires: giflib-devel
83 BuildRequires: gnutls-devel
84 %{?with_gstreamer:BuildRequires: gstreamer0.10-plugins-base-devel}
85 BuildRequires: icoutils
86 BuildRequires: lcms2-devel
87 BuildRequires: libgphoto2-devel
88 BuildRequires: libgsm-devel
89 BuildRequires: libjpeg-devel
90 BuildRequires: libmpg123-devel >= 1.5.0
91 BuildRequires: libtool
92 BuildRequires: libv4l-devel
93 BuildRequires: libxslt-devel
94 BuildRequires: ncurses-devel
95 # db2* failed previously - probably openjade or opensp bug
96 BuildRequires: libpng-devel >= 1.5
97 BuildRequires: openjade >= 1:1.3.3-0.pre1
98 %{?with_ldap:BuildRequires: openldap-devel}
99 BuildRequires: opensp >= 1:1.5.1
100 BuildRequires: openssl-devel >= 0.9.7d
101 BuildRequires: pkgconfig
102 BuildRequires: prelink
103 BuildRequires: samba-devel
104 %{?with_sane:BuildRequires: sane-backends-devel}
105 BuildRequires: unixODBC-devel >= 2.2.12-2
106 #BuildRequires: valgrind
107 BuildRequires: xorg-lib-libXcomposite-devel
108 BuildRequires: xorg-lib-libXcursor-devel
109 BuildRequires: xorg-lib-libXi-devel
110 BuildRequires: xorg-lib-libXinerama-devel
111 BuildRequires: xorg-lib-libXmu-devel
112 BuildRequires: xorg-lib-libXrandr-devel
113 BuildRequires: xorg-lib-libXrender-devel
114 BuildRequires: xorg-lib-libXxf86dga-devel
115 BuildRequires: xorg-lib-libXxf86vm-devel
116 Requires: libfreetype.so.6%{libqual}
117 Requires: libpng16.so.16%{libqual}
118 Requires(post): /sbin/ldconfig
119 Suggests: binfmt-detector
120 Suggests: ca-certificates
122 Conflicts: ca-certificates < 20080809-4
123 # for printing needs lpr
124 Suggests: cups-clients
126 Suggests: xorg-app-xmessage
128 Suggests: samba-common >= 1:3.0.25
129 # link to wine/ntdll.dll.so, without any SONAME
130 Provides: libntdll.dll.so
131 %if %{with compholio}
132 Provides: wine(compholio) = %{compholio_ver}
134 # Pipelight dependency on x86_64
135 Provides: wine(compholio)(32bit) = %{compholio_ver}
138 Obsoletes: wine-doc-pdf
139 Obsoletes: wine-drv-arts
140 Obsoletes: wine-drv-jack
141 Obsoletes: wine-drv-nas
142 ExclusiveArch: %{ix86} %{x8664}
144 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
146 %define _noautoreqdep libGL.so.1 libGLU.so.1
147 %define no_install_post_strip 1
149 %define _winedir %{_datadir}/%{name}
152 Wine is a program which allows running Microsoft Windows programs
153 (including DOS, Windows 3.x and Win32 executables) on Unix. It
154 consists of a program loader which loads and executes a Microsoft
155 Windows binary, and a library that implements Windows API calls using
156 their Unix or X11 equivalents. The library may also be used for
157 porting Win32 code into native Unix executables.
159 %description -l es.UTF-8
160 Ejecuta programas Windows en Linux.
162 %description -l pl.UTF-8
163 Wine jest programem dzięki któremu można uruchamiać programy napisane
164 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
165 loadera, który pozwala wczytywać i uruchamiać programy w formacie
166 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
167 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
168 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
170 %description -l pt_BR.UTF-8
171 O Wine é um programa que permite rodar programas MS-Windows no X11.
172 Ele consiste de um carregador de programa, que carrega e executa um
173 binário MS-Windows, e de uma biblioteca de emulação que traduz as
174 chamadas da API para as equivalentes Unix/X11.
177 Summary: Wine - header files
178 Summary(es.UTF-8): Biblioteca de desarrollo de wine
179 Summary(pl.UTF-8): Wine - pliki nagłowkowe
180 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
181 Group: Development/Libraries
182 Requires: %{name} = %{epoch}:%{version}-%{release}
187 %description devel -l es.UTF-8
188 Biblioteca de desarrollo de wine.
190 %description devel -l pl.UTF-8
191 Wine - pliki nagłówkowe.
193 %description devel -l pt_BR.UTF-8
194 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
198 Summary: Wine - programs
199 Summary(pl.UTF-8): Wine - programy
201 Requires: %{name} = %{epoch}:%{version}-%{release}
203 %description programs
206 %description programs -l pl.UTF-8
210 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
211 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
212 Group: Applications/Emulators
213 Requires: %{name} = %{epoch}:%{version}-%{release}
215 %description dll-capi
216 CAPI 2.0 (ISDN) implementation DLLs for Wine (through OpenGL).
218 %description dll-capi -l pl.UTF-8
219 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine (poprzez
223 Summary: Direct3D implementation DLLs for Wine
224 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
225 Group: Applications/Emulators
226 Requires: %{name} = %{epoch}:%{version}-%{release}
230 Direct3D implementation DLLs for Wine (through OpenGL).
232 %description dll-d3d -l pl.UTF-8
233 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
236 Summary: OpenGL implementation DLLs for Wine
237 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
238 Group: Applications/Emulators
239 Requires: %{name} = %{epoch}:%{version}-%{release}
243 OpenGL implementation DLLs for Wine.
245 %description dll-gl -l pl.UTF-8
246 Biblioteki DLL z implementacją OpenGL dla Wine.
249 Summary: TWAIN implementation DLL for Wine
250 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
251 Group: Applications/Emulators
252 Requires: %{name} = %{epoch}:%{version}-%{release}
254 %description dll-twain
255 TWAIN implementation DLL for Wine (through SANE).
257 %description dll-twain -l pl.UTF-8
258 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
261 Summary: Win32 LDAP API DLL for Wine
262 Group: Applications/Emulators
263 Requires: %{name} = %{epoch}:%{version}-%{release}
265 %description dll-ldap
266 Lightweight Directory Access Protocol Library.
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.
292 %if %{with compholio}
293 # binary patch that doesn't apply
294 # and real Arial may be installed through fonts-TTF-microsoft
295 rm -r wine-compholio-*/patches/10-Missing_Fonts
297 for patch in wine-compholio-*/patches/*/*.patch ; do
298 patch -N -p0 --strip=1 < "${patch}"
299 # wine-compholio-*/debian/tools/gitapply.sh < "${patch}"
304 icotool -x --width=32 --height=32 --bit-depth=32 -o . dlls/user32/resources/oic_winlogo.ico
305 mv -f oic_winlogo_*.png %{name}.png
307 %if %{with compholio}
317 --with%{!?with_alsa:out}-alsa \
318 --with%{!?with_capi:out}-capi \
321 --with%{!?with_cups:out}-cups \
330 --with%{!?with_gstreamer:out}-gstreamer \
333 --with%{!?with_ldap:out}-ldap \
335 --with%{!?with_netapi:out}-netapi \
344 --with%{!?with_sane:out}-sane \
365 rm -rf $RPM_BUILD_ROOT
366 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
368 DESTDIR=$RPM_BUILD_ROOT
370 install -p tools/sfnt2fon/sfnt2fon $RPM_BUILD_ROOT%{_bindir}
371 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
374 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
375 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
376 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
377 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
378 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
380 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
381 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
382 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
384 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
388 waveaudio=mciwave.drv
390 videodisc=mcipionr.drv
395 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
400 cd $RPM_BUILD_ROOT%{_libdir}/wine
403 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)
406 echo "%attr(755,root,root) %{_libdir}/wine/$f" >> $dir/files.so
411 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
412 for p in $programs; do
413 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
414 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
415 echo "%{_mandir}/man1/$p.1*" >> files.programs
416 grep -v "$p\.exe\.so$" files.so > files.so.
417 mv -f files.so. files.so
420 for dir in $RPM_BUILD_ROOT%{_mandir}/*.UTF-8 ; do
421 mv "$dir" "${dir%.UTF-8}"
425 for langdir in "" de/ fr/ pl/ ; do
426 mv $RPM_BUILD_ROOT%{_mandir}/${langdir}man1/{wine,wine64}.1
430 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
432 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
434 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
437 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
438 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
439 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
442 rm -rf $RPM_BUILD_ROOT
446 %update_desktop_database
448 %postun -p /sbin/ldconfig
450 %triggerpostun -- wine < 1:0.9.12-1.9
451 rm -f /var/lock/subsys/wine
452 if [ -x /sbin/chkconfig ]; then
453 /sbin/chkconfig --del wine
457 %defattr(644,root,root,755)
458 %doc README AUTHORS ANNOUNCE
459 %lang(de) %doc documentation/README.de
460 %lang(es) %doc documentation/README.es
461 %lang(fr) %doc documentation/README.fr
462 %lang(hu) %doc documentation/README.hu
463 %lang(it) %doc documentation/README.it
464 %lang(ko) %doc documentation/README.ko
465 %lang(nb) %doc documentation/README.no
466 %lang(pt) %doc documentation/README.pt
467 %lang(pt_BR) %doc documentation/README.pt_br
468 %lang(ru) %doc documentation/README.ru
469 %lang(sv) %doc documentation/README.sv
470 %lang(tr) %doc documentation/README.tr
471 %attr(755,root,root) %{_bindir}/msiexec
473 %attr(755,root,root) %{_bindir}/wine
475 %attr(755,root,root) %{_bindir}/wine64
477 %attr(755,root,root) %{_bindir}/wineboot
478 %attr(755,root,root) %{_bindir}/winedbg
479 %attr(755,root,root) %{_bindir}/winecfg
481 %attr(755,root,root) %{_bindir}/wine-preloader
483 %attr(755,root,root) %{_bindir}/wine64-preloader
485 %attr(755,root,root) %{_bindir}/wineserver
486 %attr(755,root,root) %{_libdir}/*.so*
488 %dir %{_libdir}/wine/fakedlls
489 %{_libdir}/wine/fakedlls/*.acm
490 %{_libdir}/wine/fakedlls/*.cpl
491 %{_libdir}/wine/fakedlls/*.dll
493 %{_libdir}/wine/fakedlls/*.dll16
495 %{_libdir}/wine/fakedlls/*.drv
497 %{_libdir}/wine/fakedlls/*.drv16
499 %{_libdir}/wine/fakedlls/*.ds
500 %{_libdir}/wine/fakedlls/*.exe
502 %{_libdir}/wine/fakedlls/*.exe16
503 %{_libdir}/wine/fakedlls/*.mod16
505 %{_libdir}/wine/fakedlls/*.ocx
506 %{_libdir}/wine/fakedlls/*.sys
507 %{_libdir}/wine/fakedlls/*.tlb
509 %{_libdir}/wine/fakedlls/*.vxd
512 %{_mandir}/man1/wine.1*
513 %lang(de) %{_mandir}/de/man1/wine.1*
514 %lang(fr) %{_mandir}/fr/man1/wine.1*
515 %lang(pl) %{_mandir}/pl/man1/wine.1*
517 %{_mandir}/man1/wine64.1*
518 %lang(de) %{_mandir}/de/man1/wine64.1*
519 %lang(fr) %{_mandir}/fr/man1/wine64.1*
520 %lang(pl) %{_mandir}/pl/man1/wine64.1*
522 %{_mandir}/man1/msiexec.1*
523 %{_mandir}/man1/wineboot.1*
524 %{_mandir}/man1/winecfg.1*
525 %{_mandir}/man1/winedbg.1*
526 %{_mandir}/man1/wineserver.1*
527 %lang(de) %{_mandir}/de/man1/wineserver.1*
528 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
530 %{_desktopdir}/wine.desktop
531 %{_desktopdir}/wine-uninstaller.desktop
532 %{_pixmapsdir}/%{name}.png
534 %files programs -f files.programs
535 %defattr(644,root,root,755)
538 %defattr(644,root,root,755)
539 %attr(755,root,root) %{_bindir}/sfnt2fon
540 %attr(755,root,root) %{_bindir}/function_grep.pl
541 %attr(755,root,root) %{_bindir}/widl
542 %attr(755,root,root) %{_bindir}/winebuild
543 %attr(755,root,root) %{_bindir}/winedump
544 %attr(755,root,root) %{_bindir}/wineg++
545 %attr(755,root,root) %{_bindir}/winegcc
546 %attr(755,root,root) %{_bindir}/winemaker
547 %attr(755,root,root) %{_bindir}/winecpp
548 %attr(755,root,root) %{_bindir}/wmc
549 %attr(755,root,root) %{_bindir}/wrc
550 %{_libdir}/wine/lib*.def
551 # no shared variants, so not separated
552 %{_libdir}/wine/lib*.def.a
553 %{_libdir}/wine/libadsiid.a
554 %{_libdir}/wine/libdx*.a
555 %{_libdir}/wine/libstrmbase.a
556 %{_libdir}/wine/libstrmiids.a
557 %{_libdir}/wine/libuuid.a
558 %{_libdir}/wine/libwinecrt0.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,x11drv.dll.so depend on X11 libs
609 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
610 # ttydrv.dll.so depends on ncurses