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.
30 Summary: Program that lets you launch Win applications
31 Summary(es.UTF-8): Ejecuta programas Windows en Linux
32 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
33 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
39 Group: Applications/Emulators
40 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}-%{_rc}.tar.bz2
41 # Source0-md5: 761eaf2174aa1fff0b75059abf482e2f
42 Source1: %{name}-uninstaller.desktop
43 Patch0: %{name}-fontcache.patch
44 Patch1: %{name}-makedep.patch
45 Patch2: %{name}-ncurses.patch
46 Patch4: %{name}-disable-valgrind.patch
47 Patch5: %{name}-ca_certificates.patch
48 Patch6: %{name}-notarget.patch
49 Patch7: %{name}-manpaths.patch
50 #PatchX: %{name}-dga.patch
51 URL: http://www.winehq.org/
52 BuildRequires: OpenAL-devel >= 1.1
53 BuildRequires: OpenGL-GLU-devel
54 %{?with_alsa:BuildRequires: alsa-lib-devel}
55 %{?with_arts:BuildRequires: artsc-devel}
56 BuildRequires: autoconf
57 BuildRequires: automake
59 %{?with_cups:BuildRequires: cups-devel}
60 BuildRequires: docbook-dtd31-sgml
61 BuildRequires: docbook-utils
62 %{?with_esd:BuildRequires: esound-devel}
64 BuildRequires: fontconfig-devel
65 BuildRequires: fontforge
66 BuildRequires: freetype-devel >= 2.0.5
67 BuildRequires: giflib-devel
68 BuildRequires: gnutls-devel
69 BuildRequires: hal-devel
70 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
71 BuildRequires: lcms-devel
72 BuildRequires: libgphoto2-devel
73 BuildRequires: libgsm-devel
74 BuildRequires: libjpeg-devel
75 BuildRequires: libmpg123-devel >= 1.5.0
76 BuildRequires: libtool
77 BuildRequires: libv4l-devel
78 BuildRequires: libxslt-devel
79 %{?with_nas:BuildRequires: nas-devel}
80 BuildRequires: ncurses-devel
81 # db2* failed previously - probably openjade or opensp bug
82 BuildRequires: openjade >= 1:1.3.3-0.pre1
83 BuildRequires: openldap-devel
84 BuildRequires: opensp >= 1:1.5.1
85 BuildRequires: openssl-devel >= 0.9.7d
86 BuildRequires: pkgconfig
87 %{?with_sane:BuildRequires: sane-backends-devel}
88 BuildRequires: unixODBC-devel >= 2.2.12-2
89 #BuildRequires: valgrind
90 BuildRequires: xorg-lib-libXcomposite-devel
91 BuildRequires: xorg-lib-libXcursor-devel
92 BuildRequires: xorg-lib-libXi-devel
93 BuildRequires: xorg-lib-libXinerama-devel
94 BuildRequires: xorg-lib-libXmu-devel
95 BuildRequires: xorg-lib-libXrandr-devel
96 BuildRequires: xorg-lib-libXrender-devel
97 BuildRequires: xorg-lib-libXxf86dga-devel
98 BuildRequires: xorg-lib-libXxf86vm-devel
99 Requires: libfreetype.so.6
100 Suggests: binfmt-detector
101 Suggests: ca-certificates
102 Conflicts: ca-certificates < 20080809-4
103 # for printing needs lpr
104 Suggests: cups-clients
106 Suggests: xorg-app-xmessage
108 Suggests: samba-common >= 1:3.0.25
109 # link to wine/ntdll.dll.so, without any SONAME
110 Provides: libntdll.dll.so
111 Obsoletes: wine-doc-pdf
112 Obsoletes: wine-drv-arts
113 ExclusiveArch: %{ix86}
115 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
117 %define _noautoreqdep libGL.so.1 libGLU.so.1
118 %define no_install_post_strip 1
120 %define _winedir %{_datadir}/%{name}
122 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
124 %undefine debuginfocflags
127 Wine is a program which allows running Microsoft Windows programs
128 (including DOS, Windows 3.x and Win32 executables) on Unix. It
129 consists of a program loader which loads and executes a Microsoft
130 Windows binary, and a library that implements Windows API calls using
131 their Unix or X11 equivalents. The library may also be used for
132 porting Win32 code into native Unix executables.
134 %description -l es.UTF-8
135 Ejecuta programas Windows en Linux.
137 %description -l pl.UTF-8
138 Wine jest programem dzięki któremu można uruchamiać programy napisane
139 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
140 loadera, który pozwala wczytywać i uruchamiać programy w formacie
141 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
142 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
143 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
145 %description -l pt_BR.UTF-8
146 O Wine é um programa que permite rodar programas MS-Windows no X11.
147 Ele consiste de um carregador de programa, que carrega e executa um
148 binário MS-Windows, e de uma biblioteca de emulação que traduz as
149 chamadas da API para as equivalentes Unix/X11.
152 Summary: Wine - header files
153 Summary(es.UTF-8): Biblioteca de desarrollo de wine
154 Summary(pl.UTF-8): Wine - pliki nagłowkowe
155 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
156 Group: Development/Libraries
157 Requires: %{name} = %{epoch}:%{version}-%{release}
162 %description devel -l es.UTF-8
163 Biblioteca de desarrollo de wine.
165 %description devel -l pl.UTF-8
166 Wine - pliki nagłówkowe.
168 %description devel -l pt_BR.UTF-8
169 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
173 Summary: Wine - programs
174 Summary(pl.UTF-8): Wine - programy
176 Requires: %{name} = %{epoch}:%{version}-%{release}
178 %description programs
181 %description programs -l pl.UTF-8
185 Summary: Direct3D implementation DLLs for Wine
186 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
187 Group: Applications/Emulators
188 Requires: %{name} = %{epoch}:%{version}-%{release}
192 Direct3D implementation DLLs for Wine (through OpenGL).
194 %description dll-d3d -l pl.UTF-8
195 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
198 Summary: OpenGL implementation DLLs for Wine
199 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
200 Group: Applications/Emulators
201 Requires: %{name} = %{epoch}:%{version}-%{release}
205 OpenGL implementation DLLs for Wine.
207 %description dll-gl -l pl.UTF-8
208 Biblioteki DLL z implementacją OpenGL dla Wine.
211 Summary: TWAIN implementation DLL for Wine
212 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
213 Group: Applications/Emulators
214 Requires: %{name} = %{epoch}:%{version}-%{release}
216 %description dll-twain
217 TWAIN implementation DLL for Wine (through SANE).
219 %description dll-twain -l pl.UTF-8
220 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
223 Summary: ALSA driver for WINE mm.dll implementation
224 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
225 Group: Applications/Emulators
226 Requires: %{name} = %{epoch}:%{version}-%{release}
228 %description drv-alsa
229 ALSA driver for WINE mm.dll (multimedia system) implementation.
231 %description drv-alsa -l pl.UTF-8
232 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
235 Summary: JACK driver for WINE mm.dll implementation
236 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
237 Group: Applications/Emulators
238 Requires: %{name} = %{epoch}:%{version}-%{release}
239 Requires: jack-audio-connection-kit
240 # dlopened by SONAME detected at build time
241 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
243 %description drv-jack
244 JACK driver for WINE mm.dll (multimedia system) implementation.
246 %description drv-jack -l pl.UTF-8
247 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
251 Summary: NAS driver for WINE mm.dll implementation
252 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
253 Group: Applications/Emulators
254 Requires: %{name} = %{epoch}:%{version}-%{release}
257 NAS driver for WINE mm.dll (multimedia system) implementation.
259 %description drv-nas -l pl.UTF-8
260 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
263 %setup -q -n %{name}-%{version}-%{_rc}
276 --with%{!?with_alsa:out}-alsa \
281 --with%{!?with_cups:out}-cups \
283 --with%{!?with_esd:out}-esd \
291 --with%{!?with_jack:out}-jack \
295 --with%{!?with_nas:out}-nas \
301 --with%{!?with_sane:out}-sane \
318 rm -rf $RPM_BUILD_ROOT
319 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
322 DESTDIR=$RPM_BUILD_ROOT
324 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
326 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
329 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
330 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
331 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
332 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
333 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
335 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
336 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
337 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
339 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
343 waveaudio=mciwave.drv
345 videodisc=mcipionr.drv
350 %if %{?debug:0}%{!?debug:1}
351 echo "Strip executable binaries and shared object files."
352 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
353 elfexelist=`echo $filelist | xargs -r file | \
354 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
355 elfsharedlist=`echo $filelist | xargs -r file | \
356 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
357 if [ -n "$elfexelist" ]; then \
358 strip -R .note -R .comment $elfexelist
360 if [ -n "$elfsharedlist" ]; then
361 strip --strip-unneeded -R .note -R .comment $elfsharedlist
365 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
367 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
370 rm -f files.so; touch files.so
371 rm -f files.programs; touch files.programs
372 cd $RPM_BUILD_ROOT%{_libdir}/wine
375 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)
378 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
382 for p in $programs; do
383 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
384 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
385 grep -v "$p\.exe\.so$" files.so > files.so.
386 mv -f files.so. files.so
389 install -d $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
390 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
391 install programs/winetest/winetest.svg $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
394 rm -rf $RPM_BUILD_ROOT
396 %post -p /sbin/ldconfig
397 %postun -p /sbin/ldconfig
399 %triggerpostun -- wine < 1:0.9.12-1.9
400 rm -f /var/lock/subsys/wine
401 if [ -x /sbin/chkconfig ]; then
402 /sbin/chkconfig --del wine
406 %defattr(644,root,root,755)
407 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
408 %lang(de) %doc documentation/README.de
409 %lang(es) %doc documentation/README.es
410 %lang(fr) %doc documentation/README.fr
411 %lang(hu) %doc documentation/README.hu
412 %lang(it) %doc documentation/README.it
413 %lang(ko) %doc documentation/README.ko
414 %lang(nb) %doc documentation/README.no
415 %lang(pt) %doc documentation/README.pt
416 %lang(pt_BR) %doc documentation/README.pt_br
417 %lang(ru) %doc documentation/README.ru
418 %lang(sv) %doc documentation/README.sv
419 %lang(tr) %doc documentation/README.tr
420 %attr(755,root,root) %{_bindir}/msiexec
421 %attr(755,root,root) %{_bindir}/wine
422 %attr(755,root,root) %{_bindir}/wineboot
423 %attr(755,root,root) %{_bindir}/winedbg
424 %attr(755,root,root) %{_bindir}/winecfg
425 %attr(755,root,root) %{_bindir}/wine-preloader
426 %attr(755,root,root) %{_bindir}/wineserver
427 %attr(755,root,root) %{_libdir}/*.so*
429 %dir %{_libdir}/wine/fakedlls
430 %{_libdir}/wine/fakedlls/*.acm
431 %{_libdir}/wine/fakedlls/*.cpl
432 %{_libdir}/wine/fakedlls/*.dll
433 %{_libdir}/wine/fakedlls/*.dll16
434 %{_libdir}/wine/fakedlls/*.drv
435 %{_libdir}/wine/fakedlls/*.drv16
436 %{_libdir}/wine/fakedlls/*.ds
437 %{_libdir}/wine/fakedlls/*.exe
438 %{_libdir}/wine/fakedlls/*.exe16
439 %{_libdir}/wine/fakedlls/*.mod16
440 %{_libdir}/wine/fakedlls/*.ocx
441 %{_libdir}/wine/fakedlls/*.sys
442 %{_libdir}/wine/fakedlls/*.tlb
443 %{_libdir}/wine/fakedlls/*.vxd
444 %{_mandir}/man1/wine.1*
445 %lang(de) %{_mandir}/de/man1/wine.1*
446 %lang(fr) %{_mandir}/fr/man1/wine.1*
447 %{_mandir}/man1/winedbg.1*
448 %{_mandir}/man1/wineserver.1*
449 %lang(de) %{_mandir}/de/man1/wineserver.1*
450 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
452 %{_desktopdir}/wine.desktop
453 %{_desktopdir}/wine-uninstaller.desktop
454 %{_pixmapsdir}/wine.svg
456 %files programs -f files.programs
457 %defattr(644,root,root,755)
460 %defattr(644,root,root,755)
461 %attr(755,root,root) %{_bindir}/fnt2bdf
462 %attr(755,root,root) %{_bindir}/function_grep.pl
463 %attr(755,root,root) %{_bindir}/widl
464 %attr(755,root,root) %{_bindir}/winebuild
465 %attr(755,root,root) %{_bindir}/winedump
466 %attr(755,root,root) %{_bindir}/wineg++
467 %attr(755,root,root) %{_bindir}/winegcc
468 %attr(755,root,root) %{_bindir}/winemaker
469 %attr(755,root,root) %{_bindir}/winecpp
470 %attr(755,root,root) %{_bindir}/wmc
471 %attr(755,root,root) %{_bindir}/wrc
472 %{_libdir}/wine/lib*.def
473 # no shared variants, so not separated
474 %{_libdir}/wine/lib*.def.a
475 %{_libdir}/wine/libadsiid.a
476 %{_libdir}/wine/libdx*.a
477 %{_libdir}/wine/libstrmiids.a
478 %{_libdir}/wine/libuuid.a
479 %{_libdir}/wine/libwinecrt0.a
481 %{_mandir}/man1/widl.1*
482 %{_mandir}/man1/winebuild.1*
483 %{_mandir}/man1/winedump.1*
484 %{_mandir}/man1/winegcc.1*
485 %{_mandir}/man1/wineg++.1*
486 %{_mandir}/man1/winemaker.1*
487 %lang(de) %{_mandir}/de/man1/winemaker.1*
488 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
489 %{_mandir}/man1/wmc.1*
490 %{_mandir}/man1/wrc.1*
494 %defattr(644,root,root,755)
495 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
496 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
497 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
500 %defattr(644,root,root,755)
501 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
502 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
506 %defattr(644,root,root,755)
507 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
508 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
513 %defattr(644,root,root,755)
514 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
519 %defattr(644,root,root,755)
520 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
525 %defattr(644,root,root,755)
526 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
529 # additional dependencies in *.so not separated (yet?) from main package
530 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
531 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
532 # ttydrv.dll.so depends on ncurses