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
10 # NOTE: wine detects the following SONAMES for dlopen at build time:
11 # libcrypto,libssl (wininet.dll)
12 # libcups (winspool.dll.so,wineps.dll.so)
13 # libcurses/libncurses (wineconsole program)
14 # libfontconfig (gdi32.dll.so)
15 # libfreetype (wineps.dll.so,gdi32.dll.so)
16 # libGL (x11drv.dll.so,ddraw.dll.so)
17 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
18 # libpng (windowscodecs.dll: SONAME_LIBPNG in dlls/windowscodecs/pngformat.c)
19 # thus requires rebuild after change of any of the above.
21 # library qualifier in rpm generated deps
22 %ifarch %{x8664} ia64 ppc64 s390x sparc64
23 %define libqual ()(64bit)
25 %define libqual %{nil}
28 %define gecko_ver 2.24
29 Summary: Program that lets you launch Win applications
30 Summary(es.UTF-8): Ejecuta programas Windows en Linux
31 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
32 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
35 # 1.7.x – development (DEVEL branch)
40 Group: Applications/Emulators
41 Source0: http://downloads.sourceforge.net/wine/%{name}-%{version}.tar.bz2
42 # Source0-md5: b13c19ef69a99f2aa6c0b3fd08ae8d90
43 Source1: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86.msi
44 # Source1-md5: 766bb034172f7f0a97443951a02a0df8
45 Source2: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86_64.msi
46 # Source2-md5: 1912fd191872c72d5f562283e44e8ab4
47 Source3: %{name}-uninstaller.desktop
48 Patch0: %{name}-gphoto2_bool.patch
49 Patch1: %{name}-makedep.patch
50 Patch2: %{name}-ncurses.patch
51 Patch4: %{name}-disable-valgrind.patch
52 Patch5: %{name}-ca_certificates.patch
53 Patch6: %{name}-manpaths.patch
55 Patch8: %{name}-wine64_man.patch
56 URL: http://www.winehq.org/
57 BuildRequires: OpenAL-devel >= 1.1
58 BuildRequires: OpenGL-GLU-devel
59 %{?with_alsa:BuildRequires: alsa-lib-devel}
60 %{?with_arts:BuildRequires: artsc-devel}
61 BuildRequires: autoconf
62 BuildRequires: automake
64 %{?with_capi:BuildRequires: capi4k-utils-devel}
65 %{?with_cups:BuildRequires: cups-devel}
66 BuildRequires: docbook-dtd31-sgml
67 BuildRequires: docbook-utils
69 BuildRequires: fontconfig-devel
70 BuildRequires: fontforge
71 BuildRequires: freetype-devel >= 2.0.5
73 BuildRequires: gettext-devel
74 BuildRequires: giflib-devel
75 BuildRequires: gnutls-devel
76 %{?with_gstreamer:BuildRequires: gstreamer0.10-plugins-base-devel}
77 BuildRequires: icoutils
78 BuildRequires: lcms2-devel
79 BuildRequires: libgphoto2-devel
80 BuildRequires: libgsm-devel
81 BuildRequires: libjpeg-devel
82 BuildRequires: libmpg123-devel >= 1.5.0
83 BuildRequires: libtool
84 BuildRequires: libv4l-devel
85 BuildRequires: libxslt-devel
86 BuildRequires: ncurses-devel
87 # db2* failed previously - probably openjade or opensp bug
88 BuildRequires: libpng-devel >= 1.5
89 BuildRequires: openjade >= 1:1.3.3-0.pre1
90 %{?with_ldap:BuildRequires: openldap-devel}
91 BuildRequires: opensp >= 1:1.5.1
92 BuildRequires: openssl-devel >= 0.9.7d
93 BuildRequires: pkgconfig
94 BuildRequires: prelink
95 %{?with_sane:BuildRequires: sane-backends-devel}
96 BuildRequires: unixODBC-devel >= 2.2.12-2
97 #BuildRequires: valgrind
98 BuildRequires: xorg-lib-libXcomposite-devel
99 BuildRequires: xorg-lib-libXcursor-devel
100 BuildRequires: xorg-lib-libXi-devel
101 BuildRequires: xorg-lib-libXinerama-devel
102 BuildRequires: xorg-lib-libXmu-devel
103 BuildRequires: xorg-lib-libXrandr-devel
104 BuildRequires: xorg-lib-libXrender-devel
105 BuildRequires: xorg-lib-libXxf86dga-devel
106 BuildRequires: xorg-lib-libXxf86vm-devel
107 Requires: libfreetype.so.6%{libqual}
108 Requires: libpng16.so.16%{libqual}
109 Requires(post): /sbin/ldconfig
110 Suggests: binfmt-detector
111 Suggests: ca-certificates
113 Conflicts: ca-certificates < 20080809-4
114 # for printing needs lpr
115 Suggests: cups-clients
117 Suggests: xorg-app-xmessage
119 Suggests: samba-common >= 1:3.0.25
120 # link to wine/ntdll.dll.so, without any SONAME
121 Provides: libntdll.dll.so
122 Obsoletes: wine-doc-pdf
123 Obsoletes: wine-drv-arts
124 Obsoletes: wine-drv-jack
125 Obsoletes: wine-drv-nas
126 ExclusiveArch: %{ix86} %{x8664}
128 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
130 %define _noautoreqdep libGL.so.1 libGLU.so.1
131 %define no_install_post_strip 1
133 %define _winedir %{_datadir}/%{name}
136 Wine is a program which allows running Microsoft Windows programs
137 (including DOS, Windows 3.x and Win32 executables) on Unix. It
138 consists of a program loader which loads and executes a Microsoft
139 Windows binary, and a library that implements Windows API calls using
140 their Unix or X11 equivalents. The library may also be used for
141 porting Win32 code into native Unix executables.
143 %description -l es.UTF-8
144 Ejecuta programas Windows en Linux.
146 %description -l pl.UTF-8
147 Wine jest programem dzięki któremu można uruchamiać programy napisane
148 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
149 loadera, który pozwala wczytywać i uruchamiać programy w formacie
150 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
151 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
152 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
154 %description -l pt_BR.UTF-8
155 O Wine é um programa que permite rodar programas MS-Windows no X11.
156 Ele consiste de um carregador de programa, que carrega e executa um
157 binário MS-Windows, e de uma biblioteca de emulação que traduz as
158 chamadas da API para as equivalentes Unix/X11.
161 Summary: Wine - header files
162 Summary(es.UTF-8): Biblioteca de desarrollo de wine
163 Summary(pl.UTF-8): Wine - pliki nagłowkowe
164 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
165 Group: Development/Libraries
166 Requires: %{name} = %{epoch}:%{version}-%{release}
171 %description devel -l es.UTF-8
172 Biblioteca de desarrollo de wine.
174 %description devel -l pl.UTF-8
175 Wine - pliki nagłówkowe.
177 %description devel -l pt_BR.UTF-8
178 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
182 Summary: Wine - programs
183 Summary(pl.UTF-8): Wine - programy
185 Requires: %{name} = %{epoch}:%{version}-%{release}
187 %description programs
190 %description programs -l pl.UTF-8
194 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
195 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
196 Group: Applications/Emulators
197 Requires: %{name} = %{epoch}:%{version}-%{release}
199 %description dll-capi
200 CAPI 2.0 (ISDN) implementation DLLs for Wine (through OpenGL).
202 %description dll-capi -l pl.UTF-8
203 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine (poprzez
207 Summary: Direct3D implementation DLLs for Wine
208 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
209 Group: Applications/Emulators
210 Requires: %{name} = %{epoch}:%{version}-%{release}
214 Direct3D implementation DLLs for Wine (through OpenGL).
216 %description dll-d3d -l pl.UTF-8
217 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
220 Summary: OpenGL implementation DLLs for Wine
221 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
222 Group: Applications/Emulators
223 Requires: %{name} = %{epoch}:%{version}-%{release}
227 OpenGL implementation DLLs for Wine.
229 %description dll-gl -l pl.UTF-8
230 Biblioteki DLL z implementacją OpenGL dla Wine.
233 Summary: TWAIN implementation DLL for Wine
234 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
235 Group: Applications/Emulators
236 Requires: %{name} = %{epoch}:%{version}-%{release}
238 %description dll-twain
239 TWAIN implementation DLL for Wine (through SANE).
241 %description dll-twain -l pl.UTF-8
242 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
245 Summary: Win32 LDAP API DLL for Wine
246 Group: Applications/Emulators
247 Requires: %{name} = %{epoch}:%{version}-%{release}
249 %description dll-ldap
250 Lightweight Directory Access Protocol Library.
253 Summary: ALSA driver for WINE mm.dll implementation
254 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
255 Group: Applications/Emulators
256 Requires: %{name} = %{epoch}:%{version}-%{release}
258 %description drv-alsa
259 ALSA driver for WINE mm.dll (multimedia system) implementation.
261 %description drv-alsa -l pl.UTF-8
262 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
278 icotool -x --width=32 --height=32 --bit-depth=32 -o . dlls/user32/resources/oic_winlogo.ico
279 mv -f oic_winlogo_*.png %{name}.png
287 --with%{!?with_alsa:out}-alsa \
288 --with%{!?with_capi:out}-capi \
291 --with%{!?with_cups:out}-cups \
299 --with%{!?with_gstreamer:out}-gstreamer \
301 --with%{!?with_ldap:out}-ldap \
308 --with%{!?with_sane:out}-sane \
325 rm -rf $RPM_BUILD_ROOT
326 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
328 DESTDIR=$RPM_BUILD_ROOT
330 findup -m $RPM_BUILD_ROOT%{_winedir}/fakedlls
332 install -p tools/fnt2fon $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
383 for langdir in "" de/ fr/ pl/ ; do
384 mv $RPM_BUILD_ROOT%{_mandir}/${langdir}man1/{wine,wine64}.1
388 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
390 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
392 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
395 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
396 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
397 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
400 rm -rf $RPM_BUILD_ROOT
404 %update_desktop_database
406 %postun -p /sbin/ldconfig
408 %triggerpostun -- wine < 1:0.9.12-1.9
409 rm -f /var/lock/subsys/wine
410 if [ -x /sbin/chkconfig ]; then
411 /sbin/chkconfig --del wine
415 %defattr(644,root,root,755)
416 %doc README AUTHORS ANNOUNCE
417 %lang(de) %doc documentation/README.de
418 %lang(es) %doc documentation/README.es
419 %lang(fr) %doc documentation/README.fr
420 %lang(hu) %doc documentation/README.hu
421 %lang(it) %doc documentation/README.it
422 %lang(ko) %doc documentation/README.ko
423 %lang(nb) %doc documentation/README.no
424 %lang(pt) %doc documentation/README.pt
425 %lang(pt_BR) %doc documentation/README.pt_br
426 %lang(ru) %doc documentation/README.ru
427 %lang(sv) %doc documentation/README.sv
428 %lang(tr) %doc documentation/README.tr
429 %attr(755,root,root) %{_bindir}/msiexec
431 %attr(755,root,root) %{_bindir}/wine
433 %attr(755,root,root) %{_bindir}/wine64
435 %attr(755,root,root) %{_bindir}/wineboot
436 %attr(755,root,root) %{_bindir}/winedbg
437 %attr(755,root,root) %{_bindir}/winecfg
439 %attr(755,root,root) %{_bindir}/wine-preloader
441 %attr(755,root,root) %{_bindir}/wine64-preloader
443 %attr(755,root,root) %{_bindir}/wineserver
444 %attr(755,root,root) %{_libdir}/*.so*
446 %dir %{_libdir}/wine/fakedlls
447 %{_libdir}/wine/fakedlls/*.acm
448 %{_libdir}/wine/fakedlls/*.cpl
449 %{_libdir}/wine/fakedlls/*.dll
451 %{_libdir}/wine/fakedlls/*.dll16
453 %{_libdir}/wine/fakedlls/*.drv
455 %{_libdir}/wine/fakedlls/*.drv16
457 %{_libdir}/wine/fakedlls/*.ds
458 %{_libdir}/wine/fakedlls/*.exe
460 %{_libdir}/wine/fakedlls/*.exe16
461 %{_libdir}/wine/fakedlls/*.mod16
463 %{_libdir}/wine/fakedlls/*.ocx
464 %{_libdir}/wine/fakedlls/*.sys
465 %{_libdir}/wine/fakedlls/*.tlb
467 %{_libdir}/wine/fakedlls/*.vxd
470 %{_mandir}/man1/wine.1*
471 %lang(de) %{_mandir}/de/man1/wine.1*
472 %lang(fr) %{_mandir}/fr/man1/wine.1*
473 %lang(pl) %{_mandir}/pl/man1/wine.1*
475 %{_mandir}/man1/wine64.1*
476 %lang(de) %{_mandir}/de/man1/wine64.1*
477 %lang(fr) %{_mandir}/fr/man1/wine64.1*
478 %lang(pl) %{_mandir}/pl/man1/wine64.1*
480 %{_mandir}/man1/msiexec.1*
481 %{_mandir}/man1/wineboot.1*
482 %{_mandir}/man1/winecfg.1*
483 %{_mandir}/man1/winedbg.1*
484 %{_mandir}/man1/wineserver.1*
485 %lang(de) %{_mandir}/de/man1/wineserver.1*
486 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
488 %{_desktopdir}/wine.desktop
489 %{_desktopdir}/wine-uninstaller.desktop
490 %{_pixmapsdir}/%{name}.png
492 %files programs -f files.programs
493 %defattr(644,root,root,755)
496 %defattr(644,root,root,755)
497 %attr(755,root,root) %{_bindir}/fnt2fon
498 %attr(755,root,root) %{_bindir}/function_grep.pl
499 %attr(755,root,root) %{_bindir}/widl
500 %attr(755,root,root) %{_bindir}/winebuild
501 %attr(755,root,root) %{_bindir}/winedump
502 %attr(755,root,root) %{_bindir}/wineg++
503 %attr(755,root,root) %{_bindir}/winegcc
504 %attr(755,root,root) %{_bindir}/winemaker
505 %attr(755,root,root) %{_bindir}/winecpp
506 %attr(755,root,root) %{_bindir}/wmc
507 %attr(755,root,root) %{_bindir}/wrc
508 %{_libdir}/wine/lib*.def
509 # no shared variants, so not separated
510 %{_libdir}/wine/lib*.def.a
511 %{_libdir}/wine/libadsiid.a
512 %{_libdir}/wine/libdx*.a
513 %{_libdir}/wine/libstrmbase.a
514 %{_libdir}/wine/libstrmiids.a
515 %{_libdir}/wine/libuuid.a
516 %{_libdir}/wine/libwinecrt0.a
518 %{_mandir}/man1/widl.1*
519 %{_mandir}/man1/winebuild.1*
520 %{_mandir}/man1/winecpp.1*
521 %{_mandir}/man1/winedump.1*
522 %{_mandir}/man1/winegcc.1*
523 %{_mandir}/man1/wineg++.1*
524 %{_mandir}/man1/winemaker.1*
525 %lang(de) %{_mandir}/de/man1/winemaker.1*
526 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
527 %{_mandir}/man1/wmc.1*
528 %{_mandir}/man1/wrc.1*
532 %defattr(644,root,root,755)
533 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
536 %defattr(644,root,root,755)
537 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
538 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
539 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
542 %defattr(644,root,root,755)
543 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
544 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
548 %defattr(644,root,root,755)
549 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
550 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
555 %defattr(644,root,root,755)
556 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
561 %defattr(644,root,root,755)
562 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
565 # additional dependencies in *.so not separated (yet?) from main package
566 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
567 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
568 # ttydrv.dll.so depends on ncurses