3 %bcond_without alsa # don't build ALSA mm driver
4 %bcond_without jack # don't build JACK mm driver
5 %bcond_without nas # don't build NAS mm driver
6 %bcond_without sane # don't build TWAIN DLL with scanning support (through SANE)
7 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
10 # - support for CAPI (ISDN support; --with-capi)
12 # NOTE: wine detects the following SONAMES for dlopen at build time:
13 # libcrypto,libssl (wininet.dll)
14 # libcups (winspool.dll.so,wineps.dll.so)
15 # libcurses/libncurses (wineconsole program)
16 # libfontconfig (gdi32.dll.so)
17 # libfreetype (wineps.dll.so,gdi32.dll.so)
18 # libGL (x11drv.dll.so,ddraw.dll.so)
19 # libjack (winejack.drv.so - explicit dependency in subpackage)
20 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
21 # thus requires rebuild after change of any of the above.
27 Summary: Program that lets you launch Win applications
28 Summary(es.UTF-8): Ejecuta programas Windows en Linux
29 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
30 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
36 Group: Applications/Emulators
37 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
38 # Source0-md5: f18649bd71b9099fecad22436d239cba
39 Source1: %{name}-uninstaller.desktop
40 Patch0: %{name}-fontcache.patch
41 Patch1: %{name}-makedep.patch
42 Patch2: %{name}-ncurses.patch
43 Patch4: %{name}-disable-valgrind.patch
44 Patch5: %{name}-ca_certificates.patch
45 Patch6: %{name}-notarget.patch
46 Patch7: %{name}-manpaths.patch
47 #PatchX: %{name}-dga.patch
48 URL: http://www.winehq.org/
49 BuildRequires: OpenAL-devel >= 1.1
50 BuildRequires: OpenGL-GLU-devel
51 %{?with_alsa:BuildRequires: alsa-lib-devel}
52 %{?with_arts:BuildRequires: artsc-devel}
53 BuildRequires: autoconf
54 BuildRequires: automake
56 %{?with_cups:BuildRequires: cups-devel}
57 BuildRequires: docbook-dtd31-sgml
58 BuildRequires: docbook-utils
60 BuildRequires: fontconfig-devel
61 BuildRequires: fontforge
62 BuildRequires: freetype-devel >= 2.0.5
63 BuildRequires: giflib-devel
64 BuildRequires: gnutls-devel
65 BuildRequires: hal-devel
66 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
67 BuildRequires: lcms-devel
68 BuildRequires: libgphoto2-devel
69 BuildRequires: libgsm-devel
70 BuildRequires: libjpeg-devel
71 BuildRequires: libmpg123-devel >= 1.5.0
72 BuildRequires: libtool
73 BuildRequires: libv4l-devel
74 BuildRequires: libxslt-devel
75 %{?with_nas:BuildRequires: nas-devel}
76 BuildRequires: ncurses-devel
77 # db2* failed previously - probably openjade or opensp bug
78 BuildRequires: openjade >= 1:1.3.3-0.pre1
79 BuildRequires: openldap-devel
80 BuildRequires: opensp >= 1:1.5.1
81 BuildRequires: openssl-devel >= 0.9.7d
82 BuildRequires: pkgconfig
83 %{?with_sane:BuildRequires: sane-backends-devel}
84 BuildRequires: unixODBC-devel >= 2.2.12-2
85 #BuildRequires: valgrind
86 BuildRequires: xorg-lib-libXcomposite-devel
87 BuildRequires: xorg-lib-libXcursor-devel
88 BuildRequires: xorg-lib-libXi-devel
89 BuildRequires: xorg-lib-libXinerama-devel
90 BuildRequires: xorg-lib-libXmu-devel
91 BuildRequires: xorg-lib-libXrandr-devel
92 BuildRequires: xorg-lib-libXrender-devel
93 BuildRequires: xorg-lib-libXxf86dga-devel
94 BuildRequires: xorg-lib-libXxf86vm-devel
95 Requires: libfreetype.so.6
96 Suggests: binfmt-detector
97 Suggests: ca-certificates
98 Conflicts: ca-certificates < 20080809-4
99 # for printing needs lpr
100 Suggests: cups-clients
102 Suggests: xorg-app-xmessage
104 Suggests: samba-common >= 1:3.0.25
105 # link to wine/ntdll.dll.so, without any SONAME
106 Provides: libntdll.dll.so
107 Obsoletes: wine-doc-pdf
108 Obsoletes: wine-drv-arts
109 ExclusiveArch: %{ix86}
111 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
113 %define _noautoreqdep libGL.so.1 libGLU.so.1
114 %define no_install_post_strip 1
116 %define _winedir %{_datadir}/%{name}
118 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
120 %undefine debuginfocflags
123 Wine is a program which allows running Microsoft Windows programs
124 (including DOS, Windows 3.x and Win32 executables) on Unix. It
125 consists of a program loader which loads and executes a Microsoft
126 Windows binary, and a library that implements Windows API calls using
127 their Unix or X11 equivalents. The library may also be used for
128 porting Win32 code into native Unix executables.
130 %description -l es.UTF-8
131 Ejecuta programas Windows en Linux.
133 %description -l pl.UTF-8
134 Wine jest programem dzięki któremu można uruchamiać programy napisane
135 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
136 loadera, który pozwala wczytywać i uruchamiać programy w formacie
137 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
138 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
139 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
141 %description -l pt_BR.UTF-8
142 O Wine é um programa que permite rodar programas MS-Windows no X11.
143 Ele consiste de um carregador de programa, que carrega e executa um
144 binário MS-Windows, e de uma biblioteca de emulação que traduz as
145 chamadas da API para as equivalentes Unix/X11.
148 Summary: Wine - header files
149 Summary(es.UTF-8): Biblioteca de desarrollo de wine
150 Summary(pl.UTF-8): Wine - pliki nagłowkowe
151 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
152 Group: Development/Libraries
153 Requires: %{name} = %{epoch}:%{version}-%{release}
158 %description devel -l es.UTF-8
159 Biblioteca de desarrollo de wine.
161 %description devel -l pl.UTF-8
162 Wine - pliki nagłówkowe.
164 %description devel -l pt_BR.UTF-8
165 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
169 Summary: Wine - programs
170 Summary(pl.UTF-8): Wine - programy
172 Requires: %{name} = %{epoch}:%{version}-%{release}
174 %description programs
177 %description programs -l pl.UTF-8
181 Summary: Direct3D implementation DLLs for Wine
182 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
183 Group: Applications/Emulators
184 Requires: %{name} = %{epoch}:%{version}-%{release}
188 Direct3D implementation DLLs for Wine (through OpenGL).
190 %description dll-d3d -l pl.UTF-8
191 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
194 Summary: OpenGL implementation DLLs for Wine
195 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
196 Group: Applications/Emulators
197 Requires: %{name} = %{epoch}:%{version}-%{release}
201 OpenGL implementation DLLs for Wine.
203 %description dll-gl -l pl.UTF-8
204 Biblioteki DLL z implementacją OpenGL dla Wine.
207 Summary: TWAIN implementation DLL for Wine
208 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
209 Group: Applications/Emulators
210 Requires: %{name} = %{epoch}:%{version}-%{release}
212 %description dll-twain
213 TWAIN implementation DLL for Wine (through SANE).
215 %description dll-twain -l pl.UTF-8
216 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
219 Summary: ALSA driver for WINE mm.dll implementation
220 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
221 Group: Applications/Emulators
222 Requires: %{name} = %{epoch}:%{version}-%{release}
224 %description drv-alsa
225 ALSA driver for WINE mm.dll (multimedia system) implementation.
227 %description drv-alsa -l pl.UTF-8
228 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
231 Summary: JACK driver for WINE mm.dll implementation
232 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
233 Group: Applications/Emulators
234 Requires: %{name} = %{epoch}:%{version}-%{release}
235 Requires: jack-audio-connection-kit
236 # dlopened by SONAME detected at build time
237 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
239 %description drv-jack
240 JACK driver for WINE mm.dll (multimedia system) implementation.
242 %description drv-jack -l pl.UTF-8
243 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
247 Summary: NAS driver for WINE mm.dll implementation
248 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
249 Group: Applications/Emulators
250 Requires: %{name} = %{epoch}:%{version}-%{release}
253 NAS driver for WINE mm.dll (multimedia system) implementation.
255 %description drv-nas -l pl.UTF-8
256 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
272 --with%{!?with_alsa:out}-alsa \
277 --with%{!?with_cups:out}-cups \
287 --with%{!?with_jack:out}-jack \
291 --with%{!?with_nas:out}-nas \
297 --with%{!?with_sane:out}-sane \
314 rm -rf $RPM_BUILD_ROOT
315 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
318 DESTDIR=$RPM_BUILD_ROOT
320 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
322 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
325 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
326 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
327 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
328 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
329 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
331 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
332 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
333 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
335 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
339 waveaudio=mciwave.drv
341 videodisc=mcipionr.drv
346 %if %{?debug:0}%{!?debug:1}
347 echo "Strip executable binaries and shared object files."
348 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
349 elfexelist=`echo $filelist | xargs -r file | \
350 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
351 elfsharedlist=`echo $filelist | xargs -r file | \
352 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
353 if [ -n "$elfexelist" ]; then \
354 strip -R .note -R .comment $elfexelist
356 if [ -n "$elfsharedlist" ]; then
357 strip --strip-unneeded -R .note -R .comment $elfsharedlist
361 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
363 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
366 rm -f files.so; touch files.so
367 rm -f files.programs; touch files.programs
368 cd $RPM_BUILD_ROOT%{_libdir}/wine
371 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)
374 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
378 for p in $programs; do
379 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
380 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
381 grep -v "$p\.exe\.so$" files.so > files.so.
382 mv -f files.so. files.so
385 install -d $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
386 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
387 install programs/winetest/winetest.svg $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
390 rm -rf $RPM_BUILD_ROOT
392 %post -p /sbin/ldconfig
393 %postun -p /sbin/ldconfig
395 %triggerpostun -- wine < 1:0.9.12-1.9
396 rm -f /var/lock/subsys/wine
397 if [ -x /sbin/chkconfig ]; then
398 /sbin/chkconfig --del wine
402 %defattr(644,root,root,755)
403 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
404 %lang(de) %doc documentation/README.de
405 %lang(es) %doc documentation/README.es
406 %lang(fr) %doc documentation/README.fr
407 %lang(hu) %doc documentation/README.hu
408 %lang(it) %doc documentation/README.it
409 %lang(ko) %doc documentation/README.ko
410 %lang(nb) %doc documentation/README.no
411 %lang(pt) %doc documentation/README.pt
412 %lang(pt_BR) %doc documentation/README.pt_br
413 %lang(ru) %doc documentation/README.ru
414 %lang(sv) %doc documentation/README.sv
415 %lang(tr) %doc documentation/README.tr
416 %attr(755,root,root) %{_bindir}/msiexec
417 %attr(755,root,root) %{_bindir}/wine
418 %attr(755,root,root) %{_bindir}/wineboot
419 %attr(755,root,root) %{_bindir}/winedbg
420 %attr(755,root,root) %{_bindir}/winecfg
421 %attr(755,root,root) %{_bindir}/wine-preloader
422 %attr(755,root,root) %{_bindir}/wineserver
423 %attr(755,root,root) %{_libdir}/*.so*
425 %dir %{_libdir}/wine/fakedlls
426 %{_libdir}/wine/fakedlls/*.acm
427 %{_libdir}/wine/fakedlls/*.cpl
428 %{_libdir}/wine/fakedlls/*.dll
429 %{_libdir}/wine/fakedlls/*.dll16
430 %{_libdir}/wine/fakedlls/*.drv
431 %{_libdir}/wine/fakedlls/*.drv16
432 %{_libdir}/wine/fakedlls/*.ds
433 %{_libdir}/wine/fakedlls/*.exe
434 %{_libdir}/wine/fakedlls/*.exe16
435 %{_libdir}/wine/fakedlls/*.mod16
436 %{_libdir}/wine/fakedlls/*.ocx
437 %{_libdir}/wine/fakedlls/*.sys
438 %{_libdir}/wine/fakedlls/*.tlb
439 %{_libdir}/wine/fakedlls/*.vxd
440 %{_mandir}/man1/wine.1*
441 %lang(de) %{_mandir}/de/man1/wine.1*
442 %lang(fr) %{_mandir}/fr/man1/wine.1*
443 %{_mandir}/man1/winedbg.1*
444 %{_mandir}/man1/wineserver.1*
445 %lang(de) %{_mandir}/de/man1/wineserver.1*
446 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
448 %{_desktopdir}/wine.desktop
449 %{_desktopdir}/wine-uninstaller.desktop
450 %{_pixmapsdir}/wine.svg
452 %files programs -f files.programs
453 %defattr(644,root,root,755)
456 %defattr(644,root,root,755)
457 %attr(755,root,root) %{_bindir}/fnt2bdf
458 %attr(755,root,root) %{_bindir}/function_grep.pl
459 %attr(755,root,root) %{_bindir}/widl
460 %attr(755,root,root) %{_bindir}/winebuild
461 %attr(755,root,root) %{_bindir}/winedump
462 %attr(755,root,root) %{_bindir}/wineg++
463 %attr(755,root,root) %{_bindir}/winegcc
464 %attr(755,root,root) %{_bindir}/winemaker
465 %attr(755,root,root) %{_bindir}/winecpp
466 %attr(755,root,root) %{_bindir}/wmc
467 %attr(755,root,root) %{_bindir}/wrc
468 %{_libdir}/wine/lib*.def
469 # no shared variants, so not separated
470 %{_libdir}/wine/lib*.def.a
471 %{_libdir}/wine/libadsiid.a
472 %{_libdir}/wine/libdx*.a
473 %{_libdir}/wine/libstrmiids.a
474 %{_libdir}/wine/libuuid.a
475 %{_libdir}/wine/libwinecrt0.a
477 %{_mandir}/man1/widl.1*
478 %{_mandir}/man1/winebuild.1*
479 %{_mandir}/man1/winedump.1*
480 %{_mandir}/man1/winegcc.1*
481 %{_mandir}/man1/wineg++.1*
482 %{_mandir}/man1/winemaker.1*
483 %lang(de) %{_mandir}/de/man1/winemaker.1*
484 %{_mandir}/man1/wmc.1*
485 %{_mandir}/man1/wrc.1*
489 %defattr(644,root,root,755)
490 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
491 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
492 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
495 %defattr(644,root,root,755)
496 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
497 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
503 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
514 %defattr(644,root,root,755)
515 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
520 %defattr(644,root,root,755)
521 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
524 # additional dependencies in *.so not separated (yet?) from main package
525 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
526 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
527 # ttydrv.dll.so depends on ncurses