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: e0a3e2d52f1e2d80b8bf232b58161fe5
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}-dga.patch
48 # Oliver Stieber's DirectX 9 support patch (unofficial, published on WWN Issue #271)
49 Patch5: %{name}-d3d9patch.patch
50 URL: http://www.winehq.org/
52 BuildRequires: libSM-devel
53 BuildRequires: libXrandr-devel
54 BuildRequires: libXrender-devel
55 BuildRequires: libXt-devel
56 BuildRequires: libXv-devel
58 BuildRequires: XFree86-devel
60 BuildRequires: XFree86-OpenGL-devel-base
61 BuildRequires: XFree86-OpenGL-devel
62 %{?with_alsa:BuildRequires: alsa-lib-devel}
63 %{?with_arts:BuildRequires: artsc-devel}
64 BuildRequires: autoconf
65 BuildRequires: automake
67 # BuildRequires: chpax >= 0.20020901-2
68 %{?with_cups:BuildRequires: cups-devel}
69 BuildRequires: docbook-dtd31-sgml
70 BuildRequires: docbook-utils
72 BuildRequires: fontconfig-devel
73 BuildRequires: fontforge
74 BuildRequires: freetype-devel >= 2.0.5
75 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
76 BuildRequires: libjpeg-devel
77 BuildRequires: libtool
78 BuildRequires: libungif-devel
79 %{?with_nas:BuildRequires: nas-devel}
80 BuildRequires: ncurses-devel
81 # db2* failed previously - probably openjade or opensp bug
82 BuildRequires: openjade >= 1:1.3.3-0.pre1
83 BuildRequires: opensp >= 1:1.5.1
84 BuildRequires: openssl-devel >= 0.9.7d
85 %{?with_sane:BuildRequires: sane-backends-devel}
86 BuildRequires: xrender-devel
87 Requires(post): /sbin/ldconfig
88 Requires(post,preun): /sbin/chkconfig
89 # link to wine/ntdll.dll.so, without any SONAME
90 Provides: libntdll.dll.so
91 ExclusiveArch: %{ix86}
92 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94 %define _noautoreqdep libGL.so.1 libGLU.so.1
95 %define no_install_post_strip 1
97 %define _winedir %{_datadir}/%{name}
99 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
102 Wine is a program which allows running Microsoft Windows programs
103 (including DOS, Windows 3.x and Win32 executables) on Unix. It
104 consists of a program loader which loads and executes a Microsoft
105 Windows binary, and a library that implements Windows API calls using
106 their Unix or X11 equivalents. The library may also be used for
107 porting Win32 code into native Unix executables.
110 Ejecuta programas Windows en Linux.
113 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
114 dla Microsoft Windows pod systemami uniksowymi. Sk³ada siê on z
115 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
116 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
117 przy u¿yciu odpowiedników uniksowych oraz z X11. Biblioteka mo¿e byæ
118 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
120 %description -l pt_BR
121 O Wine é um programa que permite rodar programas MS-Windows no X11.
122 Ele consiste de um carregador de programa, que carrega e executa um
123 binário MS-Windows, e de uma biblioteca de emulação que traduz as
124 chamadas da API para as equivalentes Unix/X11.
127 Summary: Wine - header files
128 Summary(es): Biblioteca de desarrollo de wine
129 Summary(pl): Wine - pliki nag³owkowe
130 Summary(pt_BR): Biblioteca de desenvolvimento do wine
131 Group: Development/Libraries
132 Requires: %{name} = %{version}-%{release}
137 %description devel -l es
138 Biblioteca de desarrollo de wine.
140 %description devel -l pl
141 Wine - pliki nag³ówkowe.
143 %description devel -l pt_BR
144 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
148 Summary: Wine - programs
149 Summary(pl): Wine - programy
151 Requires: %{name} = %{version}-%{release}
153 %description programs
156 %description programs -l pl
160 Summary: Direct3D implementation DLLs for Wine
161 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
162 Group: Applications/Emulators
163 Requires: %{name} = %{version}-%{release}
167 Direct3D implementation DLLs for Wine (through OpenGL).
169 %description dll-d3d -l pl
170 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
173 Summary: OpenGL implementation DLLs for Wine
174 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
175 Group: Applications/Emulators
176 Requires: %{name} = %{version}-%{release}
180 OpenGL implementation DLLs for Wine.
182 %description dll-gl -l pl
183 Biblioteki DLL z implementacj± OpenGL dla Wine.
186 Summary: TWAIN implementation DLL for Wine
187 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
188 Group: Applications/Emulators
189 Requires: %{name} = %{version}-%{release}
191 %description dll-twain
192 TWAIN implementation DLL for Wine (through SANE).
194 %description dll-twain -l pl
195 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
198 Summary: ALSA driver for WINE mm.dll implementation
199 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
200 Group: Applications/Emulators
201 Requires: %{name} = %{version}-%{release}
203 %description drv-alsa
204 ALSA driver for WINE mm.dll (multimedia system) implementation.
206 %description drv-alsa -l pl
207 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
210 Summary: aRts driver for WINE mm.dll implementation
211 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
212 Group: Applications/Emulators
213 Requires: %{name} = %{version}-%{release}
215 %description drv-arts
216 aRts driver for WINE mm.dll (multimedia system) implementation.
218 %description drv-arts -l pl
219 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
222 Summary: JACK driver for WINE mm.dll implementation
223 Summary(pl): Sterownik JACK-a dla implementacji mm.dll w Wine
224 Group: Applications/Emulators
225 Requires: %{name} = %{version}-%{release}
226 Requires: jack-audio-connection-kit
227 # dlopened by SONAME detected at build time
228 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
230 %description drv-jack
231 JACK driver for WINE mm.dll (multimedia system) implementation.
233 %description drv-jack -l pl
234 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
238 Summary: NAS driver for WINE mm.dll implementation
239 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
240 Group: Applications/Emulators
241 Requires: %{name} = %{version}-%{release}
244 NAS driver for WINE mm.dll (multimedia system) implementation.
246 %description drv-nas -l pl
247 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
255 %{?with_d3d9:%patch5 -p1}
257 # turn off compilation of some tools
258 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
259 #sed -i -e "s|avitools||" programs/Makefile.in
264 %{!?debug:--disable-debug} \
265 %{!?debug:--disable-trace} \
271 %{__make} -C programs
272 #%{__make} -C programs/regapi
275 rm -rf $RPM_BUILD_ROOT
276 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
279 DESTDIR=$RPM_BUILD_ROOT
281 %{__make} -C programs install \
282 DESTDIR=$RPM_BUILD_ROOT
284 install programs/winhelp/hlp2sgml $RPM_BUILD_ROOT%{_bindir}
285 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
287 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
288 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
290 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
291 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
292 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
293 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
294 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
295 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
297 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
298 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
299 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
300 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
302 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
303 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
304 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
306 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
310 waveaudio=mciwave.drv
312 videodisc=mcipionr.drv
317 %if %{?debug:0}%{!?debug:1}
318 echo "Strip executable binaries and shared object files."
319 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
320 elfexelist=`echo $filelist | xargs -r file | \
321 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
322 elfsharedlist=`echo $filelist | xargs -r file | \
323 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
324 if [ -n "$elfexelist" ]; then \
325 strip -R .note -R .comment $elfexelist
327 if [ -n "$elfsharedlist" ]; then
328 strip --strip-unneeded -R .note -R .comment $elfsharedlist
332 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
334 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
337 rm -f files.so; touch files.so
338 rm -f files.programs; touch files.programs
339 cd $RPM_BUILD_ROOT%{_libdir}/wine
342 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)
345 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
349 for p in $programs; do
350 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
351 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
352 grep -v "$p\.exe\.so$" files.so > files.so.
353 mv -f files.so. files.so
357 rm -rf $RPM_BUILD_ROOT
361 /sbin/chkconfig --add wine
362 if [ ! -f /var/lock/subsys/wine ]; then
363 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
367 if [ "$1" = "0" ]; then
368 if [ -f /var/lock/subsys/wine ]; then
369 /etc/rc.d/init.d/wine stop >&2
371 /sbin/chkconfig --del wine
374 %postun -p /sbin/ldconfig
377 %defattr(644,root,root,755)
378 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
379 %doc documentation/samples
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}/man5/wine.conf.*
398 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.reg
399 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.systemreg
400 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.userreg
401 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
403 %{_datadir}/fonts/wine
404 %{_desktopdir}/wine.desktop
406 %files programs -f files.programs
407 %defattr(644,root,root,755)
410 %defattr(644,root,root,755)
411 %if %{with html_docs}
412 %doc documentation/{wine-devel,winelib-user}
414 %attr(755,root,root) %{_bindir}/fnt2bdf
415 %attr(755,root,root) %{_bindir}/function_grep.pl
416 %attr(755,root,root) %{_bindir}/hlp2sgml
417 %attr(755,root,root) %{_bindir}/widl
418 %attr(755,root,root) %{_bindir}/winebuild
419 %attr(755,root,root) %{_bindir}/winedump
420 %attr(755,root,root) %{_bindir}/wineg++
421 %attr(755,root,root) %{_bindir}/winegcc
422 %attr(755,root,root) %{_bindir}/winemaker
423 #%attr(755,root,root) %{_bindir}/winewrap
424 %attr(755,root,root) %{_bindir}/wmc
425 %attr(755,root,root) %{_bindir}/wrc
427 %{_mandir}/man1/widl.1*
428 %{_mandir}/man1/winedump.1*
429 %{_mandir}/man1/winegcc.1*
430 %{_mandir}/man1/winemaker.1*
431 %{_mandir}/man1/winebuild.1*
432 %{_mandir}/man1/wmc.1*
433 %{_mandir}/man1/wrc.1*
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
439 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
440 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
441 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
444 %defattr(644,root,root,755)
445 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
446 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
456 %defattr(644,root,root,755)
457 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
478 # additional dependencies in *.so not separated (yet?) from main package
479 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
480 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
481 # ttydrv.dll.so depends on ncurses