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}
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
38 Group: Applications/Emulators
39 Source0: http://downloads.sourceforge.net/wine/%{name}-%{version}.tar.bz2
40 # Source0-md5: 6594ab86a4b1fb2c09dadfb4ea7fc4af
41 Source1: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86.msi
42 # Source1-md5: 700aaa08724be1992cffed7b87e79a44
43 Source2: http://downloads.sourceforge.net/wine/%{name}_gecko-%{gecko_ver}-x86_64.msi
44 # Source2-md5: 7b4811f667fd01d300fdff68420a9c72
45 Source3: %{name}-uninstaller.desktop
46 Patch0: %{name}-fontcache.patch
47 Patch1: %{name}-makedep.patch
48 Patch2: %{name}-ncurses.patch
49 Patch4: %{name}-disable-valgrind.patch
50 Patch5: %{name}-ca_certificates.patch
51 Patch6: %{name}-manpaths.patch
53 URL: http://www.winehq.org/
54 BuildRequires: OpenAL-devel >= 1.1
55 BuildRequires: OpenGL-GLU-devel
56 %{?with_alsa:BuildRequires: alsa-lib-devel}
57 %{?with_arts:BuildRequires: artsc-devel}
58 BuildRequires: autoconf
59 BuildRequires: automake
61 %{?with_capi:BuildRequires: capi4k-utils-devel}
62 %{?with_cups:BuildRequires: cups-devel}
63 BuildRequires: docbook-dtd31-sgml
64 BuildRequires: docbook-utils
66 BuildRequires: fontconfig-devel
67 BuildRequires: fontforge
68 BuildRequires: freetype-devel >= 2.0.5
70 BuildRequires: gettext-devel
71 BuildRequires: giflib-devel
72 BuildRequires: gnutls-devel
73 %{?with_gstreamer:BuildRequires: gstreamer-plugins-base-devel}
74 BuildRequires: icoutils
75 BuildRequires: lcms-devel
76 BuildRequires: libgphoto2-devel
77 BuildRequires: libgsm-devel
78 BuildRequires: libjpeg-devel
79 BuildRequires: libmpg123-devel >= 1.5.0
80 BuildRequires: libtool
81 BuildRequires: libv4l-devel
82 BuildRequires: libxslt-devel
83 BuildRequires: ncurses-devel
84 # db2* failed previously - probably openjade or opensp bug
85 BuildRequires: libpng-devel >= 1.5
86 BuildRequires: openjade >= 1:1.3.3-0.pre1
87 %{?with_ldap:BuildRequires: openldap-devel}
88 BuildRequires: opensp >= 1:1.5.1
89 BuildRequires: openssl-devel >= 0.9.7d
90 BuildRequires: pkgconfig
91 BuildRequires: prelink
92 %{?with_sane:BuildRequires: sane-backends-devel}
93 BuildRequires: unixODBC-devel >= 2.2.12-2
94 #BuildRequires: valgrind
95 BuildRequires: xorg-lib-libXcomposite-devel
96 BuildRequires: xorg-lib-libXcursor-devel
97 BuildRequires: xorg-lib-libXi-devel
98 BuildRequires: xorg-lib-libXinerama-devel
99 BuildRequires: xorg-lib-libXmu-devel
100 BuildRequires: xorg-lib-libXrandr-devel
101 BuildRequires: xorg-lib-libXrender-devel
102 BuildRequires: xorg-lib-libXxf86dga-devel
103 BuildRequires: xorg-lib-libXxf86vm-devel
104 Requires: libfreetype.so.6%{libqual}
105 Requires: libpng15.so.15%{libqual}
106 Requires(post): /sbin/ldconfig
107 Suggests: binfmt-detector
108 Suggests: ca-certificates
110 Conflicts: ca-certificates < 20080809-4
111 # for printing needs lpr
112 Suggests: cups-clients
114 Suggests: xorg-app-xmessage
116 Suggests: samba-common >= 1:3.0.25
117 # link to wine/ntdll.dll.so, without any SONAME
118 Provides: libntdll.dll.so
119 Obsoletes: wine-doc-pdf
120 Obsoletes: wine-drv-arts
121 Obsoletes: wine-drv-jack
122 Obsoletes: wine-drv-nas
123 ExclusiveArch: %{ix86} %{x8664}
125 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
127 %define _noautoreqdep libGL.so.1 libGLU.so.1
128 %define no_install_post_strip 1
130 %define _winedir %{_datadir}/%{name}
132 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
134 %undefine debuginfocflags
137 Wine is a program which allows running Microsoft Windows programs
138 (including DOS, Windows 3.x and Win32 executables) on Unix. It
139 consists of a program loader which loads and executes a Microsoft
140 Windows binary, and a library that implements Windows API calls using
141 their Unix or X11 equivalents. The library may also be used for
142 porting Win32 code into native Unix executables.
144 %description -l es.UTF-8
145 Ejecuta programas Windows en Linux.
147 %description -l pl.UTF-8
148 Wine jest programem dzięki któremu można uruchamiać programy napisane
149 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
150 loadera, który pozwala wczytywać i uruchamiać programy w formacie
151 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
152 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
153 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
155 %description -l pt_BR.UTF-8
156 O Wine é um programa que permite rodar programas MS-Windows no X11.
157 Ele consiste de um carregador de programa, que carrega e executa um
158 binário MS-Windows, e de uma biblioteca de emulação que traduz as
159 chamadas da API para as equivalentes Unix/X11.
162 Summary: Wine - header files
163 Summary(es.UTF-8): Biblioteca de desarrollo de wine
164 Summary(pl.UTF-8): Wine - pliki nagłowkowe
165 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
166 Group: Development/Libraries
167 Requires: %{name} = %{epoch}:%{version}-%{release}
172 %description devel -l es.UTF-8
173 Biblioteca de desarrollo de wine.
175 %description devel -l pl.UTF-8
176 Wine - pliki nagłówkowe.
178 %description devel -l pt_BR.UTF-8
179 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
183 Summary: Wine - programs
184 Summary(pl.UTF-8): Wine - programy
186 Requires: %{name} = %{epoch}:%{version}-%{release}
188 %description programs
191 %description programs -l pl.UTF-8
195 Summary: CAPI 2.0 (ISDN) implementation DLLs for Wine
196 Summary(pl.UTF-8): Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
197 Group: Applications/Emulators
198 Requires: %{name} = %{epoch}:%{version}-%{release}
200 %description dll-capi
201 CAPI 2.0 (ISDN) implementation DLLs for Wine (through OpenGL).
203 %description dll-capi -l pl.UTF-8
204 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine (poprzez
208 Summary: Direct3D implementation DLLs for Wine
209 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
210 Group: Applications/Emulators
211 Requires: %{name} = %{epoch}:%{version}-%{release}
215 Direct3D implementation DLLs for Wine (through OpenGL).
217 %description dll-d3d -l pl.UTF-8
218 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
221 Summary: OpenGL implementation DLLs for Wine
222 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
223 Group: Applications/Emulators
224 Requires: %{name} = %{epoch}:%{version}-%{release}
228 OpenGL implementation DLLs for Wine.
230 %description dll-gl -l pl.UTF-8
231 Biblioteki DLL z implementacją OpenGL dla Wine.
234 Summary: TWAIN implementation DLL for Wine
235 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
236 Group: Applications/Emulators
237 Requires: %{name} = %{epoch}:%{version}-%{release}
239 %description dll-twain
240 TWAIN implementation DLL for Wine (through SANE).
242 %description dll-twain -l pl.UTF-8
243 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
246 Summary: Win32 LDAP API DLL for Wine
247 Group: Applications/Emulators
248 Requires: %{name} = %{epoch}:%{version}-%{release}
250 %description dll-ldap
251 Lightweight Directory Access Protocol Library.
254 Summary: ALSA driver for WINE mm.dll implementation
255 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
256 Group: Applications/Emulators
257 Requires: %{name} = %{epoch}:%{version}-%{release}
259 %description drv-alsa
260 ALSA driver for WINE mm.dll (multimedia system) implementation.
262 %description drv-alsa -l pl.UTF-8
263 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
276 icotool -x --width=32 --height=32 --bit-depth=32 -o . dlls/user32/resources/oic_winlogo.ico
277 mv -f oic_winlogo_*.png %{name}.png
285 --with%{!?with_alsa:out}-alsa \
286 --with%{!?with_capi:out}-capi \
289 --with%{!?with_cups:out}-cups \
297 --with%{!?with_gstreamer:out}-gstreamer \
299 --with%{!?with_ldap:out}-ldap \
306 --with%{!?with_sane:out}-sane \
323 rm -rf $RPM_BUILD_ROOT
324 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
326 DESTDIR=$RPM_BUILD_ROOT
328 findup -m $RPM_BUILD_ROOT%{_winedir}/fakedlls
330 install -p tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
331 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
334 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
335 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
336 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
337 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
338 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
340 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
341 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
342 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
344 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
348 waveaudio=mciwave.drv
350 videodisc=mcipionr.drv
355 %if %{?debug:0}%{!?debug:1}
356 echo "Strip executable binaries and shared object files."
357 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
358 elfexelist=`echo $filelist | xargs -r file | \
359 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
360 elfsharedlist=`echo $filelist | xargs -r file | \
361 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
362 if [ -n "$elfexelist" ]; then \
363 strip -R .note -R .comment $elfexelist
365 if [ -n "$elfsharedlist" ]; then
366 strip --strip-unneeded -R .note -R .comment $elfsharedlist
370 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
375 cd $RPM_BUILD_ROOT%{_libdir}/wine
378 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)
381 echo "%attr(755,root,root) %{_libdir}/wine/$f" >> $dir/files.so
386 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
387 for p in $programs; do
388 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
389 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
390 echo "%{_mandir}/man1/$p.1*" >> files.programs
391 grep -v "$p\.exe\.so$" files.so > files.so.
392 mv -f files.so. files.so
395 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
397 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
399 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
402 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
403 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
404 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
407 rm -rf $RPM_BUILD_ROOT
411 %update_desktop_database
413 %postun -p /sbin/ldconfig
415 %triggerpostun -- wine < 1:0.9.12-1.9
416 rm -f /var/lock/subsys/wine
417 if [ -x /sbin/chkconfig ]; then
418 /sbin/chkconfig --del wine
422 %defattr(644,root,root,755)
423 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
424 %lang(de) %doc documentation/README.de
425 %lang(es) %doc documentation/README.es
426 %lang(fr) %doc documentation/README.fr
427 %lang(hu) %doc documentation/README.hu
428 %lang(it) %doc documentation/README.it
429 %lang(ko) %doc documentation/README.ko
430 %lang(nb) %doc documentation/README.no
431 %lang(pt) %doc documentation/README.pt
432 %lang(pt_BR) %doc documentation/README.pt_br
433 %lang(ru) %doc documentation/README.ru
434 %lang(sv) %doc documentation/README.sv
435 %lang(tr) %doc documentation/README.tr
436 %attr(755,root,root) %{_bindir}/msiexec
438 %attr(755,root,root) %{_bindir}/wine
440 %attr(755,root,root) %{_bindir}/wine64
442 %attr(755,root,root) %{_bindir}/wineboot
443 %attr(755,root,root) %{_bindir}/winedbg
444 %attr(755,root,root) %{_bindir}/winecfg
446 %attr(755,root,root) %{_bindir}/wine-preloader
448 %attr(755,root,root) %{_bindir}/wine64-preloader
450 %attr(755,root,root) %{_bindir}/wineserver
451 %attr(755,root,root) %{_libdir}/*.so*
453 %dir %{_libdir}/wine/fakedlls
454 %{_libdir}/wine/fakedlls/*.acm
455 %{_libdir}/wine/fakedlls/*.cpl
456 %{_libdir}/wine/fakedlls/*.dll
458 %{_libdir}/wine/fakedlls/*.dll16
460 %{_libdir}/wine/fakedlls/*.drv
462 %{_libdir}/wine/fakedlls/*.drv16
464 %{_libdir}/wine/fakedlls/*.ds
465 %{_libdir}/wine/fakedlls/*.exe
467 %{_libdir}/wine/fakedlls/*.exe16
468 %{_libdir}/wine/fakedlls/*.mod16
470 %{_libdir}/wine/fakedlls/*.ocx
471 %{_libdir}/wine/fakedlls/*.sys
472 %{_libdir}/wine/fakedlls/*.tlb
474 %{_libdir}/wine/fakedlls/*.vxd
476 %{_mandir}/man1/wine.1*
477 %lang(de) %{_mandir}/de/man1/wine*.1*
478 %lang(fr) %{_mandir}/fr/man1/wine*.1*
479 #%lang(pl) %{_mandir}/pl/man1/wine*.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*
486 %{_desktopdir}/wine.desktop
487 %{_desktopdir}/wine-uninstaller.desktop
488 %{_pixmapsdir}/%{name}.png
490 %files programs -f files.programs
491 %defattr(644,root,root,755)
494 %defattr(644,root,root,755)
495 %attr(755,root,root) %{_bindir}/fnt2bdf
496 %attr(755,root,root) %{_bindir}/function_grep.pl
497 %attr(755,root,root) %{_bindir}/widl
498 %attr(755,root,root) %{_bindir}/winebuild
499 %attr(755,root,root) %{_bindir}/winedump
500 %attr(755,root,root) %{_bindir}/wineg++
501 %attr(755,root,root) %{_bindir}/winegcc
502 %attr(755,root,root) %{_bindir}/winemaker
503 %attr(755,root,root) %{_bindir}/winecpp
504 %attr(755,root,root) %{_bindir}/wmc
505 %attr(755,root,root) %{_bindir}/wrc
506 %{_libdir}/wine/lib*.def
507 # no shared variants, so not separated
508 %{_libdir}/wine/lib*.def.a
509 %{_libdir}/wine/libadsiid.a
510 %{_libdir}/wine/libdx*.a
511 %{_libdir}/wine/libstrmbase.a
512 %{_libdir}/wine/libstrmiids.a
513 %{_libdir}/wine/libuuid.a
514 %{_libdir}/wine/libwinecrt0.a
516 %{_mandir}/man1/widl.1*
517 %{_mandir}/man1/winebuild.1*
518 %{_mandir}/man1/winecpp.1*
519 %{_mandir}/man1/winedump.1*
520 %{_mandir}/man1/winegcc.1*
521 %{_mandir}/man1/wineg++.1*
522 %{_mandir}/man1/winemaker.1*
523 %lang(de) %{_mandir}/de/man1/winemaker.1*
524 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
525 %{_mandir}/man1/wmc.1*
526 %{_mandir}/man1/wrc.1*
530 %defattr(644,root,root,755)
531 %attr(755,root,root) %{_libdir}/wine/capi2032.dll.so
534 %defattr(644,root,root,755)
535 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
536 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
537 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
540 %defattr(644,root,root,755)
541 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
542 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
546 %defattr(644,root,root,755)
547 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
548 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
553 %defattr(644,root,root,755)
554 %attr(755,root,root) %{_libdir}/wine/wldap*.dll.so
559 %defattr(644,root,root,755)
560 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
563 # additional dependencies in *.so not separated (yet?) from main package
564 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
565 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
566 # ttydrv.dll.so depends on ncurses