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_without sane # don't build TWAIN DLL with scanning support (through SANE)
8 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
10 # NOTE: wine detects the following SONAMES for dlopen at build time:
11 # libcrypto,libssl (wininet.dll)
12 # libcups (winspool.dll.so,wineps.dll.so)
13 # libcurses/libncurses (wineconsole program)
14 # libfontconfig (gdi32.dll.so)
15 # libfreetype (wineps.dll.so,gdi32.dll.so)
16 # libGL (x11drv.dll.so,ddraw.dll.so)
17 # libjack (winejack.drv.so - explicit dependency in subpackage)
18 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
19 # thus requires rebuild after change of any of the above.
25 Summary: Program that lets you launch Win applications
26 Summary(es): Ejecuta programas Windows en Linux
27 Summary(pl): Program pozwalaj±cy uruchamiaæ aplikacje Windows
28 Summary(pt_BR): Executa programas Windows no Linux
34 Group: Applications/Emulators
35 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
36 # Source0-md5: 0cbcf13e0888b709e8068ab469c7c8b3
37 Patch0: %{name}-fontcache.patch
38 Patch1: %{name}-makedep.patch
39 Patch2: %{name}-alsa.patch
40 Patch3: %{name}-ncurses.patch
41 #PatchX: %{name}-dga.patch
42 URL: http://www.winehq.org/
43 %{?with_alsa:BuildRequires: alsa-lib-devel}
44 %{?with_arts:BuildRequires: artsc-devel}
45 BuildRequires: OpenGL-GLU-devel
46 BuildRequires: OpenGL-glut-devel
47 BuildRequires: autoconf
48 BuildRequires: automake
50 # BuildRequires: chpax >= 0.20020901-2
51 %{?with_cups:BuildRequires: cups-devel}
52 BuildRequires: docbook-dtd31-sgml
53 BuildRequires: docbook-utils
55 BuildRequires: fontconfig-devel
56 # TODO: check if it's required now
57 BuildRequires: fontforge
58 BuildRequires: freetype-devel >= 2.0.5
59 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
60 BuildRequires: libjpeg-devel
61 BuildRequires: libtool
62 BuildRequires: libungif-devel
63 %{?with_nas:BuildRequires: nas-devel}
64 BuildRequires: ncurses-devel
65 # db2* failed previously - probably openjade or opensp bug
66 BuildRequires: openjade >= 1:1.3.3-0.pre1
67 BuildRequires: opensp >= 1:1.5.1
68 BuildRequires: openssl-devel >= 0.9.7d
69 %{?with_sane:BuildRequires: sane-backends-devel}
70 BuildRequires: xorg-lib-libXi-devel
71 BuildRequires: xorg-lib-libXmu-devel
72 BuildRequires: xorg-lib-libXrender-devel
73 BuildRequires: xorg-lib-libXxf86dga-devel
74 BuildRequires: xorg-lib-libXxf86vm-devel
75 Requires: binfmt-detector
76 # link to wine/ntdll.dll.so, without any SONAME
77 Provides: libntdll.dll.so
78 ExclusiveArch: %{ix86}
79 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81 %define _noautoreqdep libGL.so.1 libGLU.so.1
82 %define no_install_post_strip 1
84 %define _winedir %{_datadir}/%{name}
86 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
89 Wine is a program which allows running Microsoft Windows programs
90 (including DOS, Windows 3.x and Win32 executables) on Unix. It
91 consists of a program loader which loads and executes a Microsoft
92 Windows binary, and a library that implements Windows API calls using
93 their Unix or X11 equivalents. The library may also be used for
94 porting Win32 code into native Unix executables.
97 Ejecuta programas Windows en Linux.
100 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
101 dla Microsoft Windows pod systemami uniksowymi. Sk³ada siê on z
102 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
103 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
104 przy u¿yciu odpowiedników uniksowych oraz z X11. Biblioteka mo¿e byæ
105 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
107 %description -l pt_BR
108 O Wine é um programa que permite rodar programas MS-Windows no X11.
109 Ele consiste de um carregador de programa, que carrega e executa um
110 binário MS-Windows, e de uma biblioteca de emulação que traduz as
111 chamadas da API para as equivalentes Unix/X11.
114 Summary: Wine - header files
115 Summary(es): Biblioteca de desarrollo de wine
116 Summary(pl): Wine - pliki nag³owkowe
117 Summary(pt_BR): Biblioteca de desenvolvimento do wine
118 Group: Development/Libraries
119 Requires: %{name} = %{epoch}:%{version}-%{release}
124 %description devel -l es
125 Biblioteca de desarrollo de wine.
127 %description devel -l pl
128 Wine - pliki nag³ówkowe.
130 %description devel -l pt_BR
131 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
135 Summary: Wine - programs
136 Summary(pl): Wine - programy
138 Requires: %{name} = %{epoch}:%{version}-%{release}
140 %description programs
143 %description programs -l pl
147 Summary: Direct3D implementation DLLs for Wine
148 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
149 Group: Applications/Emulators
150 Requires: %{name} = %{epoch}:%{version}-%{release}
154 Direct3D implementation DLLs for Wine (through OpenGL).
156 %description dll-d3d -l pl
157 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
160 Summary: OpenGL implementation DLLs for Wine
161 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
162 Group: Applications/Emulators
163 Requires: %{name} = %{epoch}:%{version}-%{release}
167 OpenGL implementation DLLs for Wine.
169 %description dll-gl -l pl
170 Biblioteki DLL z implementacj± OpenGL dla Wine.
173 Summary: TWAIN implementation DLL for Wine
174 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
175 Group: Applications/Emulators
176 Requires: %{name} = %{epoch}:%{version}-%{release}
178 %description dll-twain
179 TWAIN implementation DLL for Wine (through SANE).
181 %description dll-twain -l pl
182 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
185 Summary: ALSA driver for WINE mm.dll implementation
186 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
187 Group: Applications/Emulators
188 Requires: %{name} = %{epoch}:%{version}-%{release}
190 %description drv-alsa
191 ALSA driver for WINE mm.dll (multimedia system) implementation.
193 %description drv-alsa -l pl
194 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
197 Summary: aRts driver for WINE mm.dll implementation
198 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
199 Group: Applications/Emulators
200 Requires: %{name} = %{epoch}:%{version}-%{release}
202 %description drv-arts
203 aRts driver for WINE mm.dll (multimedia system) implementation.
205 %description drv-arts -l pl
206 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
209 Summary: JACK driver for WINE mm.dll implementation
210 Summary(pl): Sterownik JACK-a dla implementacji mm.dll w Wine
211 Group: Applications/Emulators
212 Requires: %{name} = %{epoch}:%{version}-%{release}
213 Requires: jack-audio-connection-kit
214 # dlopened by SONAME detected at build time
215 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
217 %description drv-jack
218 JACK driver for WINE mm.dll (multimedia system) implementation.
220 %description drv-jack -l pl
221 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
225 Summary: NAS driver for WINE mm.dll implementation
226 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
227 Group: Applications/Emulators
228 Requires: %{name} = %{epoch}:%{version}-%{release}
231 NAS driver for WINE mm.dll (multimedia system) implementation.
233 %description drv-nas -l pl
234 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
243 # turn off compilation of some tools
244 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
245 #sed -i -e "s|avitools||" programs/Makefile.in
251 %{!?debug:--disable-debug} \
252 %{!?debug:--disable-trace} \
258 %{__make} -C programs
259 #%{__make} -C programs/regapi
262 rm -rf $RPM_BUILD_ROOT
263 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
266 DESTDIR=$RPM_BUILD_ROOT
268 %{__make} -C programs install \
269 DESTDIR=$RPM_BUILD_ROOT
271 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
273 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
274 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
277 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
278 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
279 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
280 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
281 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
283 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
284 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
285 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
287 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
291 waveaudio=mciwave.drv
293 videodisc=mcipionr.drv
298 %if %{?debug:0}%{!?debug:1}
299 echo "Strip executable binaries and shared object files."
300 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
301 elfexelist=`echo $filelist | xargs -r file | \
302 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
303 elfsharedlist=`echo $filelist | xargs -r file | \
304 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
305 if [ -n "$elfexelist" ]; then \
306 strip -R .note -R .comment $elfexelist
308 if [ -n "$elfsharedlist" ]; then
309 strip --strip-unneeded -R .note -R .comment $elfsharedlist
313 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
315 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
318 rm -f files.so; touch files.so
319 rm -f files.programs; touch files.programs
320 cd $RPM_BUILD_ROOT%{_libdir}/wine
323 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|glut32.dll.so|opengl32.dll.so|sane.ds.so|twain.dll.so|twain_32.dll.so|winealsa.drv.so|winearts.drv.so|winejack.drv.so|winenas.drv.so)
326 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
330 for p in $programs; do
331 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
332 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
333 grep -v "$p\.exe\.so$" files.so > files.so.
334 mv -f files.so. files.so
338 rm -rf $RPM_BUILD_ROOT
340 %post -p /sbin/ldconfig
341 %postun -p /sbin/ldconfig
343 %triggerpostun -- wine < 1:0.9.12-1.9
344 if [ -f /var/lock/subsys/wine ]; then
345 /etc/rc.d/init.d/wine stop >&2
347 if [ -x /sbin/chkconfig ]; then
348 /sbin/chkconfig --del wine
352 %defattr(644,root,root,755)
353 %doc README DEVELOPERS-HINTS ChangeLog AUTHORS ANNOUNCE
354 %lang(de) %doc documentation/README.de
355 %lang(es) %doc documentation/README.es
356 %lang(fr) %doc documentation/README.fr
357 %lang(it) %doc documentation/README.it
358 %lang(ko) %doc documentation/README.ko
359 %lang(nb) %doc documentation/README.no
360 %lang(pt) %doc documentation/README.pt
361 %lang(pt_BR) %doc documentation/README.pt_br
362 %attr(755,root,root) %{_bindir}/msiexec
363 %attr(755,root,root) %{_bindir}/wine
364 %attr(755,root,root) %{_bindir}/wineboot
365 %attr(755,root,root) %{_bindir}/winebrowser
366 %attr(755,root,root) %{_bindir}/winecfg
367 %attr(755,root,root) %{_bindir}/winedbg
368 %attr(755,root,root) %{_bindir}/wine-kthread
369 %attr(755,root,root) %{_bindir}/winelauncher
370 %attr(755,root,root) %{_bindir}/wineprefixcreate
371 %attr(755,root,root) %{_bindir}/wine-preloader
372 %attr(755,root,root) %{_bindir}/wine-pthread
373 %attr(755,root,root) %{_bindir}/wineserver
374 %attr(755,root,root) %{_bindir}/wineshelllink
375 %attr(755,root,root) %{_libdir}/*.so*
377 %{_libdir}/wine/*.dll16
378 %{_libdir}/wine/*.drv16
379 %{_libdir}/wine/*.exe16
380 %{_mandir}/man1/wine.*
381 %{_mandir}/man1/winedbg.1*
382 %{_mandir}/man1/wineserver.*
384 %{_desktopdir}/wine.desktop
386 %files programs -f files.programs
387 %defattr(644,root,root,755)
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_bindir}/fnt2bdf
392 %attr(755,root,root) %{_bindir}/function_grep.pl
393 %attr(755,root,root) %{_bindir}/widl
394 %attr(755,root,root) %{_bindir}/winebuild
395 %attr(755,root,root) %{_bindir}/winedump
396 %attr(755,root,root) %{_bindir}/wineg++
397 %attr(755,root,root) %{_bindir}/winegcc
398 %attr(755,root,root) %{_bindir}/winemaker
399 #%attr(755,root,root) %{_bindir}/winewrap
400 %attr(755,root,root) %{_bindir}/wmc
401 %attr(755,root,root) %{_bindir}/wrc
402 %{_libdir}/wine/lib*.def
403 # no shared variants, so not separated
404 %{_libdir}/wine/lib*.def.a
405 %{_libdir}/wine/libdx*.a
406 %{_libdir}/wine/libstrmiids.a
407 %{_libdir}/wine/libuuid.a
408 %{_libdir}/wine/libwinecrt0.a
410 %{_mandir}/man1/widl.1*
411 %{_mandir}/man1/winedump.1*
412 %{_mandir}/man1/winegcc.1*
413 %{_mandir}/man1/winemaker.1*
414 %{_mandir}/man1/winebuild.1*
415 %{_mandir}/man1/wmc.1*
416 %{_mandir}/man1/wrc.1*
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
422 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
423 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
424 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
429 %attr(755,root,root) %{_libdir}/wine/glut32.dll.so
430 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
434 %defattr(644,root,root,755)
435 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
436 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
447 %defattr(644,root,root,755)
448 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
453 %defattr(644,root,root,755)
454 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
459 %defattr(644,root,root,755)
460 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
463 # additional dependencies in *.so not separated (yet?) from main package
464 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
465 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
466 # ttydrv.dll.so depends on ncurses