3 %bcond_without alsa # don't build ALSA mm driver
4 %bcond_without arts # don't build aRts mm driver
5 %bcond_without jack # don't build JACK mm driver
6 %bcond_without nas # don't build NAS mm driver
7 %bcond_with d3d9 # build with d3d9 patch
8 %bcond_without sane # don't build TWAIN DLL with scanning support (through SANE)
9 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
11 # NOTE: wine detects the following SONAMES for dlopen at build time:
12 # libcrypto,libssl (wininet.dll)
13 # libcups (winspool.dll.so,wineps.dll.so)
14 # libcurses/libncurses (wineconsole program)
15 # libfontconfig (gdi32.dll.so)
16 # libfreetype (wineps.dll.so,gdi32.dll.so)
17 # libGL (x11drv.dll.so,ddraw.dll.so)
18 # libjack (winejack.drv.so - explicit dependency in subpackage)
19 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
20 # thus requires rebuild after change of any of the above.
26 Summary: Program that lets you launch Win applications
27 Summary(es): Ejecuta programas Windows en Linux
28 Summary(pl): Program pozwalaj±cy uruchamiaæ aplikacje Windows
29 Summary(pt_BR): Executa programas Windows no Linux
35 Group: Applications/Emulators
36 #Source0: http://dl.sourceforge.net/%{name}/Wine-%{version}.tar.gz
37 #Source0: ftp://ftp.ibiblio.org/pub/Linux/ALPHA/wine/development/Wine-%{version}.tar.gz
38 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
39 # Source0-md5: 19538823c101b18feca83e4f06312139
41 Patch0: %{name}-fontcache.patch
42 Patch1: %{name}-makedep.patch
43 Patch2: %{name}-alsa.patch
44 # Oliver Stieber's DirectX 9 support patch (unofficial, published on WWN Issue #271)
45 Patch3: %{name}-d3d9patch.patch
46 #PatchX: %{name}-dga.patch
47 URL: http://www.winehq.org/
48 %{?with_alsa:BuildRequires: alsa-lib-devel}
49 %{?with_arts:BuildRequires: artsc-devel}
50 BuildRequires: OpenGL-GLU-devel
51 BuildRequires: autoconf
52 BuildRequires: automake
54 # BuildRequires: chpax >= 0.20020901-2
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 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
63 BuildRequires: libjpeg-devel
64 BuildRequires: libtool
65 BuildRequires: libungif-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: opensp >= 1:1.5.1
71 BuildRequires: openssl-devel >= 0.9.7d
72 %{?with_sane:BuildRequires: sane-backends-devel}
73 BuildRequires: xorg-lib-libXi
74 BuildRequires: xorg-lib-libXmu
75 BuildRequires: xorg-lib-libXrender
76 BuildRequires: xorg-lib-libXxf86dga
77 BuildRequires: xorg-lib-libXxf86vm
78 Requires(post): /sbin/ldconfig
79 Requires(post,preun): /sbin/chkconfig
80 # link to wine/ntdll.dll.so, without any SONAME
81 Provides: libntdll.dll.so
82 ExclusiveArch: %{ix86}
83 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
85 %define _noautoreqdep libGL.so.1 libGLU.so.1
86 %define no_install_post_strip 1
88 %define _winedir %{_datadir}/%{name}
90 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
93 Wine is a program which allows running Microsoft Windows programs
94 (including DOS, Windows 3.x and Win32 executables) on Unix. It
95 consists of a program loader which loads and executes a Microsoft
96 Windows binary, and a library that implements Windows API calls using
97 their Unix or X11 equivalents. The library may also be used for
98 porting Win32 code into native Unix executables.
101 Ejecuta programas Windows en Linux.
104 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
105 dla Microsoft Windows pod systemami uniksowymi. Sk³ada siê on z
106 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
107 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
108 przy u¿yciu odpowiedników uniksowych oraz z X11. Biblioteka mo¿e byæ
109 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
111 %description -l pt_BR
112 O Wine é um programa que permite rodar programas MS-Windows no X11.
113 Ele consiste de um carregador de programa, que carrega e executa um
114 binário MS-Windows, e de uma biblioteca de emulação que traduz as
115 chamadas da API para as equivalentes Unix/X11.
118 Summary: Wine - header files
119 Summary(es): Biblioteca de desarrollo de wine
120 Summary(pl): Wine - pliki nag³owkowe
121 Summary(pt_BR): Biblioteca de desenvolvimento do wine
122 Group: Development/Libraries
123 Requires: %{name} = %{epoch}:%{version}-%{release}
128 %description devel -l es
129 Biblioteca de desarrollo de wine.
131 %description devel -l pl
132 Wine - pliki nag³ówkowe.
134 %description devel -l pt_BR
135 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
139 Summary: Wine - programs
140 Summary(pl): Wine - programy
142 Requires: %{name} = %{epoch}:%{version}-%{release}
144 %description programs
147 %description programs -l pl
151 Summary: Direct3D implementation DLLs for Wine
152 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
153 Group: Applications/Emulators
154 Requires: %{name} = %{epoch}:%{version}-%{release}
158 Direct3D implementation DLLs for Wine (through OpenGL).
160 %description dll-d3d -l pl
161 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
164 Summary: OpenGL implementation DLLs for Wine
165 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
166 Group: Applications/Emulators
167 Requires: %{name} = %{epoch}:%{version}-%{release}
171 OpenGL implementation DLLs for Wine.
173 %description dll-gl -l pl
174 Biblioteki DLL z implementacj± OpenGL dla Wine.
177 Summary: TWAIN implementation DLL for Wine
178 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
179 Group: Applications/Emulators
180 Requires: %{name} = %{epoch}:%{version}-%{release}
182 %description dll-twain
183 TWAIN implementation DLL for Wine (through SANE).
185 %description dll-twain -l pl
186 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
189 Summary: ALSA driver for WINE mm.dll implementation
190 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
191 Group: Applications/Emulators
192 Requires: %{name} = %{epoch}:%{version}-%{release}
194 %description drv-alsa
195 ALSA driver for WINE mm.dll (multimedia system) implementation.
197 %description drv-alsa -l pl
198 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
201 Summary: aRts driver for WINE mm.dll implementation
202 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
203 Group: Applications/Emulators
204 Requires: %{name} = %{epoch}:%{version}-%{release}
206 %description drv-arts
207 aRts driver for WINE mm.dll (multimedia system) implementation.
209 %description drv-arts -l pl
210 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
213 Summary: JACK driver for WINE mm.dll implementation
214 Summary(pl): Sterownik JACK-a dla implementacji mm.dll w Wine
215 Group: Applications/Emulators
216 Requires: %{name} = %{epoch}:%{version}-%{release}
217 Requires: jack-audio-connection-kit
218 # dlopened by SONAME detected at build time
219 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
221 %description drv-jack
222 JACK driver for WINE mm.dll (multimedia system) implementation.
224 %description drv-jack -l pl
225 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
229 Summary: NAS driver for WINE mm.dll implementation
230 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
231 Group: Applications/Emulators
232 Requires: %{name} = %{epoch}:%{version}-%{release}
235 NAS driver for WINE mm.dll (multimedia system) implementation.
237 %description drv-nas -l pl
238 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
245 %{?with_d3d9:%patch3 -p1}
247 # turn off compilation of some tools
248 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
249 #sed -i -e "s|avitools||" programs/Makefile.in
254 %{!?debug:--disable-debug} \
255 %{!?debug:--disable-trace} \
261 %{__make} -C programs
262 #%{__make} -C programs/regapi
265 rm -rf $RPM_BUILD_ROOT
266 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
269 DESTDIR=$RPM_BUILD_ROOT
271 %{__make} -C programs install \
272 DESTDIR=$RPM_BUILD_ROOT
274 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
276 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
277 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
279 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
280 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
281 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
282 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
283 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
284 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
286 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
288 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
289 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
290 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
292 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
296 waveaudio=mciwave.drv
298 videodisc=mcipionr.drv
303 %if %{?debug:0}%{!?debug:1}
304 echo "Strip executable binaries and shared object files."
305 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
306 elfexelist=`echo $filelist | xargs -r file | \
307 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
308 elfsharedlist=`echo $filelist | xargs -r file | \
309 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
310 if [ -n "$elfexelist" ]; then \
311 strip -R .note -R .comment $elfexelist
313 if [ -n "$elfsharedlist" ]; then
314 strip --strip-unneeded -R .note -R .comment $elfsharedlist
318 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
320 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
323 rm -f files.so; touch files.so
324 rm -f files.programs; touch files.programs
325 cd $RPM_BUILD_ROOT%{_libdir}/wine
328 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|opengl32.dll.so|twain.dll.so|twain_32.dll.so|winealsa.drv.so|winearts.drv.so|winejack.drv.so|winenas.drv.so)
331 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
335 for p in $programs; do
336 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
337 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
338 grep -v "$p\.exe\.so$" files.so > files.so.
339 mv -f files.so. files.so
343 rm -rf $RPM_BUILD_ROOT
347 /sbin/chkconfig --add wine
348 if [ ! -f /var/lock/subsys/wine ]; then
349 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
353 if [ "$1" = "0" ]; then
354 if [ -f /var/lock/subsys/wine ]; then
355 /etc/rc.d/init.d/wine stop >&2
357 /sbin/chkconfig --del wine
360 %postun -p /sbin/ldconfig
363 %defattr(644,root,root,755)
364 %doc README DEVELOPERS-HINTS ChangeLog AUTHORS ANNOUNCE
365 %lang(de) %doc documentation/README.de
366 %lang(es) %doc documentation/README.es
367 %lang(fr) %doc documentation/README.fr
368 %lang(it) %doc documentation/README.it
369 %lang(ko) %doc documentation/README.ko
370 %lang(nb) %doc documentation/README.no
371 %lang(pt) %doc documentation/README.pt
372 %lang(pt_BR) %doc documentation/README.pt_br
373 %attr(755,root,root) %{_bindir}/msiexec
374 %attr(755,root,root) %{_bindir}/wine
375 %attr(755,root,root) %{_bindir}/wineboot
376 %attr(755,root,root) %{_bindir}/winebrowser
377 %attr(755,root,root) %{_bindir}/winecfg
378 %attr(755,root,root) %{_bindir}/winedbg
379 %attr(755,root,root) %{_bindir}/wine-kthread
380 %attr(755,root,root) %{_bindir}/winelauncher
381 %attr(755,root,root) %{_bindir}/wineprefixcreate
382 %attr(755,root,root) %{_bindir}/wine-preloader
383 %attr(755,root,root) %{_bindir}/wine-pthread
384 %attr(755,root,root) %{_bindir}/wineserver
385 %attr(755,root,root) %{_bindir}/wineshelllink
386 %attr(755,root,root) %{_libdir}/*.so*
388 %{_libdir}/wine/*.dll16
389 %{_libdir}/wine/*.drv16
390 %{_libdir}/wine/*.exe16
391 %{_mandir}/man1/wine.*
392 %{_mandir}/man1/winedbg.1*
393 %{_mandir}/man1/wineserver.*
394 %attr(754,root,root) /etc/rc.d/init.d/wine
396 %{_datadir}/fonts/wine
397 %{_desktopdir}/wine.desktop
399 %files programs -f files.programs
400 %defattr(644,root,root,755)
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_bindir}/fnt2bdf
405 %attr(755,root,root) %{_bindir}/function_grep.pl
406 %attr(755,root,root) %{_bindir}/widl
407 %attr(755,root,root) %{_bindir}/winebuild
408 %attr(755,root,root) %{_bindir}/winedump
409 %attr(755,root,root) %{_bindir}/wineg++
410 %attr(755,root,root) %{_bindir}/winegcc
411 %attr(755,root,root) %{_bindir}/winemaker
412 #%attr(755,root,root) %{_bindir}/winewrap
413 %attr(755,root,root) %{_bindir}/wmc
414 %attr(755,root,root) %{_bindir}/wrc
415 %{_libdir}/wine/lib*.def
416 # no shared variants, so not separated
417 %{_libdir}/wine/lib*.def.a
418 %{_libdir}/wine/libdx*.a
419 %{_libdir}/wine/libstrmiids.a
420 %{_libdir}/wine/libuuid.a
421 %{_libdir}/wine/libwinecrt0.a
423 %{_mandir}/man1/widl.1*
424 %{_mandir}/man1/winedump.1*
425 %{_mandir}/man1/winegcc.1*
426 %{_mandir}/man1/winemaker.1*
427 %{_mandir}/man1/winebuild.1*
428 %{_mandir}/man1/wmc.1*
429 %{_mandir}/man1/wrc.1*
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
435 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
436 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
437 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
442 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
470 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
474 # additional dependencies in *.so not separated (yet?) from main package
475 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
476 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
477 # ttydrv.dll.so depends on ncurses