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 # thus requires rebuild after change of any of the above.
21 Summary: Program that lets you launch Win applications
22 Summary(es.UTF-8): Ejecuta programas Windows en Linux
23 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
24 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
30 Group: Applications/Emulators
31 Source0: http://downloads.sourceforge.net/wine/%{name}-%{version}.tar.bz2
32 # Source0-md5: 6594ab86a4b1fb2c09dadfb4ea7fc4af
33 Source1: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86.msi
34 # Source1-md5: 700aaa08724be1992cffed7b87e79a44
35 Source2: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86_64.msi
36 # Source2-md5: 7b4811f667fd01d300fdff68420a9c72
37 Source3: %{name}-uninstaller.desktop
38 Patch0: %{name}-fontcache.patch
39 Patch1: %{name}-makedep.patch
40 Patch2: %{name}-ncurses.patch
41 Patch4: %{name}-disable-valgrind.patch
42 Patch5: %{name}-ca_certificates.patch
43 Patch6: %{name}-manpaths.patch
45 URL: http://www.winehq.org/
46 BuildRequires: OpenAL-devel >= 1.1
47 BuildRequires: OpenGL-GLU-devel
48 %{?with_alsa:BuildRequires: alsa-lib-devel}
49 %{?with_arts:BuildRequires: artsc-devel}
50 BuildRequires: autoconf
51 BuildRequires: automake
53 %{?with_capi:BuildRequires: capi4k-utils-devel}
54 %{?with_cups:BuildRequires: cups-devel}
55 BuildRequires: docbook-dtd31-sgml
56 BuildRequires: docbook-utils
58 BuildRequires: fontconfig-devel
59 BuildRequires: fontforge
60 BuildRequires: freetype-devel >= 2.0.5
61 BuildRequires: gettext-devel
62 BuildRequires: giflib-devel
63 BuildRequires: gnutls-devel
64 %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel}
65 BuildRequires: icoutils
66 BuildRequires: lcms-devel
67 BuildRequires: libgphoto2-devel
68 BuildRequires: libgsm-devel
69 BuildRequires: libjpeg-devel
70 BuildRequires: libmpg123-devel >= 1.5.0
71 BuildRequires: libtool
72 BuildRequires: libv4l-devel
73 BuildRequires: libxslt-devel
74 BuildRequires: ncurses-devel
75 # db2* failed previously - probably openjade or opensp bug
76 BuildRequires: openjade >= 1:1.3.3-0.pre1
77 %{?with_ldap:BuildRequires: openldap-devel}
78 BuildRequires: opensp >= 1:1.5.1
79 BuildRequires: openssl-devel >= 0.9.7d
80 BuildRequires: pkgconfig
81 BuildRequires: prelink
82 %{?with_sane:BuildRequires: sane-backends-devel}
83 BuildRequires: unixODBC-devel >= 2.2.12-2
84 #BuildRequires: valgrind
85 BuildRequires: xorg-lib-libXcomposite-devel
86 BuildRequires: xorg-lib-libXcursor-devel
87 BuildRequires: xorg-lib-libXi-devel
88 BuildRequires: xorg-lib-libXinerama-devel
89 BuildRequires: xorg-lib-libXmu-devel
90 BuildRequires: xorg-lib-libXrandr-devel
91 BuildRequires: xorg-lib-libXrender-devel
92 BuildRequires: xorg-lib-libXxf86dga-devel
93 BuildRequires: xorg-lib-libXxf86vm-devel
94 Requires: libfreetype.so.6
95 Requires(post): /sbin/ldconfig
96 Suggests: binfmt-detector
97 Suggests: ca-certificates
99 Conflicts: ca-certificates < 20080809-4
100 # for printing needs lpr
101 Suggests: cups-clients
103 Suggests: xorg-app-xmessage
105 Suggests: samba-common >= 1:3.0.25
106 # link to wine/ntdll.dll.so, without any SONAME
107 Provides: libntdll.dll.so
108 Obsoletes: wine-doc-pdf
109 Obsoletes: wine-drv-arts
110 Obsoletes: wine-drv-jack
111 Obsoletes: wine-drv-nas
112 ExclusiveArch: %{ix86} %{x8664}
114 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
116 %define _noautoreqdep libGL.so.1 libGLU.so.1
117 %define no_install_post_strip 1
119 %define _winedir %{_datadir}/%{name}
121 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
123 %undefine debuginfocflags
126 Wine is a program which allows running Microsoft Windows programs
127 (including DOS, Windows 3.x and Win32 executables) on Unix. It
128 consists of a program loader which loads and executes a Microsoft
129 Windows binary, and a library that implements Windows API calls using
130 their Unix or X11 equivalents. The library may also be used for
131 porting Win32 code into native Unix executables.
133 %description -l es.UTF-8
134 Ejecuta programas Windows en Linux.
136 %description -l pl.UTF-8
137 Wine jest programem dzięki któremu można uruchamiać programy napisane
138 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
139 loadera, który pozwala wczytywać i uruchamiać programy w formacie
140 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
141 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
142 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
144 %description -l pt_BR.UTF-8
145 O Wine é um programa que permite rodar programas MS-Windows no X11.
146 Ele consiste de um carregador de programa, que carrega e executa um
147 binário MS-Windows, e de uma biblioteca de emulação que traduz as
148 chamadas da API para as equivalentes Unix/X11.
151 Summary: Wine - header files
152 Summary(es.UTF-8): Biblioteca de desarrollo de wine
153 Summary(pl.UTF-8): Wine - pliki nagłowkowe
154 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
155 Group: Development/Libraries
156 Requires: %{name} = %{epoch}:%{version}-%{release}
161 %description devel -l es.UTF-8
162 Biblioteca de desarrollo de wine.
164 %description devel -l pl.UTF-8
165 Wine - pliki nagłówkowe.
167 %description devel -l pt_BR.UTF-8
168 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
172 Summary: Wine - programs
173 Summary(pl.UTF-8): Wine - programy
175 Requires: %{name} = %{epoch}:%{version}-%{release}
177 %description programs
180 %description programs -l pl.UTF-8
184 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
185 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
186 Group: Applications/Emulators
187 Requires: %{name} = %{epoch}:%{version}-%{release}
189 %description dll-capi
190 CAPI 2.0 (ISDN) implementation DLLs for Wine (through OpenGL).
192 %description dll-capi -l pl.UTF-8
193 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine (poprzez
197 Summary: Direct3D implementation DLLs for Wine
198 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
199 Group: Applications/Emulators
200 Requires: %{name} = %{epoch}:%{version}-%{release}
204 Direct3D implementation DLLs for Wine (through OpenGL).
206 %description dll-d3d -l pl.UTF-8
207 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
210 Summary: OpenGL implementation DLLs for Wine
211 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
212 Group: Applications/Emulators
213 Requires: %{name} = %{epoch}:%{version}-%{release}
217 OpenGL implementation DLLs for Wine.
219 %description dll-gl -l pl.UTF-8
220 Biblioteki DLL z implementacją OpenGL dla Wine.
223 Summary: TWAIN implementation DLL for Wine
224 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
225 Group: Applications/Emulators
226 Requires: %{name} = %{epoch}:%{version}-%{release}
228 %description dll-twain
229 TWAIN implementation DLL for Wine (through SANE).
231 %description dll-twain -l pl.UTF-8
232 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
235 Summary: Win32 LDAP API DLL for Wine.
236 Group: Applications/Emulators
237 Requires: %{name} = %{epoch}:%{version}-%{release}
239 %description dll-ldap
240 Lightweight Directory Access Protocol Library.
243 Summary: ALSA driver for WINE mm.dll implementation
244 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
245 Group: Applications/Emulators
246 Requires: %{name} = %{epoch}:%{version}-%{release}
248 %description drv-alsa
249 ALSA driver for WINE mm.dll (multimedia system) implementation.
251 %description drv-alsa -l pl.UTF-8
252 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
255 %setup -q -n %{name}-%{version}
265 icotool -x --width=32 --height=32 --bit-depth=32 -o . dlls/user32/resources/oic_winlogo.ico
266 mv -f oic_winlogo_*.png %{name}.png
274 --with%{!?with_alsa:out}-alsa \
275 --with%{!?with_capi:out}-capi \
278 --with%{!?with_cups:out}-cups \
286 --with%{!?with_gstreamer:out}-gstreamer \
288 --with%{!?with_ldap:out}-ldap \
295 --with%{!?with_sane:out}-sane \
312 rm -rf $RPM_BUILD_ROOT
313 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
315 DESTDIR=$RPM_BUILD_ROOT
317 install -p tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
318 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
321 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
322 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
323 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
324 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
325 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
327 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
328 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
329 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
331 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
335 waveaudio=mciwave.drv
337 videodisc=mcipionr.drv
342 %if %{?debug:0}%{!?debug:1}
343 echo "Strip executable binaries and shared object files."
344 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
345 elfexelist=`echo $filelist | xargs -r file | \
346 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
347 elfsharedlist=`echo $filelist | xargs -r file | \
348 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
349 if [ -n "$elfexelist" ]; then \
350 strip -R .note -R .comment $elfexelist
352 if [ -n "$elfsharedlist" ]; then
353 strip --strip-unneeded -R .note -R .comment $elfsharedlist
357 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
362 cd $RPM_BUILD_ROOT%{_libdir}/wine
365 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|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
382 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
384 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
386 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
389 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
390 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
391 cp -a %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
394 rm -rf $RPM_BUILD_ROOT
398 %update_desktop_database
400 %postun -p /sbin/ldconfig
402 %triggerpostun -- wine < 1:0.9.12-1.9
403 rm -f /var/lock/subsys/wine
404 if [ -x /sbin/chkconfig ]; then
405 /sbin/chkconfig --del wine
409 %defattr(644,root,root,755)
410 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
411 %lang(de) %doc documentation/README.de
412 %lang(es) %doc documentation/README.es
413 %lang(fr) %doc documentation/README.fr
414 %lang(hu) %doc documentation/README.hu
415 %lang(it) %doc documentation/README.it
416 %lang(ko) %doc documentation/README.ko
417 %lang(nb) %doc documentation/README.no
418 %lang(pt) %doc documentation/README.pt
419 %lang(pt_BR) %doc documentation/README.pt_br
420 %lang(ru) %doc documentation/README.ru
421 %lang(sv) %doc documentation/README.sv
422 %lang(tr) %doc documentation/README.tr
423 %attr(755,root,root) %{_bindir}/msiexec
425 %attr(755,root,root) %{_bindir}/wine
427 %attr(755,root,root) %{_bindir}/wine64
429 %attr(755,root,root) %{_bindir}/wineboot
430 %attr(755,root,root) %{_bindir}/winedbg
431 %attr(755,root,root) %{_bindir}/winecfg
433 %attr(755,root,root) %{_bindir}/wine-preloader
435 %attr(755,root,root) %{_bindir}/wine64-preloader
437 %attr(755,root,root) %{_bindir}/wineserver
438 %attr(755,root,root) %{_libdir}/*.so*
440 %dir %{_libdir}/wine/fakedlls
441 %{_libdir}/wine/fakedlls/*.acm
442 %{_libdir}/wine/fakedlls/*.cpl
443 %{_libdir}/wine/fakedlls/*.dll
445 %{_libdir}/wine/fakedlls/*.dll16
447 %{_libdir}/wine/fakedlls/*.drv
449 %{_libdir}/wine/fakedlls/*.drv16
451 %{_libdir}/wine/fakedlls/*.ds
452 %{_libdir}/wine/fakedlls/*.exe
454 %{_libdir}/wine/fakedlls/*.exe16
455 %{_libdir}/wine/fakedlls/*.mod16
457 %{_libdir}/wine/fakedlls/*.ocx
458 %{_libdir}/wine/fakedlls/*.sys
459 %{_libdir}/wine/fakedlls/*.tlb
461 %{_libdir}/wine/fakedlls/*.vxd
463 %{_mandir}/man1/wine.1*
464 %lang(de) %{_mandir}/de/man1/wine*.1*
465 %lang(fr) %{_mandir}/fr/man1/wine*.1*
466 %lang(pl) %{_mandir}/pl/man1/wine*.1*
467 %{_mandir}/man1/msiexec.1*
468 %{_mandir}/man1/wineboot.1*
469 %{_mandir}/man1/winecfg.1*
470 %{_mandir}/man1/winedbg.1*
471 %{_mandir}/man1/wineserver.1*
473 %{_desktopdir}/wine.desktop
474 %{_desktopdir}/wine-uninstaller.desktop
475 %{_pixmapsdir}/%{name}.png
477 %files programs -f files.programs
478 %defattr(644,root,root,755)
481 %defattr(644,root,root,755)
482 %attr(755,root,root) %{_bindir}/fnt2bdf
483 %attr(755,root,root) %{_bindir}/function_grep.pl
484 %attr(755,root,root) %{_bindir}/widl
485 %attr(755,root,root) %{_bindir}/winebuild
486 %attr(755,root,root) %{_bindir}/winedump
487 %attr(755,root,root) %{_bindir}/wineg++
488 %attr(755,root,root) %{_bindir}/winegcc
489 %attr(755,root,root) %{_bindir}/winemaker
490 %attr(755,root,root) %{_bindir}/winecpp
491 %attr(755,root,root) %{_bindir}/wmc
492 %attr(755,root,root) %{_bindir}/wrc
493 %{_libdir}/wine/lib*.def
494 # no shared variants, so not separated
495 %{_libdir}/wine/lib*.def.a
496 %{_libdir}/wine/libadsiid.a
497 %{_libdir}/wine/libdx*.a
498 %{_libdir}/wine/libstrmbase.a
499 %{_libdir}/wine/libstrmiids.a
500 %{_libdir}/wine/libuuid.a
501 %{_libdir}/wine/libwinecrt0.a
503 %{_mandir}/man1/widl.1*
504 %{_mandir}/man1/winebuild.1*
505 %{_mandir}/man1/winecpp.1*
506 %{_mandir}/man1/winedump.1*
507 %{_mandir}/man1/winegcc.1*
508 %{_mandir}/man1/wineg++.1*
509 %{_mandir}/man1/winemaker.1*
510 %lang(de) %{_mandir}/de/man1/winemaker.1*
511 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
512 %{_mandir}/man1/wmc.1*
513 %{_mandir}/man1/wrc.1*
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
521 %defattr(644,root,root,755)
522 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
523 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
524 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
527 %defattr(644,root,root,755)
528 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
529 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
533 %defattr(644,root,root,755)
534 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
535 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
540 %defattr(644,root,root,755)
541 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
546 %defattr(644,root,root,755)
547 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
550 # additional dependencies in *.so not separated (yet?) from main package
551 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
552 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
553 # ttydrv.dll.so depends on ncurses