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
35 Group: Applications/Emulators
36 #Source0: http://dl.sourceforge.net/%{name}/Wine-%{version}.tar.gz
37 Source0: ftp://ftp.ibiblio.org/pub/Linux/ALPHA/%{name}/development/Wine-%{version}.tar.gz
38 # Source0-md5: b59df637e4279065549c4ab2fec8aff9
41 Source3: %{name}.systemreg
42 Source4: %{name}.userreg
43 Patch0: %{name}-fontcache.patch
44 Patch1: %{name}-destdir.patch
45 Patch2: %{name}-ncurses.patch
46 Patch3: %{name}-makedep.patch
47 Patch4: %{name}-alsa.patch
48 # Oliver Stieber's DirectX 9 support patch (unofficial, published on WWN Issue #271)
49 Patch5: %{name}-d3d9patch.patch
50 #PatchX: %{name}-dga.patch
51 URL: http://www.winehq.org/
53 BuildRequires: libSM-devel
54 BuildRequires: libXrandr-devel
55 BuildRequires: libXrender-devel
56 BuildRequires: libXt-devel
57 BuildRequires: libXv-devel
59 BuildRequires: XFree86-devel
61 BuildRequires: XFree86-OpenGL-devel-base
62 BuildRequires: XFree86-OpenGL-devel
63 %{?with_alsa:BuildRequires: alsa-lib-devel}
64 %{?with_arts:BuildRequires: artsc-devel}
65 BuildRequires: autoconf
66 BuildRequires: automake
68 # BuildRequires: chpax >= 0.20020901-2
69 %{?with_cups:BuildRequires: cups-devel}
70 BuildRequires: docbook-dtd31-sgml
71 BuildRequires: docbook-utils
73 BuildRequires: fontconfig-devel
74 BuildRequires: fontforge
75 BuildRequires: freetype-devel >= 2.0.5
76 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
77 BuildRequires: libjpeg-devel
78 BuildRequires: libtool
79 BuildRequires: libungif-devel
80 %{?with_nas:BuildRequires: nas-devel}
81 BuildRequires: ncurses-devel
82 # db2* failed previously - probably openjade or opensp bug
83 BuildRequires: openjade >= 1:1.3.3-0.pre1
84 BuildRequires: opensp >= 1:1.5.1
85 BuildRequires: openssl-devel >= 0.9.7d
86 %{?with_sane:BuildRequires: sane-backends-devel}
87 BuildRequires: xrender-devel
88 Requires(post): /sbin/ldconfig
89 Requires(post,preun): /sbin/chkconfig
90 # link to wine/ntdll.dll.so, without any SONAME
91 Provides: libntdll.dll.so
92 ExclusiveArch: %{ix86}
93 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
95 %define _noautoreqdep libGL.so.1 libGLU.so.1
96 %define no_install_post_strip 1
98 %define _winedir %{_datadir}/%{name}
100 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
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.
111 Ejecuta programas Windows en Linux.
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
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): Biblioteca de desarrollo de wine
130 Summary(pl): Wine - pliki nag³owkowe
131 Summary(pt_BR): Biblioteca de desenvolvimento do wine
132 Group: Development/Libraries
133 Requires: %{name} = %{version}-%{release}
138 %description devel -l es
139 Biblioteca de desarrollo de wine.
141 %description devel -l pl
142 Wine - pliki nag³ówkowe.
144 %description devel -l pt_BR
145 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
149 Summary: Wine - programs
150 Summary(pl): Wine - programy
152 Requires: %{name} = %{version}-%{release}
154 %description programs
157 %description programs -l pl
161 Summary: Direct3D implementation DLLs for Wine
162 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
163 Group: Applications/Emulators
164 Requires: %{name} = %{version}-%{release}
168 Direct3D implementation DLLs for Wine (through OpenGL).
170 %description dll-d3d -l pl
171 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
174 Summary: OpenGL implementation DLLs for Wine
175 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
176 Group: Applications/Emulators
177 Requires: %{name} = %{version}-%{release}
181 OpenGL implementation DLLs for Wine.
183 %description dll-gl -l pl
184 Biblioteki DLL z implementacj± OpenGL dla Wine.
187 Summary: TWAIN implementation DLL for Wine
188 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
189 Group: Applications/Emulators
190 Requires: %{name} = %{version}-%{release}
192 %description dll-twain
193 TWAIN implementation DLL for Wine (through SANE).
195 %description dll-twain -l pl
196 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
199 Summary: ALSA driver for WINE mm.dll implementation
200 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
201 Group: Applications/Emulators
202 Requires: %{name} = %{version}-%{release}
204 %description drv-alsa
205 ALSA driver for WINE mm.dll (multimedia system) implementation.
207 %description drv-alsa -l pl
208 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
211 Summary: aRts driver for WINE mm.dll implementation
212 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
213 Group: Applications/Emulators
214 Requires: %{name} = %{version}-%{release}
216 %description drv-arts
217 aRts driver for WINE mm.dll (multimedia system) implementation.
219 %description drv-arts -l pl
220 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
223 Summary: JACK driver for WINE mm.dll implementation
224 Summary(pl): Sterownik JACK-a dla implementacji mm.dll w Wine
225 Group: Applications/Emulators
226 Requires: %{name} = %{version}-%{release}
227 Requires: jack-audio-connection-kit
228 # dlopened by SONAME detected at build time
229 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
231 %description drv-jack
232 JACK driver for WINE mm.dll (multimedia system) implementation.
234 %description drv-jack -l pl
235 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
239 Summary: NAS driver for WINE mm.dll implementation
240 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
241 Group: Applications/Emulators
242 Requires: %{name} = %{version}-%{release}
245 NAS driver for WINE mm.dll (multimedia system) implementation.
247 %description drv-nas -l pl
248 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
257 %{?with_d3d9:%patch5 -p1}
259 # turn off compilation of some tools
260 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
261 #sed -i -e "s|avitools||" programs/Makefile.in
266 %{!?debug:--disable-debug} \
267 %{!?debug:--disable-trace} \
273 %{__make} -C programs
274 #%{__make} -C programs/regapi
277 rm -rf $RPM_BUILD_ROOT
278 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
281 DESTDIR=$RPM_BUILD_ROOT
283 %{__make} -C programs install \
284 DESTDIR=$RPM_BUILD_ROOT
286 install programs/winhelp/hlp2sgml $RPM_BUILD_ROOT%{_bindir}
287 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
289 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
290 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
292 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
293 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
294 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
295 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
296 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
297 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
299 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
300 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
301 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
302 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
304 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
305 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
306 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
308 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
312 waveaudio=mciwave.drv
314 videodisc=mcipionr.drv
319 %if %{?debug:0}%{!?debug:1}
320 echo "Strip executable binaries and shared object files."
321 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
322 elfexelist=`echo $filelist | xargs -r file | \
323 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
324 elfsharedlist=`echo $filelist | xargs -r file | \
325 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
326 if [ -n "$elfexelist" ]; then \
327 strip -R .note -R .comment $elfexelist
329 if [ -n "$elfsharedlist" ]; then
330 strip --strip-unneeded -R .note -R .comment $elfsharedlist
334 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
336 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
339 rm -f files.so; touch files.so
340 rm -f files.programs; touch files.programs
341 cd $RPM_BUILD_ROOT%{_libdir}/wine
344 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)
347 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
351 for p in $programs; do
352 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
353 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
354 grep -v "$p\.exe\.so$" files.so > files.so.
355 mv -f files.so. files.so
359 rm -rf $RPM_BUILD_ROOT
363 /sbin/chkconfig --add wine
364 if [ ! -f /var/lock/subsys/wine ]; then
365 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
369 if [ "$1" = "0" ]; then
370 if [ -f /var/lock/subsys/wine ]; then
371 /etc/rc.d/init.d/wine stop >&2
373 /sbin/chkconfig --del wine
376 %postun -p /sbin/ldconfig
379 %defattr(644,root,root,755)
380 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
381 %lang(de) %doc documentation/README.de
382 %lang(es) %doc documentation/README.es
383 %lang(fr) %doc documentation/README.fr
384 %lang(it) %doc documentation/README.it
385 %lang(pt) %doc documentation/README.pt
386 %lang(pt_br) %doc documentation/README.pt_br
387 %attr(755,root,root) %{_bindir}/msiexec
388 %attr(755,root,root) %{_bindir}/wine
389 %attr(755,root,root) %{_bindir}/wineboot
390 %attr(755,root,root) %{_bindir}/winebrowser
391 %attr(755,root,root) %{_bindir}/winecfg
392 %attr(755,root,root) %{_bindir}/winedbg
393 %attr(755,root,root) %{_bindir}/wine-kthread
394 %attr(755,root,root) %{_bindir}/winelauncher
395 %attr(755,root,root) %{_bindir}/wineprefixcreate
396 %attr(755,root,root) %{_bindir}/wine-preloader
397 %attr(755,root,root) %{_bindir}/wine-pthread
398 %attr(755,root,root) %{_bindir}/wineserver
399 %attr(755,root,root) %{_bindir}/wineshelllink
400 %attr(755,root,root) %{_libdir}/*.so*
402 %{_mandir}/man1/wine.*
403 %{_mandir}/man1/winedbg.1*
404 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.reg
405 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.systemreg
406 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.userreg
407 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
409 %{_datadir}/fonts/wine
410 %{_desktopdir}/wine.desktop
412 %files programs -f files.programs
413 %defattr(644,root,root,755)
416 %defattr(644,root,root,755)
417 %if %{with html_docs}
418 %doc documentation/{wine-devel,winelib-user}
420 %attr(755,root,root) %{_bindir}/fnt2bdf
421 %attr(755,root,root) %{_bindir}/function_grep.pl
422 %attr(755,root,root) %{_bindir}/hlp2sgml
423 %attr(755,root,root) %{_bindir}/widl
424 %attr(755,root,root) %{_bindir}/winebuild
425 %attr(755,root,root) %{_bindir}/winedump
426 %attr(755,root,root) %{_bindir}/wineg++
427 %attr(755,root,root) %{_bindir}/winegcc
428 %attr(755,root,root) %{_bindir}/winemaker
429 #%attr(755,root,root) %{_bindir}/winewrap
430 %attr(755,root,root) %{_bindir}/wmc
431 %attr(755,root,root) %{_bindir}/wrc
433 %{_mandir}/man1/widl.1*
434 %{_mandir}/man1/winedump.1*
435 %{_mandir}/man1/winegcc.1*
436 %{_mandir}/man1/winemaker.1*
437 %{_mandir}/man1/winebuild.1*
438 %{_mandir}/man1/wmc.1*
439 %{_mandir}/man1/wrc.1*
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
445 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
446 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
447 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
452 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
456 %defattr(644,root,root,755)
457 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
480 %defattr(644,root,root,755)
481 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
484 # additional dependencies in *.so not separated (yet?) from main package
485 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
486 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
487 # ttydrv.dll.so depends on ncurses