3 %bcond_without alsa # don't build ALSA mm driver
4 %bcond_with esd # build ESD mm driver
5 %bcond_without jack # don't build JACK mm driver
6 %bcond_without nas # don't build NAS mm driver
7 %bcond_without sane # don't build TWAIN DLL with scanning support (through SANE)
8 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
11 # - support for CAPI (ISDN support; --with-capi)
13 # NOTE: wine detects the following SONAMES for dlopen at build time:
14 # libcrypto,libssl (wininet.dll)
15 # libcups (winspool.dll.so,wineps.dll.so)
16 # libcurses/libncurses (wineconsole program)
17 # libfontconfig (gdi32.dll.so)
18 # libfreetype (wineps.dll.so,gdi32.dll.so)
19 # libGL (x11drv.dll.so,ddraw.dll.so)
20 # libjack (winejack.drv.so - explicit dependency in subpackage)
21 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
22 # thus requires rebuild after change of any of the above.
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://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
40 # Source0-md5: eb4e5423b277fc1e77807b04f366f7b7
41 Source1: http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab
42 # Source1-md5: 9c5c335fc077c0558561afaf25a09e51
43 Source2: %{name}-uninstaller.desktop
44 Patch0: %{name}-fontcache.patch
45 Patch1: %{name}-makedep.patch
46 Patch2: %{name}-ncurses.patch
47 Patch4: %{name}-disable-valgrind.patch
48 Patch5: %{name}-ca_certificates.patch
49 Patch6: %{name}-notarget.patch
50 Patch7: %{name}-manpaths.patch
51 #PatchX: %{name}-dga.patch
52 URL: http://www.winehq.org/
53 BuildRequires: OpenAL-devel >= 1.1
54 BuildRequires: OpenGL-GLU-devel
55 %{?with_alsa:BuildRequires: alsa-lib-devel}
56 %{?with_arts:BuildRequires: artsc-devel}
57 BuildRequires: autoconf
58 BuildRequires: automake
60 %{?with_cups:BuildRequires: cups-devel}
61 BuildRequires: docbook-dtd31-sgml
62 BuildRequires: docbook-utils
63 %{?with_esd:BuildRequires: esound-devel}
65 BuildRequires: fontconfig-devel
66 BuildRequires: fontforge
67 BuildRequires: freetype-devel >= 2.0.5
68 BuildRequires: giflib-devel
69 BuildRequires: gnutls-devel
70 BuildRequires: hal-devel
71 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
72 BuildRequires: lcms-devel
73 BuildRequires: libgphoto2-devel
74 BuildRequires: libgsm-devel
75 BuildRequires: libjpeg-devel
76 BuildRequires: libmpg123-devel >= 1.5.0
77 BuildRequires: libtool
78 BuildRequires: libv4l-devel
79 BuildRequires: libxslt-devel
80 %{?with_nas:BuildRequires: nas-devel}
81 BuildRequires: ncurses-devel
82 # db2* failed previously - probably openjade or opensp bug
83 BuildRequires: openjade >= 1:1.3.3-0.pre1
84 BuildRequires: openldap-devel
85 BuildRequires: opensp >= 1:1.5.1
86 BuildRequires: openssl-devel >= 0.9.7d
87 BuildRequires: pkgconfig
88 %{?with_sane:BuildRequires: sane-backends-devel}
89 BuildRequires: unixODBC-devel >= 2.2.12-2
90 #BuildRequires: valgrind
91 BuildRequires: xorg-lib-libXcomposite-devel
92 BuildRequires: xorg-lib-libXcursor-devel
93 BuildRequires: xorg-lib-libXi-devel
94 BuildRequires: xorg-lib-libXinerama-devel
95 BuildRequires: xorg-lib-libXmu-devel
96 BuildRequires: xorg-lib-libXrandr-devel
97 BuildRequires: xorg-lib-libXrender-devel
98 BuildRequires: xorg-lib-libXxf86dga-devel
99 BuildRequires: xorg-lib-libXxf86vm-devel
100 Requires: libfreetype.so.6
101 Suggests: binfmt-detector
102 Suggests: ca-certificates
103 Conflicts: ca-certificates < 20080809-4
104 # for printing needs lpr
105 Suggests: cups-clients
107 Suggests: xorg-app-xmessage
109 Suggests: samba-common >= 1:3.0.25
110 # link to wine/ntdll.dll.so, without any SONAME
111 Provides: libntdll.dll.so
112 Obsoletes: wine-doc-pdf
113 Obsoletes: wine-drv-arts
114 ExclusiveArch: %{ix86}
116 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
118 %define _noautoreqdep libGL.so.1 libGLU.so.1
119 %define no_install_post_strip 1
121 %define _winedir %{_datadir}/%{name}
123 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
125 %undefine debuginfocflags
128 Wine is a program which allows running Microsoft Windows programs
129 (including DOS, Windows 3.x and Win32 executables) on Unix. It
130 consists of a program loader which loads and executes a Microsoft
131 Windows binary, and a library that implements Windows API calls using
132 their Unix or X11 equivalents. The library may also be used for
133 porting Win32 code into native Unix executables.
135 %description -l es.UTF-8
136 Ejecuta programas Windows en Linux.
138 %description -l pl.UTF-8
139 Wine jest programem dzięki któremu można uruchamiać programy napisane
140 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
141 loadera, który pozwala wczytywać i uruchamiać programy w formacie
142 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
143 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
144 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
146 %description -l pt_BR.UTF-8
147 O Wine é um programa que permite rodar programas MS-Windows no X11.
148 Ele consiste de um carregador de programa, que carrega e executa um
149 binário MS-Windows, e de uma biblioteca de emulação que traduz as
150 chamadas da API para as equivalentes Unix/X11.
153 Summary: Wine - header files
154 Summary(es.UTF-8): Biblioteca de desarrollo de wine
155 Summary(pl.UTF-8): Wine - pliki nagłowkowe
156 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
157 Group: Development/Libraries
158 Requires: %{name} = %{epoch}:%{version}-%{release}
163 %description devel -l es.UTF-8
164 Biblioteca de desarrollo de wine.
166 %description devel -l pl.UTF-8
167 Wine - pliki nagłówkowe.
169 %description devel -l pt_BR.UTF-8
170 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
174 Summary: Wine - programs
175 Summary(pl.UTF-8): Wine - programy
177 Requires: %{name} = %{epoch}:%{version}-%{release}
179 %description programs
182 %description programs -l pl.UTF-8
186 Summary: Direct3D implementation DLLs for Wine
187 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
188 Group: Applications/Emulators
189 Requires: %{name} = %{epoch}:%{version}-%{release}
193 Direct3D implementation DLLs for Wine (through OpenGL).
195 %description dll-d3d -l pl.UTF-8
196 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
199 Summary: OpenGL implementation DLLs for Wine
200 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
201 Group: Applications/Emulators
202 Requires: %{name} = %{epoch}:%{version}-%{release}
206 OpenGL implementation DLLs for Wine.
208 %description dll-gl -l pl.UTF-8
209 Biblioteki DLL z implementacją OpenGL dla Wine.
212 Summary: TWAIN implementation DLL for Wine
213 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
214 Group: Applications/Emulators
215 Requires: %{name} = %{epoch}:%{version}-%{release}
217 %description dll-twain
218 TWAIN implementation DLL for Wine (through SANE).
220 %description dll-twain -l pl.UTF-8
221 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
224 Summary: ALSA driver for WINE mm.dll implementation
225 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
226 Group: Applications/Emulators
227 Requires: %{name} = %{epoch}:%{version}-%{release}
229 %description drv-alsa
230 ALSA driver for WINE mm.dll (multimedia system) implementation.
232 %description drv-alsa -l pl.UTF-8
233 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
236 Summary: JACK driver for WINE mm.dll implementation
237 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
238 Group: Applications/Emulators
239 Requires: %{name} = %{epoch}:%{version}-%{release}
240 Requires: jack-audio-connection-kit
241 # dlopened by SONAME detected at build time
242 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
244 %description drv-jack
245 JACK driver for WINE mm.dll (multimedia system) implementation.
247 %description drv-jack -l pl.UTF-8
248 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
252 Summary: NAS driver for WINE mm.dll implementation
253 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
254 Group: Applications/Emulators
255 Requires: %{name} = %{epoch}:%{version}-%{release}
258 NAS driver for WINE mm.dll (multimedia system) implementation.
260 %description drv-nas -l pl.UTF-8
261 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
277 --with%{!?with_alsa:out}-alsa \
282 --with%{!?with_cups:out}-cups \
284 --with%{!?with_esd:out}-esd \
292 --with%{!?with_jack:out}-jack \
296 --with%{!?with_nas:out}-nas \
302 --with%{!?with_sane:out}-sane \
319 rm -rf $RPM_BUILD_ROOT
320 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
323 DESTDIR=$RPM_BUILD_ROOT
325 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
327 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
330 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
331 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
332 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
333 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
334 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
336 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
337 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
338 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
340 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
344 waveaudio=mciwave.drv
346 videodisc=mcipionr.drv
351 %if %{?debug:0}%{!?debug:1}
352 echo "Strip executable binaries and shared object files."
353 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
354 elfexelist=`echo $filelist | xargs -r file | \
355 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
356 elfsharedlist=`echo $filelist | xargs -r file | \
357 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
358 if [ -n "$elfexelist" ]; then \
359 strip -R .note -R .comment $elfexelist
361 if [ -n "$elfsharedlist" ]; then
362 strip --strip-unneeded -R .note -R .comment $elfsharedlist
366 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
368 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
371 rm -f files.so; touch files.so
372 rm -f files.programs; touch files.programs
373 cd $RPM_BUILD_ROOT%{_libdir}/wine
376 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|winejack.drv.so|winenas.drv.so)
379 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
383 for p in $programs; do
384 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
385 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
386 grep -v "$p\.exe\.so$" files.so > files.so.
387 mv -f files.so. files.so
390 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
391 install %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
393 install -d $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
394 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
395 install programs/winetest/winetest.svg $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
398 rm -rf $RPM_BUILD_ROOT
400 %post -p /sbin/ldconfig
401 %postun -p /sbin/ldconfig
403 %triggerpostun -- wine < 1:0.9.12-1.9
404 rm -f /var/lock/subsys/wine
405 if [ -x /sbin/chkconfig ]; then
406 /sbin/chkconfig --del wine
410 %defattr(644,root,root,755)
411 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
412 %lang(de) %doc documentation/README.de
413 %lang(es) %doc documentation/README.es
414 %lang(fr) %doc documentation/README.fr
415 %lang(hu) %doc documentation/README.hu
416 %lang(it) %doc documentation/README.it
417 %lang(ko) %doc documentation/README.ko
418 %lang(nb) %doc documentation/README.no
419 %lang(pt) %doc documentation/README.pt
420 %lang(pt_BR) %doc documentation/README.pt_br
421 %lang(ru) %doc documentation/README.ru
422 %lang(sv) %doc documentation/README.sv
423 %lang(tr) %doc documentation/README.tr
424 %attr(755,root,root) %{_bindir}/msiexec
425 %attr(755,root,root) %{_bindir}/wine
426 %attr(755,root,root) %{_bindir}/wineboot
427 %attr(755,root,root) %{_bindir}/winedbg
428 %attr(755,root,root) %{_bindir}/winecfg
429 %attr(755,root,root) %{_bindir}/wine-preloader
430 %attr(755,root,root) %{_bindir}/wineserver
431 %attr(755,root,root) %{_libdir}/*.so*
433 %dir %{_libdir}/wine/fakedlls
434 %{_libdir}/wine/fakedlls/*.acm
435 %{_libdir}/wine/fakedlls/*.cpl
436 %{_libdir}/wine/fakedlls/*.dll
437 %{_libdir}/wine/fakedlls/*.dll16
438 %{_libdir}/wine/fakedlls/*.drv
439 %{_libdir}/wine/fakedlls/*.drv16
440 %{_libdir}/wine/fakedlls/*.ds
441 %{_libdir}/wine/fakedlls/*.exe
442 %{_libdir}/wine/fakedlls/*.exe16
443 %{_libdir}/wine/fakedlls/*.mod16
444 %{_libdir}/wine/fakedlls/*.ocx
445 %{_libdir}/wine/fakedlls/*.sys
446 %{_libdir}/wine/fakedlls/*.tlb
447 %{_libdir}/wine/fakedlls/*.vxd
448 %{_mandir}/man1/wine.1*
449 %lang(de) %{_mandir}/de/man1/wine.1*
450 %lang(fr) %{_mandir}/fr/man1/wine.1*
451 %{_mandir}/man1/winedbg.1*
452 %{_mandir}/man1/wineserver.1*
453 %lang(de) %{_mandir}/de/man1/wineserver.1*
454 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
456 %{_desktopdir}/wine.desktop
457 %{_desktopdir}/wine-uninstaller.desktop
458 %{_pixmapsdir}/wine.svg
460 %files programs -f files.programs
461 %defattr(644,root,root,755)
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_bindir}/fnt2bdf
466 %attr(755,root,root) %{_bindir}/function_grep.pl
467 %attr(755,root,root) %{_bindir}/widl
468 %attr(755,root,root) %{_bindir}/winebuild
469 %attr(755,root,root) %{_bindir}/winedump
470 %attr(755,root,root) %{_bindir}/wineg++
471 %attr(755,root,root) %{_bindir}/winegcc
472 %attr(755,root,root) %{_bindir}/winemaker
473 %attr(755,root,root) %{_bindir}/winecpp
474 %attr(755,root,root) %{_bindir}/wmc
475 %attr(755,root,root) %{_bindir}/wrc
476 %{_libdir}/wine/lib*.def
477 # no shared variants, so not separated
478 %{_libdir}/wine/lib*.def.a
479 %{_libdir}/wine/libadsiid.a
480 %{_libdir}/wine/libdx*.a
481 %{_libdir}/wine/libstrmiids.a
482 %{_libdir}/wine/libuuid.a
483 %{_libdir}/wine/libwinecrt0.a
485 %{_mandir}/man1/widl.1*
486 %{_mandir}/man1/winebuild.1*
487 %{_mandir}/man1/winedump.1*
488 %{_mandir}/man1/winegcc.1*
489 %{_mandir}/man1/wineg++.1*
490 %{_mandir}/man1/winemaker.1*
491 %lang(de) %{_mandir}/de/man1/winemaker.1*
492 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
493 %{_mandir}/man1/wmc.1*
494 %{_mandir}/man1/wrc.1*
498 %defattr(644,root,root,755)
499 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
500 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
501 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
504 %defattr(644,root,root,755)
505 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
506 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
510 %defattr(644,root,root,755)
511 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
512 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
523 %defattr(644,root,root,755)
524 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
529 %defattr(644,root,root,755)
530 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
533 # additional dependencies in *.so not separated (yet?) from main package
534 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
535 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
536 # ttydrv.dll.so depends on ncurses