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
9 %bcond_without html_docs # build html docs
10 %bcond_without pdf_docs # build pdf docs
12 # NOTE: wine detects 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, libXrender (x11drv.dll.so)
21 # thus requires requild after change of any of 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-md5: 33cf9c11e5208175bad540c0e822183e
40 Source3: %{name}.systemreg
41 Source4: %{name}.userreg
42 Patch0: %{name}-fontcache.patch
43 Patch1: %{name}-destdir.patch
44 Patch2: %{name}-ncurses.patch
45 Patch3: %{name}-makedep.patch
46 Patch4: %{name}-dga.patch
47 URL: http://www.winehq.org/
48 BuildRequires: OpenGL-devel
49 BuildRequires: XFree86-devel
50 %{?with_alsa:BuildRequires: alsa-lib-devel}
51 %{?with_arts:BuildRequires: artsc-devel}
52 BuildRequires: autoconf
53 BuildRequires: automake
55 # BuildRequires: chpax >= 0.20020901-2
56 %{?with_cups:BuildRequires: cups-devel}
57 BuildRequires: docbook-dtd31-sgml
58 BuildRequires: docbook-utils
60 BuildRequires: fontconfig-devel
61 BuildRequires: freetype-devel >= 2.0.5
62 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
63 BuildRequires: libjpeg-devel
64 BuildRequires: libungif-devel
65 %{?with_nas:BuildRequires: nas-devel}
66 BuildRequires: ncurses-devel
67 %if %{with html_docs} || %{with pdf_docs}
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
72 BuildRequires: openssl-devel
74 BuildRequires: tetex-metafont
75 BuildRequires: tetex-fonts-jknappen
76 BuildRequires: tetex-fonts-pazo
77 BuildRequires: tetex-fonts-stmaryrd
78 BuildRequires: tetex-fonts-type1-urw
80 %{?with_sane:BuildRequires: sane-backends-devel}
81 BuildRequires: xrender-devel
82 Requires(post): /sbin/ldconfig
83 Requires(post,preun): /sbin/chkconfig
84 # link to wine/ntdll.dll.so, without any SONAME
85 Provides: libntdll.dll.so
86 ExclusiveArch: %{ix86}
87 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89 %define _noautoreqdep libGL.so.1 libGLU.so.1
90 %define no_install_post_strip 1
92 %define _winedir %{_datadir}/%{name}
94 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2 }')
97 Wine is a program which allows running Microsoft Windows programs
98 (including DOS, Windows 3.x and Win32 executables) on Unix. It
99 consists of a program loader which loads and executes a Microsoft
100 Windows binary, and a library that implements Windows API calls using
101 their Unix or X11 equivalents. The library may also be used for
102 porting Win32 code into native Unix executables.
105 Ejecuta programas Windows en Linux.
108 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
109 dla Microsoft Windows pod systemami unixowymi. Sk³ada siê on z
110 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
111 Microsoft Windows oraz z biblioteki, która implementuje API Windows
112 przy u¿yciu odpowiedników Unixowych oraz z X11. Biblioteka mo¿e byæ
113 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Unixa.
115 %description -l pt_BR
116 O Wine é um programa que permite rodar programas MS-Windows no X11.
117 Ele consiste de um carregador de programa, que carrega e executa um
118 binário MS-Windows, e de uma biblioteca de emulação que traduz as
119 chamadas da API para as equivalentes Unix/X11.
122 Summary: Wine - header files
123 Summary(es): Biblioteca de desarrollo de wine
124 Summary(pl): Wine - pliki nag³owkowe
125 Summary(pt_BR): Biblioteca de desenvolvimento do wine
126 Group: Development/Libraries
127 Requires: %{name} = %{version}
132 %description devel -l es
133 Biblioteca de desarrollo de wine.
135 %description devel -l pl
136 Wine - pliki nag³ówkowe.
138 %description devel -l pt_BR
139 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
143 Summary: Wine - programs
144 Summary(pl): Wine - programy
146 Requires: %{name} = %{version}
148 %description programs
151 %description programs -l pl
155 Summary: Wine documentation in PDF
156 Summary(pl): Dokumentacja Wine w formacie PDF
160 Wine documentation in PDF format.
162 %description doc-pdf -l pl
163 Dokumentacja Wine w formacie PDF.
166 Summary: Direct3D implementation DLLs for Wine
167 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
168 Group: Applications/Emulators
169 Requires: %{name} = %{version}
173 Direct3D implementation DLLs for Wine (through OpenGL).
175 %description dll-d3d -l pl
176 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
179 Summary: OpenGL implementation DLLs for Wine
180 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
181 Group: Applications/Emulators
182 Requires: %{name} = %{version}
186 OpenGL implementation DLLs for Wine.
188 %description dll-gl -l pl
189 Biblioteki DLL z implementacj± OpenGL dla Wine.
192 Summary: TWAIN implementation DLL for Wine
193 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
194 Group: Applications/Emulators
195 Requires: %{name} = %{version}
197 %description dll-twain
198 TWAIN implementation DLL for Wine (through SANE).
200 %description dll-twain -l pl
201 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
204 Summary: ALSA driver for WINE mm.dll implementation
205 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
206 Group: Applications/Emulators
207 Requires: %{name} = %{version}
209 %description drv-alsa
210 ALSA driver for WINE mm.dll (multimedia system) implementation.
212 %description drv-alsa -l pl
213 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
216 Summary: aRts driver for WINE mm.dll implementation
217 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
218 Group: Applications/Emulators
219 Requires: %{name} = %{version}
221 %description drv-arts
222 aRts driver for WINE mm.dll (multimedia system) implementation.
224 %description drv-arts -l pl
225 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
228 Summary: JACK driver for WINE mm.dll implementation
229 Summary(pl): Sterownik JACK dla implementacji mm.dll w Wine
230 Group: Applications/Emulators
231 Requires: %{name} = %{version}
232 Requires: jack-audio-connection-kit
233 # dlopened by SONAME detected at build time
235 Requires: %{getsoname /usr/lib/libjack.so}
238 %description drv-jack
239 JACK driver for WINE mm.dll (multimedia system) implementation.
241 %description drv-jack -l pl
242 Sterownik JACK dla implementacji mm.dll (systemu multimediów) w Wine.
245 Summary: NAS driver for WINE mm.dll implementation
246 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
247 Group: Applications/Emulators
248 Requires: %{name} = %{version}
251 NAS driver for WINE mm.dll (multimedia system) implementation.
253 %description drv-nas -l pl
254 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
264 # turn off compilation of some tools
265 #sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
266 sed -e "s|avitools||" programs/Makefile.in > .tmp
267 mv -f .tmp programs/Makefile.in
272 CPPFLAGS="-I/usr/include/ncurses -DALSA_PCM_OLD_HW_PARAMS_API"; export CPPFLAGS
273 CFLAGS="%{rpmcflags} $CPPFLAGS"
275 %{!?debug:--disable-debug} \
276 %{!?debug:--disable-trace} \
282 %{__make} -C programs
283 #%{__make} -C programs/regapi
286 %if %{with html_docs}
287 db2html wine-user.sgml
288 db2html wine-devel.sgml
289 db2html wine-faq.sgml
290 db2html winelib-user.sgml
294 db2pdf wine-user.sgml
295 db2pdf wine-devel.sgml
297 db2pdf winelib-user.sgml
302 rm -rf $RPM_BUILD_ROOT
303 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
306 DESTDIR=$RPM_BUILD_ROOT
308 %{__make} -C programs install \
309 DESTDIR=$RPM_BUILD_ROOT
311 install programs/winhelp/hlp2sgml $RPM_BUILD_ROOT%{_bindir}
312 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
314 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
315 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
317 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
318 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
319 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
320 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
321 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
322 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
324 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
325 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
326 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
327 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
329 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
330 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
331 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
333 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
337 waveaudio=mciwave.drv
339 videodisc=mcipionr.drv
344 %if %{?debug:0}%{!?debug:1}
345 echo "Strip executable binaries and shared object files."
346 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
347 elfexelist=`echo $filelist | xargs -r file | \
348 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
349 elfsharedlist=`echo $filelist | xargs -r file | \
350 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
351 if [ -n "$elfexelist" ]; then \
352 strip -R .note -R .comment $elfexelist
354 if [ -n "$elfsharedlist" ]; then
355 strip --strip-unneeded -R .note -R .comment $elfsharedlist
359 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
361 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
364 rm -f files.so; touch files.so
365 rm -f files.programs; touch files.programs
366 cd $RPM_BUILD_ROOT%{_libdir}/wine
369 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|opengl32.dll.so|twain_32.dll.so|winealsa.drv.so|winearts.drv.so|winejack.drv.so|winenas.drv.so)
372 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
376 for p in $programs; do
377 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
378 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
379 grep -v "$p\.exe\.so$" files.so > files.so.
380 mv -f files.so. files.so
384 rm -rf $RPM_BUILD_ROOT
388 /sbin/chkconfig --add wine
389 if [ ! -f /var/lock/subsys/wine ]; then
390 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
394 if [ "$1" = "0" ]; then
395 if [ -f /var/lock/subsys/wine ]; then
396 /etc/rc.d/init.d/wine stop >&2
398 /sbin/chkconfig --del wine
401 %postun -p /sbin/ldconfig
404 %defattr(644,root,root,755)
405 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
406 %doc documentation/samples
407 %if %{with html_docs}
408 %doc documentation/wine-{faq,user}
410 %attr(755,root,root) %{_bindir}/wine
411 %attr(755,root,root) %{_bindir}/wine-kthread
412 %attr(755,root,root) %{_bindir}/wine-pthread
413 %attr(755,root,root) %{_bindir}/wineboot
414 %attr(755,root,root) %{_bindir}/winecfg
415 %attr(755,root,root) %{_bindir}/wineclipsrv
416 %attr(755,root,root) %{_bindir}/winedbg
417 %attr(755,root,root) %{_bindir}/winelauncher
418 %attr(755,root,root) %{_bindir}/wineserver
419 %attr(755,root,root) %{_bindir}/wineshelllink
420 %attr(755,root,root) %{_libdir}/*.so*
422 %{_mandir}/man1/wine.*
423 %{_mandir}/man5/wine.conf.*
424 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.reg
425 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.systemreg
426 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.userreg
427 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
430 %files programs -f files.programs
431 %defattr(644,root,root,755)
434 %defattr(644,root,root,755)
435 %if %{with html_docs}
436 %doc documentation/{wine-devel,winelib-user}
438 %attr(755,root,root) %{_bindir}/fnt2bdf
439 %attr(755,root,root) %{_bindir}/function_grep.pl
440 %attr(755,root,root) %{_bindir}/hlp2sgml
441 %attr(755,root,root) %{_bindir}/widl
442 %attr(755,root,root) %{_bindir}/winebuild
443 %attr(755,root,root) %{_bindir}/winedump
444 %attr(755,root,root) %{_bindir}/wineg++
445 %attr(755,root,root) %{_bindir}/winegcc
446 %attr(755,root,root) %{_bindir}/winemaker
447 %attr(755,root,root) %{_bindir}/winewrap
448 %attr(755,root,root) %{_bindir}/wmc
449 %attr(755,root,root) %{_bindir}/wrc
452 %{_mandir}/man1/winemaker.*
453 %{_mandir}/man1/winebuild.*
454 %{_mandir}/man1/wmc.*
455 %{_mandir}/man1/wrc.*
460 %defattr(644,root,root,755)
461 %doc documentation/*.pdf
465 %defattr(644,root,root,755)
466 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
467 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
468 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
469 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
472 %defattr(644,root,root,755)
473 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
474 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
478 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_libdir}/wine/twain_32.dll.so
484 %defattr(644,root,root,755)
485 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
496 %defattr(644,root,root,755)
497 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
502 %defattr(644,root,root,755)
503 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
506 # additional dependencies in *.so not separated (yet?) from main package
507 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
508 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
509 # ttydrv.dll.so depends on ncurses