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
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): Ejecuta programas Windows en Linux
29 Summary(pl): Program pozwalaj±cy uruchamiaæ aplikacje Windows
30 Summary(pt_BR): Executa programas Windows no Linux
36 Group: Applications/Emulators
37 #Source0: http://dl.sourceforge.net/%{name}/Wine-%{version}.tar.gz
38 #Source0: ftp://ftp.ibiblio.org/pub/Linux/ALPHA/wine/development/Wine-%{version}.tar.gz
39 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
40 # Source0-md5: 20858ca2bcfc6ae765007c40e5cdd550
42 Patch0: %{name}-fontcache.patch
43 Patch1: %{name}-destdir.patch
44 Patch2: %{name}-makedep.patch
45 Patch3: %{name}-alsa.patch
46 # Oliver Stieber's DirectX 9 support patch (unofficial, published on WWN Issue #271)
47 Patch4: %{name}-d3d9patch.patch
48 #PatchX: %{name}-dga.patch
49 URL: http://www.winehq.org/
51 BuildRequires: libSM-devel
52 BuildRequires: libXrandr-devel
53 BuildRequires: libXrender-devel
54 BuildRequires: libXt-devel
55 BuildRequires: libXv-devel
57 BuildRequires: XFree86-devel
59 BuildRequires: XFree86-OpenGL-devel-base
60 BuildRequires: XFree86-OpenGL-devel
61 %{?with_alsa:BuildRequires: alsa-lib-devel}
62 %{?with_arts:BuildRequires: artsc-devel}
63 BuildRequires: autoconf
64 BuildRequires: automake
66 # BuildRequires: chpax >= 0.20020901-2
67 %{?with_cups:BuildRequires: cups-devel}
68 BuildRequires: docbook-dtd31-sgml
69 BuildRequires: docbook-utils
71 BuildRequires: fontconfig-devel
72 BuildRequires: fontforge
73 BuildRequires: freetype-devel >= 2.0.5
74 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
75 BuildRequires: libjpeg-devel
76 BuildRequires: libtool
77 BuildRequires: libungif-devel
78 %{?with_nas:BuildRequires: nas-devel}
79 BuildRequires: ncurses-devel
80 # db2* failed previously - probably openjade or opensp bug
81 BuildRequires: openjade >= 1:1.3.3-0.pre1
82 BuildRequires: opensp >= 1:1.5.1
83 BuildRequires: openssl-devel >= 0.9.7d
84 %{?with_sane:BuildRequires: sane-backends-devel}
85 BuildRequires: xrender-devel
86 Requires(post): /sbin/ldconfig
87 Requires(post,preun): /sbin/chkconfig
88 # link to wine/ntdll.dll.so, without any SONAME
89 Provides: libntdll.dll.so
90 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" }')
101 Wine is a program which allows running Microsoft Windows programs
102 (including DOS, Windows 3.x and Win32 executables) on Unix. It
103 consists of a program loader which loads and executes a Microsoft
104 Windows binary, and a library that implements Windows API calls using
105 their Unix or X11 equivalents. The library may also be used for
106 porting Win32 code into native Unix executables.
109 Ejecuta programas Windows en Linux.
112 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
113 dla Microsoft Windows pod systemami uniksowymi. Sk³ada siê on z
114 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
115 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
116 przy u¿yciu odpowiedników uniksowych oraz z X11. Biblioteka mo¿e byæ
117 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
119 %description -l pt_BR
120 O Wine é um programa que permite rodar programas MS-Windows no X11.
121 Ele consiste de um carregador de programa, que carrega e executa um
122 binário MS-Windows, e de uma biblioteca de emulação que traduz as
123 chamadas da API para as equivalentes Unix/X11.
126 Summary: Wine - header files
127 Summary(es): Biblioteca de desarrollo de wine
128 Summary(pl): Wine - pliki nag³owkowe
129 Summary(pt_BR): Biblioteca de desenvolvimento do wine
130 Group: Development/Libraries
131 Requires: %{name} = %{epoch}:%{version}-%{release}
136 %description devel -l es
137 Biblioteca de desarrollo de wine.
139 %description devel -l pl
140 Wine - pliki nag³ówkowe.
142 %description devel -l pt_BR
143 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
147 Summary: Wine - programs
148 Summary(pl): Wine - programy
150 Requires: %{name} = %{epoch}:%{version}-%{release}
152 %description programs
155 %description programs -l pl
159 Summary: Direct3D implementation DLLs for Wine
160 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
161 Group: Applications/Emulators
162 Requires: %{name} = %{epoch}:%{version}-%{release}
166 Direct3D implementation DLLs for Wine (through OpenGL).
168 %description dll-d3d -l pl
169 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
172 Summary: OpenGL implementation DLLs for Wine
173 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
174 Group: Applications/Emulators
175 Requires: %{name} = %{epoch}:%{version}-%{release}
179 OpenGL implementation DLLs for Wine.
181 %description dll-gl -l pl
182 Biblioteki DLL z implementacj± OpenGL dla Wine.
185 Summary: TWAIN implementation DLL for Wine
186 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
187 Group: Applications/Emulators
188 Requires: %{name} = %{epoch}:%{version}-%{release}
190 %description dll-twain
191 TWAIN implementation DLL for Wine (through SANE).
193 %description dll-twain -l pl
194 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
197 Summary: ALSA driver for WINE mm.dll implementation
198 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
199 Group: Applications/Emulators
200 Requires: %{name} = %{epoch}:%{version}-%{release}
202 %description drv-alsa
203 ALSA driver for WINE mm.dll (multimedia system) implementation.
205 %description drv-alsa -l pl
206 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
209 Summary: aRts driver for WINE mm.dll implementation
210 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
211 Group: Applications/Emulators
212 Requires: %{name} = %{epoch}:%{version}-%{release}
214 %description drv-arts
215 aRts driver for WINE mm.dll (multimedia system) implementation.
217 %description drv-arts -l pl
218 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
221 Summary: JACK driver for WINE mm.dll implementation
222 Summary(pl): Sterownik JACK-a dla implementacji mm.dll w Wine
223 Group: Applications/Emulators
224 Requires: %{name} = %{epoch}:%{version}-%{release}
225 Requires: jack-audio-connection-kit
226 # dlopened by SONAME detected at build time
227 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
229 %description drv-jack
230 JACK driver for WINE mm.dll (multimedia system) implementation.
232 %description drv-jack -l pl
233 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
237 Summary: NAS driver for WINE mm.dll implementation
238 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
239 Group: Applications/Emulators
240 Requires: %{name} = %{epoch}:%{version}-%{release}
243 NAS driver for WINE mm.dll (multimedia system) implementation.
245 %description drv-nas -l pl
246 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
254 %{?with_d3d9:%patch4 -p1}
256 # turn off compilation of some tools
257 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
258 #sed -i -e "s|avitools||" programs/Makefile.in
263 %{!?debug:--disable-debug} \
264 %{!?debug:--disable-trace} \
270 %{__make} -C programs
271 #%{__make} -C programs/regapi
274 rm -rf $RPM_BUILD_ROOT
275 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
278 DESTDIR=$RPM_BUILD_ROOT
280 %{__make} -C programs install \
281 DESTDIR=$RPM_BUILD_ROOT
283 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
285 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
286 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
288 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
289 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
290 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
291 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
292 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
293 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
295 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
297 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
298 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
299 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
301 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
305 waveaudio=mciwave.drv
307 videodisc=mcipionr.drv
312 %if %{?debug:0}%{!?debug:1}
313 echo "Strip executable binaries and shared object files."
314 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
315 elfexelist=`echo $filelist | xargs -r file | \
316 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
317 elfsharedlist=`echo $filelist | xargs -r file | \
318 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
319 if [ -n "$elfexelist" ]; then \
320 strip -R .note -R .comment $elfexelist
322 if [ -n "$elfsharedlist" ]; then
323 strip --strip-unneeded -R .note -R .comment $elfsharedlist
327 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
329 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
332 rm -f files.so; touch files.so
333 rm -f files.programs; touch files.programs
334 cd $RPM_BUILD_ROOT%{_libdir}/wine
337 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)
340 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
344 for p in $programs; do
345 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
346 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
347 grep -v "$p\.exe\.so$" files.so > files.so.
348 mv -f files.so. files.so
352 rm -rf $RPM_BUILD_ROOT
356 /sbin/chkconfig --add wine
357 if [ ! -f /var/lock/subsys/wine ]; then
358 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
362 if [ "$1" = "0" ]; then
363 if [ -f /var/lock/subsys/wine ]; then
364 /etc/rc.d/init.d/wine stop >&2
366 /sbin/chkconfig --del wine
369 %postun -p /sbin/ldconfig
372 %defattr(644,root,root,755)
373 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
374 %lang(de) %doc documentation/README.de
375 %lang(es) %doc documentation/README.es
376 %lang(fr) %doc documentation/README.fr
377 %lang(it) %doc documentation/README.it
378 %lang(pt) %doc documentation/README.pt
379 %lang(pt_BR) %doc documentation/README.pt_br
380 %attr(755,root,root) %{_bindir}/msiexec
381 %attr(755,root,root) %{_bindir}/wine
382 %attr(755,root,root) %{_bindir}/wineboot
383 %attr(755,root,root) %{_bindir}/winebrowser
384 %attr(755,root,root) %{_bindir}/winecfg
385 %attr(755,root,root) %{_bindir}/winedbg
386 %attr(755,root,root) %{_bindir}/wine-kthread
387 %attr(755,root,root) %{_bindir}/winelauncher
388 %attr(755,root,root) %{_bindir}/wineprefixcreate
389 %attr(755,root,root) %{_bindir}/wine-preloader
390 %attr(755,root,root) %{_bindir}/wine-pthread
391 %attr(755,root,root) %{_bindir}/wineserver
392 %attr(755,root,root) %{_bindir}/wineshelllink
393 %attr(755,root,root) %{_libdir}/*.so*
395 %{_mandir}/man1/wine.*
396 %{_mandir}/man1/winedbg.1*
397 %{_mandir}/man1/wineserver.*
398 %attr(754,root,root) /etc/rc.d/init.d/wine
400 %{_datadir}/fonts/wine
401 %{_desktopdir}/wine.desktop
403 %files programs -f files.programs
404 %defattr(644,root,root,755)
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_bindir}/fnt2bdf
409 %attr(755,root,root) %{_bindir}/function_grep.pl
410 %attr(755,root,root) %{_bindir}/widl
411 %attr(755,root,root) %{_bindir}/winebuild
412 %attr(755,root,root) %{_bindir}/winedump
413 %attr(755,root,root) %{_bindir}/wineg++
414 %attr(755,root,root) %{_bindir}/winegcc
415 %attr(755,root,root) %{_bindir}/winemaker
416 #%attr(755,root,root) %{_bindir}/winewrap
417 %attr(755,root,root) %{_bindir}/wmc
418 %attr(755,root,root) %{_bindir}/wrc
420 %{_mandir}/man1/widl.1*
421 %{_mandir}/man1/winedump.1*
422 %{_mandir}/man1/winegcc.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/twain*.dll.so
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
455 %defattr(644,root,root,755)
456 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
461 %defattr(644,root,root,755)
462 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
467 %defattr(644,root,root,755)
468 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
471 # additional dependencies in *.so not separated (yet?) from main package
472 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
473 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
474 # ttydrv.dll.so depends on ncurses