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
9 # NOTE: wineconsole is a bit broken: try wineconsole cmd to see what will happen
10 # As a workaroound use `wineconsole --backend=user cmd' (works fine)
11 # ref: http://bugs.winehq.org/show_bug.cgi?id=8069
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: dd6e2dfdadb7b023803948d0a1814a39
40 Source1: %{name}-uninstaller.desktop
41 Patch0: %{name}-fontcache.patch
42 Patch1: %{name}-makedep.patch
43 Patch2: %{name}-ncurses.patch
44 Patch3: %{name}-bug9177_workaround.patch
45 Patch4: %{name}-disable-valgrind.patch
46 #PatchX: %{name}-dga.patch
47 URL: http://www.winehq.org/
48 BuildRequires: OpenGL-GLU-devel
49 %{?with_alsa:BuildRequires: alsa-lib-devel}
50 %{?with_arts:BuildRequires: artsc-devel}
51 BuildRequires: autoconf
52 BuildRequires: automake
54 %{?with_cups:BuildRequires: cups-devel}
55 BuildRequires: docbook-dtd31-sgml
56 BuildRequires: docbook-utils
58 BuildRequires: fontconfig-devel
59 BuildRequires: fontforge
60 BuildRequires: freetype-devel >= 2.0.5
61 BuildRequires: giflib-devel
62 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
63 BuildRequires: libjpeg-devel
64 BuildRequires: libtool
65 BuildRequires: libxslt-devel
66 %{?with_nas:BuildRequires: nas-devel}
67 BuildRequires: ncurses-devel
68 # db2* failed previously - probably openjade or opensp bug
69 BuildRequires: openjade >= 1:1.3.3-0.pre1
70 BuildRequires: openldap-devel
71 BuildRequires: opensp >= 1:1.5.1
72 BuildRequires: openssl-devel >= 0.9.7d
73 %{?with_sane:BuildRequires: sane-backends-devel}
74 #BuildRequires: valgrind
75 BuildRequires: xorg-lib-libXi-devel
76 BuildRequires: xorg-lib-libXmu-devel
77 BuildRequires: xorg-lib-libXrender-devel
78 BuildRequires: xorg-lib-libXxf86dga-devel
79 BuildRequires: xorg-lib-libXxf86vm-devel
80 Suggests: binfmt-detector
82 Suggests: xorg-app-xmessage
84 Suggests: samba-common >= 1:3.0.25
85 # link to wine/ntdll.dll.so, without any SONAME
86 Provides: libntdll.dll.so
87 Obsoletes: wine-doc-pdf
88 Obsoletes: wine-drv-arts
89 ExclusiveArch: %{ix86}
91 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
93 %define _noautoreqdep libGL.so.1 libGLU.so.1
94 %define no_install_post_strip 1
96 %define _winedir %{_datadir}/%{name}
98 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
100 %undefine debuginfocflags
103 Wine is a program which allows running Microsoft Windows programs
104 (including DOS, Windows 3.x and Win32 executables) on Unix. It
105 consists of a program loader which loads and executes a Microsoft
106 Windows binary, and a library that implements Windows API calls using
107 their Unix or X11 equivalents. The library may also be used for
108 porting Win32 code into native Unix executables.
110 %description -l es.UTF-8
111 Ejecuta programas Windows en Linux.
113 %description -l pl.UTF-8
114 Wine jest programem dzięki któremu można uruchamiać programy napisane
115 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
116 loadera, który pozwala wczytywać i uruchamiać programy w formacie
117 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
118 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
119 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
121 %description -l pt_BR.UTF-8
122 O Wine é um programa que permite rodar programas MS-Windows no X11.
123 Ele consiste de um carregador de programa, que carrega e executa um
124 binário MS-Windows, e de uma biblioteca de emulação que traduz as
125 chamadas da API para as equivalentes Unix/X11.
128 Summary: Wine - header files
129 Summary(es.UTF-8): Biblioteca de desarrollo de wine
130 Summary(pl.UTF-8): Wine - pliki nagłowkowe
131 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
132 Group: Development/Libraries
133 Requires: %{name} = %{epoch}:%{version}-%{release}
138 %description devel -l es.UTF-8
139 Biblioteca de desarrollo de wine.
141 %description devel -l pl.UTF-8
142 Wine - pliki nagłówkowe.
144 %description devel -l pt_BR.UTF-8
145 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
149 Summary: Wine - programs
150 Summary(pl.UTF-8): Wine - programy
152 Requires: %{name} = %{epoch}:%{version}-%{release}
154 %description programs
157 %description programs -l pl.UTF-8
161 Summary: Direct3D implementation DLLs for Wine
162 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
163 Group: Applications/Emulators
164 Requires: %{name} = %{epoch}:%{version}-%{release}
168 Direct3D implementation DLLs for Wine (through OpenGL).
170 %description dll-d3d -l pl.UTF-8
171 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
174 Summary: OpenGL implementation DLLs for Wine
175 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
176 Group: Applications/Emulators
177 Requires: %{name} = %{epoch}:%{version}-%{release}
181 OpenGL implementation DLLs for Wine.
183 %description dll-gl -l pl.UTF-8
184 Biblioteki DLL z implementacją OpenGL dla Wine.
187 Summary: TWAIN implementation DLL for Wine
188 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
189 Group: Applications/Emulators
190 Requires: %{name} = %{epoch}:%{version}-%{release}
192 %description dll-twain
193 TWAIN implementation DLL for Wine (through SANE).
195 %description dll-twain -l pl.UTF-8
196 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
199 Summary: ALSA driver for WINE mm.dll implementation
200 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
201 Group: Applications/Emulators
202 Requires: %{name} = %{epoch}:%{version}-%{release}
204 %description drv-alsa
205 ALSA driver for WINE mm.dll (multimedia system) implementation.
207 %description drv-alsa -l pl.UTF-8
208 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
211 Summary: JACK driver for WINE mm.dll implementation
212 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
213 Group: Applications/Emulators
214 Requires: %{name} = %{epoch}:%{version}-%{release}
215 Requires: jack-audio-connection-kit
216 # dlopened by SONAME detected at build time
217 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
219 %description drv-jack
220 JACK driver for WINE mm.dll (multimedia system) implementation.
222 %description drv-jack -l pl.UTF-8
223 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
227 Summary: NAS driver for WINE mm.dll implementation
228 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
229 Group: Applications/Emulators
230 Requires: %{name} = %{epoch}:%{version}-%{release}
233 NAS driver for WINE mm.dll (multimedia system) implementation.
235 %description drv-nas -l pl.UTF-8
236 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
246 # turn off compilation of some tools
247 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
248 #sed -i -e "s|avitools||" programs/Makefile.in
254 %{!?debug:--disable-debug} \
255 %{!?debug:--disable-trace} \
261 %{__make} -C programs
264 rm -rf $RPM_BUILD_ROOT
265 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
268 DESTDIR=$RPM_BUILD_ROOT
270 %{__make} -C programs install \
271 DESTDIR=$RPM_BUILD_ROOT
273 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
275 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
278 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
279 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
280 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
281 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
282 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
284 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
285 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
286 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
288 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
292 waveaudio=mciwave.drv
294 videodisc=mcipionr.drv
299 %if %{?debug:0}%{!?debug:1}
300 echo "Strip executable binaries and shared object files."
301 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
302 elfexelist=`echo $filelist | xargs -r file | \
303 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
304 elfsharedlist=`echo $filelist | xargs -r file | \
305 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
306 if [ -n "$elfexelist" ]; then \
307 strip -R .note -R .comment $elfexelist
309 if [ -n "$elfsharedlist" ]; then
310 strip --strip-unneeded -R .note -R .comment $elfsharedlist
314 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
316 programs="msiexec notepad progman regedit regsvr32 uninstaller wineboot winebrowser winecfg wineconsole winedbg winefile winemine winepath"
319 rm -f files.so; touch files.so
320 rm -f files.programs; touch files.programs
321 cd $RPM_BUILD_ROOT%{_libdir}/wine
324 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)
327 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
331 for p in $programs; do
332 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
333 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
334 grep -v "$p\.exe\.so$" files.so > files.so.
335 mv -f files.so. files.so
338 install -d $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
339 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
340 install programs/winetest/winetest.svg $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
343 rm -rf $RPM_BUILD_ROOT
345 %post -p /sbin/ldconfig
346 %postun -p /sbin/ldconfig
348 %triggerpostun -- wine < 1:0.9.12-1.9
349 rm -f /var/lock/subsys/wine
350 if [ -x /sbin/chkconfig ]; then
351 /sbin/chkconfig --del wine
355 %defattr(644,root,root,755)
356 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
357 %lang(de) %doc documentation/README.de
358 %lang(es) %doc documentation/README.es
359 %lang(fr) %doc documentation/README.fr
360 %lang(it) %doc documentation/README.it
361 %lang(ko) %doc documentation/README.ko
362 %lang(nb) %doc documentation/README.no
363 %lang(pt) %doc documentation/README.pt
364 %lang(pt_BR) %doc documentation/README.pt_br
365 %attr(755,root,root) %{_bindir}/msiexec
366 %attr(755,root,root) %{_bindir}/wine
367 %attr(755,root,root) %{_bindir}/wineboot
368 %attr(755,root,root) %{_bindir}/winebrowser
369 %attr(755,root,root) %{_bindir}/winecfg
370 %attr(755,root,root) %{_bindir}/winedbg
371 %attr(755,root,root) %{_bindir}/wine-kthread
372 #%attr(755,root,root) %{_bindir}/winelauncher
373 %attr(755,root,root) %{_bindir}/wineprefixcreate
374 %attr(755,root,root) %{_bindir}/wine-preloader
375 %attr(755,root,root) %{_bindir}/wine-pthread
376 %attr(755,root,root) %{_bindir}/wineserver
377 %attr(755,root,root) %{_bindir}/wineshelllink
378 %attr(755,root,root) %{_libdir}/*.so*
380 %{_libdir}/wine/*.dll16
381 %{_libdir}/wine/*.drv16
382 %{_libdir}/wine/*.exe16
383 %{_libdir}/wine/*.mod16
384 %{_mandir}/man1/wine.1*
385 %{_mandir}/man1/winedbg.1*
386 %{_mandir}/man1/wineprefixcreate.1*
387 %{_mandir}/man1/wineserver.1*
389 %{_desktopdir}/wine.desktop
390 %{_desktopdir}/wine-uninstaller.desktop
391 %{_pixmapsdir}/wine.svg
393 %files programs -f files.programs
394 %defattr(644,root,root,755)
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_bindir}/fnt2bdf
399 %attr(755,root,root) %{_bindir}/function_grep.pl
400 %attr(755,root,root) %{_bindir}/widl
401 %attr(755,root,root) %{_bindir}/winebuild
402 %attr(755,root,root) %{_bindir}/winedump
403 %attr(755,root,root) %{_bindir}/wineg++
404 %attr(755,root,root) %{_bindir}/winegcc
405 %attr(755,root,root) %{_bindir}/winemaker
406 %attr(755,root,root) %{_bindir}/winecpp
407 #%attr(755,root,root) %{_bindir}/winewrap
408 %attr(755,root,root) %{_bindir}/wmc
409 %attr(755,root,root) %{_bindir}/wrc
410 %{_libdir}/wine/lib*.def
411 # no shared variants, so not separated
412 %{_libdir}/wine/lib*.def.a
413 %{_libdir}/wine/libadsiid.a
414 %{_libdir}/wine/libdx*.a
415 %{_libdir}/wine/libstrmiids.a
416 %{_libdir}/wine/libuuid.a
417 %{_libdir}/wine/libwinecrt0.a
419 %{_mandir}/man1/widl.1*
420 %{_mandir}/man1/winedump.1*
421 %{_mandir}/man1/winegcc.1*
422 %{_mandir}/man1/wineg++.1*
423 %{_mandir}/man1/winemaker.1*
424 %{_mandir}/man1/winebuild.1*
425 %{_mandir}/man1/wmc.1*
426 %{_mandir}/man1/wrc.1*
430 %defattr(644,root,root,755)
431 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
432 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
433 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
434 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
439 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
445 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
456 %defattr(644,root,root,755)
457 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
466 # additional dependencies in *.so not separated (yet?) from main package
467 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
468 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
469 # ttydrv.dll.so depends on ncurses