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: 2afa7846175c7c2ce4c7482aa1d82f0f
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
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
72 BuildRequires: libtool
73 BuildRequires: libxslt-devel
74 %{?with_nas:BuildRequires: nas-devel}
75 BuildRequires: ncurses-devel
76 # db2* failed previously - probably openjade or opensp bug
77 BuildRequires: openjade >= 1:1.3.3-0.pre1
78 BuildRequires: openldap-devel
79 BuildRequires: opensp >= 1:1.5.1
80 BuildRequires: openssl-devel >= 0.9.7d
81 BuildRequires: pkgconfig
82 %{?with_sane:BuildRequires: sane-backends-devel}
83 BuildRequires: unixODBC-devel >= 2.2.12-2
84 #BuildRequires: valgrind
85 BuildRequires: xorg-lib-libXcomposite-devel
86 BuildRequires: xorg-lib-libXcursor-devel
87 BuildRequires: xorg-lib-libXi-devel
88 BuildRequires: xorg-lib-libXinerama-devel
89 BuildRequires: xorg-lib-libXmu-devel
90 BuildRequires: xorg-lib-libXrandr-devel
91 BuildRequires: xorg-lib-libXrender-devel
92 BuildRequires: xorg-lib-libXxf86dga-devel
93 BuildRequires: xorg-lib-libXxf86vm-devel
94 Requires: libfreetype.so.6
95 Suggests: binfmt-detector
96 Suggests: ca-certificates
97 Conflicts: ca-certificates < 20080809-4
98 # for printing needs lpr
99 Suggests: cups-clients
101 Suggests: xorg-app-xmessage
103 Suggests: samba-common >= 1:3.0.25
104 # link to wine/ntdll.dll.so, without any SONAME
105 Provides: libntdll.dll.so
106 Obsoletes: wine-doc-pdf
107 Obsoletes: wine-drv-arts
108 ExclusiveArch: %{ix86}
110 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
112 %define _noautoreqdep libGL.so.1 libGLU.so.1
113 %define no_install_post_strip 1
115 %define _winedir %{_datadir}/%{name}
117 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
119 %undefine debuginfocflags
122 Wine is a program which allows running Microsoft Windows programs
123 (including DOS, Windows 3.x and Win32 executables) on Unix. It
124 consists of a program loader which loads and executes a Microsoft
125 Windows binary, and a library that implements Windows API calls using
126 their Unix or X11 equivalents. The library may also be used for
127 porting Win32 code into native Unix executables.
129 %description -l es.UTF-8
130 Ejecuta programas Windows en Linux.
132 %description -l pl.UTF-8
133 Wine jest programem dzięki któremu można uruchamiać programy napisane
134 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
135 loadera, który pozwala wczytywać i uruchamiać programy w formacie
136 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
137 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
138 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
140 %description -l pt_BR.UTF-8
141 O Wine é um programa que permite rodar programas MS-Windows no X11.
142 Ele consiste de um carregador de programa, que carrega e executa um
143 binário MS-Windows, e de uma biblioteca de emulação que traduz as
144 chamadas da API para as equivalentes Unix/X11.
147 Summary: Wine - header files
148 Summary(es.UTF-8): Biblioteca de desarrollo de wine
149 Summary(pl.UTF-8): Wine - pliki nagłowkowe
150 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
151 Group: Development/Libraries
152 Requires: %{name} = %{epoch}:%{version}-%{release}
157 %description devel -l es.UTF-8
158 Biblioteca de desarrollo de wine.
160 %description devel -l pl.UTF-8
161 Wine - pliki nagłówkowe.
163 %description devel -l pt_BR.UTF-8
164 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
168 Summary: Wine - programs
169 Summary(pl.UTF-8): Wine - programy
171 Requires: %{name} = %{epoch}:%{version}-%{release}
173 %description programs
176 %description programs -l pl.UTF-8
180 Summary: Direct3D implementation DLLs for Wine
181 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
182 Group: Applications/Emulators
183 Requires: %{name} = %{epoch}:%{version}-%{release}
187 Direct3D implementation DLLs for Wine (through OpenGL).
189 %description dll-d3d -l pl.UTF-8
190 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
193 Summary: OpenGL implementation DLLs for Wine
194 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
195 Group: Applications/Emulators
196 Requires: %{name} = %{epoch}:%{version}-%{release}
200 OpenGL implementation DLLs for Wine.
202 %description dll-gl -l pl.UTF-8
203 Biblioteki DLL z implementacją OpenGL dla Wine.
206 Summary: TWAIN implementation DLL for Wine
207 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
208 Group: Applications/Emulators
209 Requires: %{name} = %{epoch}:%{version}-%{release}
211 %description dll-twain
212 TWAIN implementation DLL for Wine (through SANE).
214 %description dll-twain -l pl.UTF-8
215 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
218 Summary: ALSA driver for WINE mm.dll implementation
219 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
220 Group: Applications/Emulators
221 Requires: %{name} = %{epoch}:%{version}-%{release}
223 %description drv-alsa
224 ALSA driver for WINE mm.dll (multimedia system) implementation.
226 %description drv-alsa -l pl.UTF-8
227 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
230 Summary: JACK driver for WINE mm.dll implementation
231 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
232 Group: Applications/Emulators
233 Requires: %{name} = %{epoch}:%{version}-%{release}
234 Requires: jack-audio-connection-kit
235 # dlopened by SONAME detected at build time
236 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
238 %description drv-jack
239 JACK driver for WINE mm.dll (multimedia system) implementation.
241 %description drv-jack -l pl.UTF-8
242 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
246 Summary: NAS driver for WINE mm.dll implementation
247 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
248 Group: Applications/Emulators
249 Requires: %{name} = %{epoch}:%{version}-%{release}
252 NAS driver for WINE mm.dll (multimedia system) implementation.
254 %description drv-nas -l pl.UTF-8
255 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
267 # turn off compilation of some tools
268 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
269 #sed -i -e "s|avitools||" programs/Makefile.in
275 --with%{!?with_alsa:out}-alsa \
280 --with%{!?with_cups:out}-cups \
290 --with%{!?with_jack:out}-jack \
294 --with%{!?with_nas:out}-nas \
300 --with%{!?with_sane:out}-sane \
315 %{__make} -C programs
318 rm -rf $RPM_BUILD_ROOT
319 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
322 DESTDIR=$RPM_BUILD_ROOT
324 %{__make} -C programs install \
325 DESTDIR=$RPM_BUILD_ROOT
327 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
329 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
332 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
333 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
334 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
335 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
336 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
338 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
339 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
340 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
342 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
346 waveaudio=mciwave.drv
348 videodisc=mcipionr.drv
353 %if %{?debug:0}%{!?debug:1}
354 echo "Strip executable binaries and shared object files."
355 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
356 elfexelist=`echo $filelist | xargs -r file | \
357 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
358 elfsharedlist=`echo $filelist | xargs -r file | \
359 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
360 if [ -n "$elfexelist" ]; then \
361 strip -R .note -R .comment $elfexelist
363 if [ -n "$elfsharedlist" ]; then
364 strip --strip-unneeded -R .note -R .comment $elfsharedlist
368 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
370 programs="msiexec notepad regedit regsvr32 wineboot winecfg wineconsole winedbg winefile winemine winepath"
373 rm -f files.so; touch files.so
374 rm -f files.programs; touch files.programs
375 cd $RPM_BUILD_ROOT%{_libdir}/wine
378 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)
381 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
385 for p in $programs; do
386 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
387 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
388 grep -v "$p\.exe\.so$" files.so > files.so.
389 mv -f files.so. files.so
392 install -d $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
393 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
394 install programs/winetest/winetest.svg $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
397 rm -rf $RPM_BUILD_ROOT
399 %post -p /sbin/ldconfig
400 %postun -p /sbin/ldconfig
402 %triggerpostun -- wine < 1:0.9.12-1.9
403 rm -f /var/lock/subsys/wine
404 if [ -x /sbin/chkconfig ]; then
405 /sbin/chkconfig --del wine
409 %defattr(644,root,root,755)
410 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
411 %lang(de) %doc documentation/README.de
412 %lang(es) %doc documentation/README.es
413 %lang(fr) %doc documentation/README.fr
414 %lang(it) %doc documentation/README.it
415 %lang(ko) %doc documentation/README.ko
416 %lang(nb) %doc documentation/README.no
417 %lang(pt) %doc documentation/README.pt
418 %lang(pt_BR) %doc documentation/README.pt_br
419 %attr(755,root,root) %{_bindir}/msiexec
420 %attr(755,root,root) %{_bindir}/wine
421 %attr(755,root,root) %{_bindir}/wineboot
422 %attr(755,root,root) %{_bindir}/winecfg
423 %attr(755,root,root) %{_bindir}/winedbg
424 %attr(755,root,root) %{_bindir}/wineprefixcreate
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/wineprefixcreate.1*
449 %{_mandir}/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/winedump.1*
483 %{_mandir}/man1/winegcc.1*
484 %{_mandir}/man1/wineg++.1*
485 %{_mandir}/man1/winemaker.1*
486 %{_mandir}/man1/winebuild.1*
487 %{_mandir}/man1/wmc.1*
488 %{_mandir}/man1/wrc.1*
492 %defattr(644,root,root,755)
493 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
494 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
495 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
498 %defattr(644,root,root,755)
499 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
500 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
504 %defattr(644,root,root,755)
505 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
506 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
511 %defattr(644,root,root,755)
512 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
523 %defattr(644,root,root,755)
524 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
527 # additional dependencies in *.so not separated (yet?) from main package
528 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
529 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
530 # ttydrv.dll.so depends on ncurses