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: c3a9218840a80b29932cee49f2d45d9d
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: OpenGL-GLU-devel
50 %{?with_alsa:BuildRequires: alsa-lib-devel}
51 %{?with_arts:BuildRequires: artsc-devel}
52 BuildRequires: autoconf
53 BuildRequires: automake
55 %{?with_cups:BuildRequires: cups-devel}
56 BuildRequires: docbook-dtd31-sgml
57 BuildRequires: docbook-utils
59 BuildRequires: fontconfig-devel
60 BuildRequires: fontforge
61 BuildRequires: freetype-devel >= 2.0.5
62 BuildRequires: giflib-devel
63 BuildRequires: gnutls-devel
64 BuildRequires: hal-devel
65 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
66 BuildRequires: lcms-devel
67 BuildRequires: libgphoto2-devel
68 BuildRequires: libgsm-devel
69 BuildRequires: libjpeg-devel
70 BuildRequires: libmpg123-devel
71 BuildRequires: libtool
72 BuildRequires: libxslt-devel
73 %{?with_nas:BuildRequires: nas-devel}
74 BuildRequires: ncurses-devel
75 # db2* failed previously - probably openjade or opensp bug
76 BuildRequires: openjade >= 1:1.3.3-0.pre1
77 BuildRequires: openldap-devel
78 BuildRequires: opensp >= 1:1.5.1
79 BuildRequires: openssl-devel >= 0.9.7d
80 BuildRequires: pkgconfig
81 %{?with_sane:BuildRequires: sane-backends-devel}
82 BuildRequires: unixODBC-devel >= 2.2.12-2
83 #BuildRequires: valgrind
84 BuildRequires: xorg-lib-libXcomposite-devel
85 BuildRequires: xorg-lib-libXcursor-devel
86 BuildRequires: xorg-lib-libXi-devel
87 BuildRequires: xorg-lib-libXinerama-devel
88 BuildRequires: xorg-lib-libXmu-devel
89 BuildRequires: xorg-lib-libXrandr-devel
90 BuildRequires: xorg-lib-libXrender-devel
91 BuildRequires: xorg-lib-libXxf86dga-devel
92 BuildRequires: xorg-lib-libXxf86vm-devel
93 Requires: libfreetype.so.6
94 Suggests: binfmt-detector
95 Suggests: ca-certificates
96 Conflicts: ca-certificates < 20080809-4
98 Suggests: xorg-app-xmessage
100 Suggests: samba-common >= 1:3.0.25
101 # link to wine/ntdll.dll.so, without any SONAME
102 Provides: libntdll.dll.so
103 Obsoletes: wine-doc-pdf
104 Obsoletes: wine-drv-arts
105 ExclusiveArch: %{ix86}
107 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
109 %define _noautoreqdep libGL.so.1 libGLU.so.1
110 %define no_install_post_strip 1
112 %define _winedir %{_datadir}/%{name}
114 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
116 %undefine debuginfocflags
119 Wine is a program which allows running Microsoft Windows programs
120 (including DOS, Windows 3.x and Win32 executables) on Unix. It
121 consists of a program loader which loads and executes a Microsoft
122 Windows binary, and a library that implements Windows API calls using
123 their Unix or X11 equivalents. The library may also be used for
124 porting Win32 code into native Unix executables.
126 %description -l es.UTF-8
127 Ejecuta programas Windows en Linux.
129 %description -l pl.UTF-8
130 Wine jest programem dzięki któremu można uruchamiać programy napisane
131 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
132 loadera, który pozwala wczytywać i uruchamiać programy w formacie
133 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
134 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
135 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
137 %description -l pt_BR.UTF-8
138 O Wine é um programa que permite rodar programas MS-Windows no X11.
139 Ele consiste de um carregador de programa, que carrega e executa um
140 binário MS-Windows, e de uma biblioteca de emulação que traduz as
141 chamadas da API para as equivalentes Unix/X11.
144 Summary: Wine - header files
145 Summary(es.UTF-8): Biblioteca de desarrollo de wine
146 Summary(pl.UTF-8): Wine - pliki nagłowkowe
147 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
148 Group: Development/Libraries
149 Requires: %{name} = %{epoch}:%{version}-%{release}
154 %description devel -l es.UTF-8
155 Biblioteca de desarrollo de wine.
157 %description devel -l pl.UTF-8
158 Wine - pliki nagłówkowe.
160 %description devel -l pt_BR.UTF-8
161 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
165 Summary: Wine - programs
166 Summary(pl.UTF-8): Wine - programy
168 Requires: %{name} = %{epoch}:%{version}-%{release}
170 %description programs
173 %description programs -l pl.UTF-8
177 Summary: Direct3D implementation DLLs for Wine
178 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
179 Group: Applications/Emulators
180 Requires: %{name} = %{epoch}:%{version}-%{release}
184 Direct3D implementation DLLs for Wine (through OpenGL).
186 %description dll-d3d -l pl.UTF-8
187 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
190 Summary: OpenGL implementation DLLs for Wine
191 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
192 Group: Applications/Emulators
193 Requires: %{name} = %{epoch}:%{version}-%{release}
197 OpenGL implementation DLLs for Wine.
199 %description dll-gl -l pl.UTF-8
200 Biblioteki DLL z implementacją OpenGL dla Wine.
203 Summary: TWAIN implementation DLL for Wine
204 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
205 Group: Applications/Emulators
206 Requires: %{name} = %{epoch}:%{version}-%{release}
208 %description dll-twain
209 TWAIN implementation DLL for Wine (through SANE).
211 %description dll-twain -l pl.UTF-8
212 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
215 Summary: ALSA driver for WINE mm.dll implementation
216 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
217 Group: Applications/Emulators
218 Requires: %{name} = %{epoch}:%{version}-%{release}
220 %description drv-alsa
221 ALSA driver for WINE mm.dll (multimedia system) implementation.
223 %description drv-alsa -l pl.UTF-8
224 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
227 Summary: JACK driver for WINE mm.dll implementation
228 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
229 Group: Applications/Emulators
230 Requires: %{name} = %{epoch}:%{version}-%{release}
231 Requires: jack-audio-connection-kit
232 # dlopened by SONAME detected at build time
233 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
235 %description drv-jack
236 JACK driver for WINE mm.dll (multimedia system) implementation.
238 %description drv-jack -l pl.UTF-8
239 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
243 Summary: NAS driver for WINE mm.dll implementation
244 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
245 Group: Applications/Emulators
246 Requires: %{name} = %{epoch}:%{version}-%{release}
249 NAS driver for WINE mm.dll (multimedia system) implementation.
251 %description drv-nas -l pl.UTF-8
252 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
264 # turn off compilation of some tools
265 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
266 #sed -i -e "s|avitools||" programs/Makefile.in
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 \
312 %{__make} -C programs
315 rm -rf $RPM_BUILD_ROOT
316 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
319 DESTDIR=$RPM_BUILD_ROOT
321 %{__make} -C programs install \
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="msiexec notepad regedit regsvr32 wineboot winecfg wineconsole winedbg 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(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 %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}/winecfg
420 %attr(755,root,root) %{_bindir}/winedbg
421 #%attr(755,root,root) %{_bindir}/wine-kthread
422 #%attr(755,root,root) %{_bindir}/winelauncher
423 %attr(755,root,root) %{_bindir}/wineprefixcreate
424 %attr(755,root,root) %{_bindir}/wine-preloader
425 #%attr(755,root,root) %{_bindir}/wine-pthread
426 %attr(755,root,root) %{_bindir}/wineserver
427 %attr(755,root,root) %{_libdir}/*.so*
429 %{_libdir}/wine/*.dll16
430 %{_libdir}/wine/*.drv16
431 %{_libdir}/wine/*.exe16
432 %dir %{_libdir}/wine/fakedlls
433 %{_libdir}/wine/fakedlls/*.acm
434 %{_libdir}/wine/fakedlls/*.cpl
435 %{_libdir}/wine/fakedlls/*.dll
436 %{_libdir}/wine/fakedlls/*.dll16
437 %{_libdir}/wine/fakedlls/*.drv
438 %{_libdir}/wine/fakedlls/*.drv16
439 %{_libdir}/wine/fakedlls/*.ds
440 %{_libdir}/wine/fakedlls/*.exe
441 %{_libdir}/wine/fakedlls/*.exe16
442 %{_libdir}/wine/fakedlls/*.mod16
443 %{_libdir}/wine/fakedlls/*.ocx
444 %{_libdir}/wine/fakedlls/*.sys
445 %{_libdir}/wine/fakedlls/*.tlb
446 %{_libdir}/wine/fakedlls/*.vxd
447 %{_mandir}/man1/wine.1*
448 %lang(de) %{_mandir}/de/man1/wine.1*
449 %lang(fr) %{_mandir}/fr/man1/wine.1*
450 %{_mandir}/man1/winedbg.1*
451 %{_mandir}/man1/wineprefixcreate.1*
452 %{_mandir}/man1/wineserver.1*
453 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
455 %{_desktopdir}/wine.desktop
456 %{_desktopdir}/wine-uninstaller.desktop
457 %{_pixmapsdir}/wine.svg
459 %files programs -f files.programs
460 %defattr(644,root,root,755)
463 %defattr(644,root,root,755)
464 %attr(755,root,root) %{_bindir}/fnt2bdf
465 %attr(755,root,root) %{_bindir}/function_grep.pl
466 %attr(755,root,root) %{_bindir}/widl
467 %attr(755,root,root) %{_bindir}/winebuild
468 %attr(755,root,root) %{_bindir}/winedump
469 %attr(755,root,root) %{_bindir}/wineg++
470 %attr(755,root,root) %{_bindir}/winegcc
471 %attr(755,root,root) %{_bindir}/winemaker
472 %attr(755,root,root) %{_bindir}/winecpp
473 #%attr(755,root,root) %{_bindir}/winewrap
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/winedump.1*
487 %{_mandir}/man1/winegcc.1*
488 %{_mandir}/man1/wineg++.1*
489 %{_mandir}/man1/winemaker.1*
490 %{_mandir}/man1/winebuild.1*
491 %{_mandir}/man1/wmc.1*
492 %{_mandir}/man1/wrc.1*
496 %defattr(644,root,root,755)
497 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
498 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
499 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
502 %defattr(644,root,root,755)
503 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
504 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
510 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
515 %defattr(644,root,root,755)
516 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
521 %defattr(644,root,root,755)
522 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
527 %defattr(644,root,root,755)
528 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
531 # additional dependencies in *.so not separated (yet?) from main package
532 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
533 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
534 # ttydrv.dll.so depends on ncurses