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: %{name}-uninstaller.desktop
42 Patch0: %{name}-fontcache.patch
43 Patch1: %{name}-makedep.patch
44 Patch2: %{name}-ncurses.patch
45 Patch4: %{name}-disable-valgrind.patch
46 Patch5: %{name}-ca_certificates.patch
47 Patch6: %{name}-notarget.patch
48 Patch7: %{name}-manpaths.patch
49 #PatchX: %{name}-dga.patch
50 URL: http://www.winehq.org/
51 BuildRequires: OpenAL-devel >= 1.1
52 BuildRequires: OpenGL-GLU-devel
53 %{?with_alsa:BuildRequires: alsa-lib-devel}
54 %{?with_arts:BuildRequires: artsc-devel}
55 BuildRequires: autoconf
56 BuildRequires: automake
58 %{?with_cups:BuildRequires: cups-devel}
59 BuildRequires: docbook-dtd31-sgml
60 BuildRequires: docbook-utils
61 %{?with_esd:BuildRequires: esound-devel}
63 BuildRequires: fontconfig-devel
64 BuildRequires: fontforge
65 BuildRequires: freetype-devel >= 2.0.5
66 BuildRequires: giflib-devel
67 BuildRequires: gnutls-devel
68 BuildRequires: hal-devel
69 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
70 BuildRequires: lcms-devel
71 BuildRequires: libgphoto2-devel
72 BuildRequires: libgsm-devel
73 BuildRequires: libjpeg-devel
74 BuildRequires: libmpg123-devel >= 1.5.0
75 BuildRequires: libtool
76 BuildRequires: libv4l-devel
77 BuildRequires: libxslt-devel
78 %{?with_nas:BuildRequires: nas-devel}
79 BuildRequires: ncurses-devel
80 # db2* failed previously - probably openjade or opensp bug
81 BuildRequires: openjade >= 1:1.3.3-0.pre1
82 BuildRequires: openldap-devel
83 BuildRequires: opensp >= 1:1.5.1
84 BuildRequires: openssl-devel >= 0.9.7d
85 BuildRequires: pkgconfig
86 %{?with_sane:BuildRequires: sane-backends-devel}
87 BuildRequires: unixODBC-devel >= 2.2.12-2
88 #BuildRequires: valgrind
89 BuildRequires: xorg-lib-libXcomposite-devel
90 BuildRequires: xorg-lib-libXcursor-devel
91 BuildRequires: xorg-lib-libXi-devel
92 BuildRequires: xorg-lib-libXinerama-devel
93 BuildRequires: xorg-lib-libXmu-devel
94 BuildRequires: xorg-lib-libXrandr-devel
95 BuildRequires: xorg-lib-libXrender-devel
96 BuildRequires: xorg-lib-libXxf86dga-devel
97 BuildRequires: xorg-lib-libXxf86vm-devel
98 Requires: libfreetype.so.6
99 Suggests: binfmt-detector
100 Suggests: ca-certificates
101 Conflicts: ca-certificates < 20080809-4
102 # for printing needs lpr
103 Suggests: cups-clients
105 Suggests: xorg-app-xmessage
107 Suggests: samba-common >= 1:3.0.25
108 # link to wine/ntdll.dll.so, without any SONAME
109 Provides: libntdll.dll.so
110 Obsoletes: wine-doc-pdf
111 Obsoletes: wine-drv-arts
112 ExclusiveArch: %{ix86}
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: Direct3D implementation DLLs for Wine
185 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
186 Group: Applications/Emulators
187 Requires: %{name} = %{epoch}:%{version}-%{release}
191 Direct3D implementation DLLs for Wine (through OpenGL).
193 %description dll-d3d -l pl.UTF-8
194 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
197 Summary: OpenGL implementation DLLs for Wine
198 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
199 Group: Applications/Emulators
200 Requires: %{name} = %{epoch}:%{version}-%{release}
204 OpenGL implementation DLLs for Wine.
206 %description dll-gl -l pl.UTF-8
207 Biblioteki DLL z implementacją OpenGL dla Wine.
210 Summary: TWAIN implementation DLL for Wine
211 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
212 Group: Applications/Emulators
213 Requires: %{name} = %{epoch}:%{version}-%{release}
215 %description dll-twain
216 TWAIN implementation DLL for Wine (through SANE).
218 %description dll-twain -l pl.UTF-8
219 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
222 Summary: ALSA driver for WINE mm.dll implementation
223 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
224 Group: Applications/Emulators
225 Requires: %{name} = %{epoch}:%{version}-%{release}
227 %description drv-alsa
228 ALSA driver for WINE mm.dll (multimedia system) implementation.
230 %description drv-alsa -l pl.UTF-8
231 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
234 Summary: JACK driver for WINE mm.dll implementation
235 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
236 Group: Applications/Emulators
237 Requires: %{name} = %{epoch}:%{version}-%{release}
238 Requires: jack-audio-connection-kit
239 # dlopened by SONAME detected at build time
240 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
242 %description drv-jack
243 JACK driver for WINE mm.dll (multimedia system) implementation.
245 %description drv-jack -l pl.UTF-8
246 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
250 Summary: NAS driver for WINE mm.dll implementation
251 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
252 Group: Applications/Emulators
253 Requires: %{name} = %{epoch}:%{version}-%{release}
256 NAS driver for WINE mm.dll (multimedia system) implementation.
258 %description drv-nas -l pl.UTF-8
259 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
275 --with%{!?with_alsa:out}-alsa \
280 --with%{!?with_cups:out}-cups \
282 --with%{!?with_esd:out}-esd \
290 --with%{!?with_jack:out}-jack \
294 --with%{!?with_nas:out}-nas \
300 --with%{!?with_sane:out}-sane \
317 rm -rf $RPM_BUILD_ROOT
318 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
321 DESTDIR=$RPM_BUILD_ROOT
323 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
325 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
328 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
329 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
330 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
331 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
332 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
334 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
335 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
336 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
338 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
342 waveaudio=mciwave.drv
344 videodisc=mcipionr.drv
349 %if %{?debug:0}%{!?debug:1}
350 echo "Strip executable binaries and shared object files."
351 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
352 elfexelist=`echo $filelist | xargs -r file | \
353 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
354 elfsharedlist=`echo $filelist | xargs -r file | \
355 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
356 if [ -n "$elfexelist" ]; then \
357 strip -R .note -R .comment $elfexelist
359 if [ -n "$elfsharedlist" ]; then
360 strip --strip-unneeded -R .note -R .comment $elfsharedlist
364 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
366 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
369 rm -f files.so; touch files.so
370 rm -f files.programs; touch files.programs
371 cd $RPM_BUILD_ROOT%{_libdir}/wine
374 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)
377 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
381 for p in $programs; do
382 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
383 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
384 grep -v "$p\.exe\.so$" files.so > files.so.
385 mv -f files.so. files.so
388 install -d $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
389 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
390 install programs/winetest/winetest.svg $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
393 rm -rf $RPM_BUILD_ROOT
395 %post -p /sbin/ldconfig
396 %postun -p /sbin/ldconfig
398 %triggerpostun -- wine < 1:0.9.12-1.9
399 rm -f /var/lock/subsys/wine
400 if [ -x /sbin/chkconfig ]; then
401 /sbin/chkconfig --del wine
405 %defattr(644,root,root,755)
406 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
407 %lang(de) %doc documentation/README.de
408 %lang(es) %doc documentation/README.es
409 %lang(fr) %doc documentation/README.fr
410 %lang(hu) %doc documentation/README.hu
411 %lang(it) %doc documentation/README.it
412 %lang(ko) %doc documentation/README.ko
413 %lang(nb) %doc documentation/README.no
414 %lang(pt) %doc documentation/README.pt
415 %lang(pt_BR) %doc documentation/README.pt_br
416 %lang(ru) %doc documentation/README.ru
417 %lang(sv) %doc documentation/README.sv
418 %lang(tr) %doc documentation/README.tr
419 %attr(755,root,root) %{_bindir}/msiexec
420 %attr(755,root,root) %{_bindir}/wine
421 %attr(755,root,root) %{_bindir}/wineboot
422 %attr(755,root,root) %{_bindir}/winedbg
423 %attr(755,root,root) %{_bindir}/winecfg
424 %attr(755,root,root) %{_bindir}/wine-preloader
425 %attr(755,root,root) %{_bindir}/wineserver
426 %attr(755,root,root) %{_libdir}/*.so*
428 %dir %{_libdir}/wine/fakedlls
429 %{_libdir}/wine/fakedlls/*.acm
430 %{_libdir}/wine/fakedlls/*.cpl
431 %{_libdir}/wine/fakedlls/*.dll
432 %{_libdir}/wine/fakedlls/*.dll16
433 %{_libdir}/wine/fakedlls/*.drv
434 %{_libdir}/wine/fakedlls/*.drv16
435 %{_libdir}/wine/fakedlls/*.ds
436 %{_libdir}/wine/fakedlls/*.exe
437 %{_libdir}/wine/fakedlls/*.exe16
438 %{_libdir}/wine/fakedlls/*.mod16
439 %{_libdir}/wine/fakedlls/*.ocx
440 %{_libdir}/wine/fakedlls/*.sys
441 %{_libdir}/wine/fakedlls/*.tlb
442 %{_libdir}/wine/fakedlls/*.vxd
443 %{_mandir}/man1/wine.1*
444 %lang(de) %{_mandir}/de/man1/wine.1*
445 %lang(fr) %{_mandir}/fr/man1/wine.1*
446 %{_mandir}/man1/winedbg.1*
447 %{_mandir}/man1/wineserver.1*
448 %lang(de) %{_mandir}/de/man1/wineserver.1*
449 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
451 %{_desktopdir}/wine.desktop
452 %{_desktopdir}/wine-uninstaller.desktop
453 %{_pixmapsdir}/wine.svg
455 %files programs -f files.programs
456 %defattr(644,root,root,755)
459 %defattr(644,root,root,755)
460 %attr(755,root,root) %{_bindir}/fnt2bdf
461 %attr(755,root,root) %{_bindir}/function_grep.pl
462 %attr(755,root,root) %{_bindir}/widl
463 %attr(755,root,root) %{_bindir}/winebuild
464 %attr(755,root,root) %{_bindir}/winedump
465 %attr(755,root,root) %{_bindir}/wineg++
466 %attr(755,root,root) %{_bindir}/winegcc
467 %attr(755,root,root) %{_bindir}/winemaker
468 %attr(755,root,root) %{_bindir}/winecpp
469 %attr(755,root,root) %{_bindir}/wmc
470 %attr(755,root,root) %{_bindir}/wrc
471 %{_libdir}/wine/lib*.def
472 # no shared variants, so not separated
473 %{_libdir}/wine/lib*.def.a
474 %{_libdir}/wine/libadsiid.a
475 %{_libdir}/wine/libdx*.a
476 %{_libdir}/wine/libstrmiids.a
477 %{_libdir}/wine/libuuid.a
478 %{_libdir}/wine/libwinecrt0.a
480 %{_mandir}/man1/widl.1*
481 %{_mandir}/man1/winebuild.1*
482 %{_mandir}/man1/winedump.1*
483 %{_mandir}/man1/winegcc.1*
484 %{_mandir}/man1/wineg++.1*
485 %{_mandir}/man1/winemaker.1*
486 %lang(de) %{_mandir}/de/man1/winemaker.1*
487 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
488 %{_mandir}/man1/wmc.1*
489 %{_mandir}/man1/wrc.1*
493 %defattr(644,root,root,755)
494 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
495 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
496 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
501 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
505 %defattr(644,root,root,755)
506 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
507 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
512 %defattr(644,root,root,755)
513 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
518 %defattr(644,root,root,755)
519 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
524 %defattr(644,root,root,755)
525 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
528 # additional dependencies in *.so not separated (yet?) from main package
529 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
530 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
531 # ttydrv.dll.so depends on ncurses