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: f9506864f5aef9318129d349ce9ded72
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
97 # for printing needs lpr
98 Suggests: cups-clients
100 Suggests: xorg-app-xmessage
102 Suggests: samba-common >= 1:3.0.25
103 # link to wine/ntdll.dll.so, without any SONAME
104 Provides: libntdll.dll.so
105 Obsoletes: wine-doc-pdf
106 Obsoletes: wine-drv-arts
107 ExclusiveArch: %{ix86}
109 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
111 %define _noautoreqdep libGL.so.1 libGLU.so.1
112 %define no_install_post_strip 1
114 %define _winedir %{_datadir}/%{name}
116 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
118 %undefine debuginfocflags
121 Wine is a program which allows running Microsoft Windows programs
122 (including DOS, Windows 3.x and Win32 executables) on Unix. It
123 consists of a program loader which loads and executes a Microsoft
124 Windows binary, and a library that implements Windows API calls using
125 their Unix or X11 equivalents. The library may also be used for
126 porting Win32 code into native Unix executables.
128 %description -l es.UTF-8
129 Ejecuta programas Windows en Linux.
131 %description -l pl.UTF-8
132 Wine jest programem dzięki któremu można uruchamiać programy napisane
133 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
134 loadera, który pozwala wczytywać i uruchamiać programy w formacie
135 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
136 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
137 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
139 %description -l pt_BR.UTF-8
140 O Wine é um programa que permite rodar programas MS-Windows no X11.
141 Ele consiste de um carregador de programa, que carrega e executa um
142 binário MS-Windows, e de uma biblioteca de emulação que traduz as
143 chamadas da API para as equivalentes Unix/X11.
146 Summary: Wine - header files
147 Summary(es.UTF-8): Biblioteca de desarrollo de wine
148 Summary(pl.UTF-8): Wine - pliki nagłowkowe
149 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
150 Group: Development/Libraries
151 Requires: %{name} = %{epoch}:%{version}-%{release}
156 %description devel -l es.UTF-8
157 Biblioteca de desarrollo de wine.
159 %description devel -l pl.UTF-8
160 Wine - pliki nagłówkowe.
162 %description devel -l pt_BR.UTF-8
163 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
167 Summary: Wine - programs
168 Summary(pl.UTF-8): Wine - programy
170 Requires: %{name} = %{epoch}:%{version}-%{release}
172 %description programs
175 %description programs -l pl.UTF-8
179 Summary: Direct3D implementation DLLs for Wine
180 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
181 Group: Applications/Emulators
182 Requires: %{name} = %{epoch}:%{version}-%{release}
186 Direct3D implementation DLLs for Wine (through OpenGL).
188 %description dll-d3d -l pl.UTF-8
189 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
192 Summary: OpenGL implementation DLLs for Wine
193 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
194 Group: Applications/Emulators
195 Requires: %{name} = %{epoch}:%{version}-%{release}
199 OpenGL implementation DLLs for Wine.
201 %description dll-gl -l pl.UTF-8
202 Biblioteki DLL z implementacją OpenGL dla Wine.
205 Summary: TWAIN implementation DLL for Wine
206 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
207 Group: Applications/Emulators
208 Requires: %{name} = %{epoch}:%{version}-%{release}
210 %description dll-twain
211 TWAIN implementation DLL for Wine (through SANE).
213 %description dll-twain -l pl.UTF-8
214 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
217 Summary: ALSA driver for WINE mm.dll implementation
218 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
219 Group: Applications/Emulators
220 Requires: %{name} = %{epoch}:%{version}-%{release}
222 %description drv-alsa
223 ALSA driver for WINE mm.dll (multimedia system) implementation.
225 %description drv-alsa -l pl.UTF-8
226 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
229 Summary: JACK driver for WINE mm.dll implementation
230 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
231 Group: Applications/Emulators
232 Requires: %{name} = %{epoch}:%{version}-%{release}
233 Requires: jack-audio-connection-kit
234 # dlopened by SONAME detected at build time
235 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
237 %description drv-jack
238 JACK driver for WINE mm.dll (multimedia system) implementation.
240 %description drv-jack -l pl.UTF-8
241 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
245 Summary: NAS driver for WINE mm.dll implementation
246 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
247 Group: Applications/Emulators
248 Requires: %{name} = %{epoch}:%{version}-%{release}
251 NAS driver for WINE mm.dll (multimedia system) implementation.
253 %description drv-nas -l pl.UTF-8
254 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
266 # turn off compilation of some tools
267 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
268 #sed -i -e "s|avitools||" programs/Makefile.in
274 --with%{!?with_alsa:out}-alsa \
279 --with%{!?with_cups:out}-cups \
289 --with%{!?with_jack:out}-jack \
293 --with%{!?with_nas:out}-nas \
299 --with%{!?with_sane:out}-sane \
314 %{__make} -C programs
317 rm -rf $RPM_BUILD_ROOT
318 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
321 DESTDIR=$RPM_BUILD_ROOT
323 %{__make} -C programs install \
324 DESTDIR=$RPM_BUILD_ROOT
326 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
328 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
331 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
332 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
333 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
334 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
335 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
337 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
338 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
339 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
341 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
345 waveaudio=mciwave.drv
347 videodisc=mcipionr.drv
352 %if %{?debug:0}%{!?debug:1}
353 echo "Strip executable binaries and shared object files."
354 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
355 elfexelist=`echo $filelist | xargs -r file | \
356 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
357 elfsharedlist=`echo $filelist | xargs -r file | \
358 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
359 if [ -n "$elfexelist" ]; then \
360 strip -R .note -R .comment $elfexelist
362 if [ -n "$elfsharedlist" ]; then
363 strip --strip-unneeded -R .note -R .comment $elfsharedlist
367 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
369 programs="msiexec notepad regedit regsvr32 wineboot winecfg wineconsole winedbg winefile winemine winepath"
372 rm -f files.so; touch files.so
373 rm -f files.programs; touch files.programs
374 cd $RPM_BUILD_ROOT%{_libdir}/wine
377 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)
380 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
384 for p in $programs; do
385 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
386 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
387 grep -v "$p\.exe\.so$" files.so > files.so.
388 mv -f files.so. files.so
391 install -d $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
392 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
393 install programs/winetest/winetest.svg $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
396 rm -rf $RPM_BUILD_ROOT
398 %post -p /sbin/ldconfig
399 %postun -p /sbin/ldconfig
401 %triggerpostun -- wine < 1:0.9.12-1.9
402 rm -f /var/lock/subsys/wine
403 if [ -x /sbin/chkconfig ]; then
404 /sbin/chkconfig --del wine
408 %defattr(644,root,root,755)
409 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
410 %lang(de) %doc documentation/README.de
411 %lang(es) %doc documentation/README.es
412 %lang(fr) %doc documentation/README.fr
413 %lang(it) %doc documentation/README.it
414 %lang(ko) %doc documentation/README.ko
415 %lang(nb) %doc documentation/README.no
416 %lang(pt) %doc documentation/README.pt
417 %lang(pt_BR) %doc documentation/README.pt_br
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}/winecfg
422 %attr(755,root,root) %{_bindir}/winedbg
423 #%attr(755,root,root) %{_bindir}/wine-kthread
424 #%attr(755,root,root) %{_bindir}/winelauncher
425 %attr(755,root,root) %{_bindir}/wineprefixcreate
426 %attr(755,root,root) %{_bindir}/wine-preloader
427 #%attr(755,root,root) %{_bindir}/wine-pthread
428 %attr(755,root,root) %{_bindir}/wineserver
429 %attr(755,root,root) %{_libdir}/*.so*
431 %{_libdir}/wine/*.dll16
432 #%{_libdir}/wine/*.drv16
433 %{_libdir}/wine/*.exe16
434 %dir %{_libdir}/wine/fakedlls
435 %{_libdir}/wine/fakedlls/*.acm
436 %{_libdir}/wine/fakedlls/*.cpl
437 %{_libdir}/wine/fakedlls/*.dll
438 %{_libdir}/wine/fakedlls/*.dll16
439 %{_libdir}/wine/fakedlls/*.drv
440 %{_libdir}/wine/fakedlls/*.drv16
441 %{_libdir}/wine/fakedlls/*.ds
442 %{_libdir}/wine/fakedlls/*.exe
443 %{_libdir}/wine/fakedlls/*.exe16
444 %{_libdir}/wine/fakedlls/*.mod16
445 %{_libdir}/wine/fakedlls/*.ocx
446 %{_libdir}/wine/fakedlls/*.sys
447 %{_libdir}/wine/fakedlls/*.tlb
448 %{_libdir}/wine/fakedlls/*.vxd
449 %{_mandir}/man1/wine.1*
450 %lang(de) %{_mandir}/de/man1/wine.1*
451 %lang(fr) %{_mandir}/fr/man1/wine.1*
452 %{_mandir}/man1/winedbg.1*
453 %{_mandir}/man1/wineprefixcreate.1*
454 %{_mandir}/man1/wineserver.1*
455 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
457 %{_desktopdir}/wine.desktop
458 %{_desktopdir}/wine-uninstaller.desktop
459 %{_pixmapsdir}/wine.svg
461 %files programs -f files.programs
462 %defattr(644,root,root,755)
465 %defattr(644,root,root,755)
466 %attr(755,root,root) %{_bindir}/fnt2bdf
467 %attr(755,root,root) %{_bindir}/function_grep.pl
468 %attr(755,root,root) %{_bindir}/widl
469 %attr(755,root,root) %{_bindir}/winebuild
470 %attr(755,root,root) %{_bindir}/winedump
471 %attr(755,root,root) %{_bindir}/wineg++
472 %attr(755,root,root) %{_bindir}/winegcc
473 %attr(755,root,root) %{_bindir}/winemaker
474 %attr(755,root,root) %{_bindir}/winecpp
475 #%attr(755,root,root) %{_bindir}/winewrap
476 %attr(755,root,root) %{_bindir}/wmc
477 %attr(755,root,root) %{_bindir}/wrc
478 %{_libdir}/wine/lib*.def
479 # no shared variants, so not separated
480 %{_libdir}/wine/lib*.def.a
481 %{_libdir}/wine/libadsiid.a
482 %{_libdir}/wine/libdx*.a
483 %{_libdir}/wine/libstrmiids.a
484 %{_libdir}/wine/libuuid.a
485 %{_libdir}/wine/libwinecrt0.a
487 %{_mandir}/man1/widl.1*
488 %{_mandir}/man1/winedump.1*
489 %{_mandir}/man1/winegcc.1*
490 %{_mandir}/man1/wineg++.1*
491 %{_mandir}/man1/winemaker.1*
492 %{_mandir}/man1/winebuild.1*
493 %{_mandir}/man1/wmc.1*
494 %{_mandir}/man1/wrc.1*
498 %defattr(644,root,root,755)
499 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
500 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
501 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
504 %defattr(644,root,root,755)
505 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
506 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
510 %defattr(644,root,root,755)
511 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
512 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
523 %defattr(644,root,root,755)
524 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
529 %defattr(644,root,root,755)
530 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
533 # additional dependencies in *.so not separated (yet?) from main package
534 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
535 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
536 # ttydrv.dll.so depends on ncurses