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