3 %bcond_without alsa # don't build ALSA mm driver
4 %bcond_without jack # don't build JACK mm driver
5 %bcond_without nas # don't build NAS mm driver
6 %bcond_without sane # don't build TWAIN DLL with scanning support (through SANE)
7 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
9 # NOTE: wineconsole is a bit broken: try wineconsole cmd to see what will happen
10 # As a workaroound use `wineconsole --backend=user cmd' (works fine)
11 # ref: http://bugs.winehq.org/show_bug.cgi?id=8069
13 # NOTE: wine detects the following SONAMES for dlopen at build time:
14 # libcrypto,libssl (wininet.dll)
15 # libcups (winspool.dll.so,wineps.dll.so)
16 # libcurses/libncurses (wineconsole program)
17 # libfontconfig (gdi32.dll.so)
18 # libfreetype (wineps.dll.so,gdi32.dll.so)
19 # libGL (x11drv.dll.so,ddraw.dll.so)
20 # libjack (winejack.drv.so - explicit dependency in subpackage)
21 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
22 # thus requires rebuild after change of any of the above.
28 Summary: Program that lets you launch Win applications
29 Summary(es.UTF-8): Ejecuta programas Windows en Linux
30 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
31 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
37 Group: Applications/Emulators
38 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
39 # Source0-md5: 014e3760c07ac71906ba47c27f0471ab
40 Patch0: %{name}-fontcache.patch
41 Patch1: %{name}-makedep.patch
42 Patch2: %{name}-ncurses.patch
43 #PatchX: %{name}-dga.patch
44 URL: http://www.winehq.org/
45 BuildRequires: OpenGL-GLU-devel
46 %{?with_alsa:BuildRequires: alsa-lib-devel}
47 %{?with_arts:BuildRequires: artsc-devel}
48 BuildRequires: autoconf
49 BuildRequires: automake
51 %{?with_cups:BuildRequires: cups-devel}
52 BuildRequires: docbook-dtd31-sgml
53 BuildRequires: docbook-utils
55 BuildRequires: fontconfig-devel
56 BuildRequires: fontforge
57 BuildRequires: freetype-devel >= 2.0.5
58 BuildRequires: giflib-devel
59 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
60 BuildRequires: libjpeg-devel
61 BuildRequires: libtool
62 %{?with_nas:BuildRequires: nas-devel}
63 BuildRequires: ncurses-devel
64 # db2* failed previously - probably openjade or opensp bug
65 BuildRequires: openjade >= 1:1.3.3-0.pre1
66 BuildRequires: opensp >= 1:1.5.1
67 BuildRequires: openssl-devel >= 0.9.7d
68 %{?with_sane:BuildRequires: sane-backends-devel}
69 BuildRequires: valgrind
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 #Suggests: binfmt-detector
76 # link to wine/ntdll.dll.so, without any SONAME
77 Provides: libntdll.dll.so
78 Obsoletes: wine-doc-pdf
79 Obsoletes: wine-drv-arts
80 ExclusiveArch: %{ix86}
82 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
84 %define _noautoreqdep libGL.so.1 libGLU.so.1
85 %define no_install_post_strip 1
87 %define _winedir %{_datadir}/%{name}
89 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
91 %undefine debuginfocflags
94 Wine is a program which allows running Microsoft Windows programs
95 (including DOS, Windows 3.x and Win32 executables) on Unix. It
96 consists of a program loader which loads and executes a Microsoft
97 Windows binary, and a library that implements Windows API calls using
98 their Unix or X11 equivalents. The library may also be used for
99 porting Win32 code into native Unix executables.
101 %description -l es.UTF-8
102 Ejecuta programas Windows en Linux.
104 %description -l pl.UTF-8
105 Wine jest programem dzięki któremu można uruchamiać programy napisane
106 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
107 loadera, który pozwala wczytywać i uruchamiać programy w formacie
108 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
109 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
110 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
112 %description -l pt_BR.UTF-8
113 O Wine é um programa que permite rodar programas MS-Windows no X11.
114 Ele consiste de um carregador de programa, que carrega e executa um
115 binário MS-Windows, e de uma biblioteca de emulação que traduz as
116 chamadas da API para as equivalentes Unix/X11.
119 Summary: Wine - header files
120 Summary(es.UTF-8): Biblioteca de desarrollo de wine
121 Summary(pl.UTF-8): Wine - pliki nagłowkowe
122 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
123 Group: Development/Libraries
124 Requires: %{name} = %{epoch}:%{version}-%{release}
129 %description devel -l es.UTF-8
130 Biblioteca de desarrollo de wine.
132 %description devel -l pl.UTF-8
133 Wine - pliki nagłówkowe.
135 %description devel -l pt_BR.UTF-8
136 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
140 Summary: Wine - programs
141 Summary(pl.UTF-8): Wine - programy
143 Requires: %{name} = %{epoch}:%{version}-%{release}
145 %description programs
148 %description programs -l pl.UTF-8
152 Summary: Direct3D implementation DLLs for Wine
153 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
154 Group: Applications/Emulators
155 Requires: %{name} = %{epoch}:%{version}-%{release}
159 Direct3D implementation DLLs for Wine (through OpenGL).
161 %description dll-d3d -l pl.UTF-8
162 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
165 Summary: OpenGL implementation DLLs for Wine
166 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
167 Group: Applications/Emulators
168 Requires: %{name} = %{epoch}:%{version}-%{release}
172 OpenGL implementation DLLs for Wine.
174 %description dll-gl -l pl.UTF-8
175 Biblioteki DLL z implementacją OpenGL dla Wine.
178 Summary: TWAIN implementation DLL for Wine
179 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
180 Group: Applications/Emulators
181 Requires: %{name} = %{epoch}:%{version}-%{release}
183 %description dll-twain
184 TWAIN implementation DLL for Wine (through SANE).
186 %description dll-twain -l pl.UTF-8
187 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
190 Summary: ALSA driver for WINE mm.dll implementation
191 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
192 Group: Applications/Emulators
193 Requires: %{name} = %{epoch}:%{version}-%{release}
195 %description drv-alsa
196 ALSA driver for WINE mm.dll (multimedia system) implementation.
198 %description drv-alsa -l pl.UTF-8
199 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
202 Summary: JACK driver for WINE mm.dll implementation
203 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
204 Group: Applications/Emulators
205 Requires: %{name} = %{epoch}:%{version}-%{release}
206 Requires: jack-audio-connection-kit
207 # dlopened by SONAME detected at build time
208 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
210 %description drv-jack
211 JACK driver for WINE mm.dll (multimedia system) implementation.
213 %description drv-jack -l pl.UTF-8
214 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
218 Summary: NAS driver for WINE mm.dll implementation
219 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
220 Group: Applications/Emulators
221 Requires: %{name} = %{epoch}:%{version}-%{release}
224 NAS driver for WINE mm.dll (multimedia system) implementation.
226 %description drv-nas -l pl.UTF-8
227 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
235 # turn off compilation of some tools
236 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
237 #sed -i -e "s|avitools||" programs/Makefile.in
243 %{!?debug:--disable-debug} \
244 %{!?debug:--disable-trace} \
250 %{__make} -C programs
251 #%{__make} -C programs/regapi
254 rm -rf $RPM_BUILD_ROOT
255 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
258 DESTDIR=$RPM_BUILD_ROOT
260 %{__make} -C programs install \
261 DESTDIR=$RPM_BUILD_ROOT
263 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
265 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
266 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
269 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
270 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
271 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
272 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
273 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
275 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
276 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
277 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
279 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
283 waveaudio=mciwave.drv
285 videodisc=mcipionr.drv
290 %if %{?debug:0}%{!?debug:1}
291 echo "Strip executable binaries and shared object files."
292 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
293 elfexelist=`echo $filelist | xargs -r file | \
294 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
295 elfsharedlist=`echo $filelist | xargs -r file | \
296 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
297 if [ -n "$elfexelist" ]; then \
298 strip -R .note -R .comment $elfexelist
300 if [ -n "$elfsharedlist" ]; then
301 strip --strip-unneeded -R .note -R .comment $elfsharedlist
305 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
307 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp"
310 rm -f files.so; touch files.so
311 rm -f files.programs; touch files.programs
312 cd $RPM_BUILD_ROOT%{_libdir}/wine
315 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|opengl32.dll.so|sane.ds.so|twain.dll.so|twain_32.dll.so|winealsa.drv.so|winejack.drv.so|winenas.drv.so)
318 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
322 for p in $programs; do
323 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
324 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
325 grep -v "$p\.exe\.so$" files.so > files.so.
326 mv -f files.so. files.so
330 rm -rf $RPM_BUILD_ROOT
332 %post -p /sbin/ldconfig
333 %postun -p /sbin/ldconfig
335 %triggerpostun -- wine < 1:0.9.12-1.9
336 rm -f /var/lock/subsys/wine
337 if [ -x /sbin/chkconfig ]; then
338 /sbin/chkconfig --del wine
342 %defattr(644,root,root,755)
343 %doc README ChangeLog AUTHORS ANNOUNCE
344 %lang(de) %doc documentation/README.de
345 %lang(es) %doc documentation/README.es
346 %lang(fr) %doc documentation/README.fr
347 %lang(it) %doc documentation/README.it
348 %lang(ko) %doc documentation/README.ko
349 %lang(nb) %doc documentation/README.no
350 %lang(pt) %doc documentation/README.pt
351 %lang(pt_BR) %doc documentation/README.pt_br
352 %attr(755,root,root) %{_bindir}/msiexec
353 %attr(755,root,root) %{_bindir}/wine
354 %attr(755,root,root) %{_bindir}/wineboot
355 %attr(755,root,root) %{_bindir}/winebrowser
356 %attr(755,root,root) %{_bindir}/winecfg
357 %attr(755,root,root) %{_bindir}/winedbg
358 %attr(755,root,root) %{_bindir}/wine-kthread
359 %attr(755,root,root) %{_bindir}/winelauncher
360 %attr(755,root,root) %{_bindir}/wineprefixcreate
361 %attr(755,root,root) %{_bindir}/wine-preloader
362 %attr(755,root,root) %{_bindir}/wine-pthread
363 %attr(755,root,root) %{_bindir}/wineserver
364 %attr(755,root,root) %{_bindir}/wineshelllink
365 %attr(755,root,root) %{_libdir}/*.so*
367 %{_libdir}/wine/*.dll16
368 %{_libdir}/wine/*.drv16
369 %{_libdir}/wine/*.exe16
370 %{_mandir}/man1/wine.1*
371 %{_mandir}/man1/winedbg.1*
372 %{_mandir}/man1/wineprefixcreate.1*
373 %{_mandir}/man1/wineserver.1*
375 %{_desktopdir}/wine.desktop
377 %files programs -f files.programs
378 %defattr(644,root,root,755)
381 %defattr(644,root,root,755)
382 %attr(755,root,root) %{_bindir}/fnt2bdf
383 %attr(755,root,root) %{_bindir}/function_grep.pl
384 %attr(755,root,root) %{_bindir}/widl
385 %attr(755,root,root) %{_bindir}/winebuild
386 %attr(755,root,root) %{_bindir}/winedump
387 %attr(755,root,root) %{_bindir}/wineg++
388 %attr(755,root,root) %{_bindir}/winegcc
389 %attr(755,root,root) %{_bindir}/winemaker
390 #%attr(755,root,root) %{_bindir}/winewrap
391 %attr(755,root,root) %{_bindir}/wmc
392 %attr(755,root,root) %{_bindir}/wrc
393 %{_libdir}/wine/lib*.def
394 # no shared variants, so not separated
395 %{_libdir}/wine/lib*.def.a
396 %{_libdir}/wine/libdx*.a
397 %{_libdir}/wine/libstrmiids.a
398 %{_libdir}/wine/libuuid.a
399 %{_libdir}/wine/libwinecrt0.a
401 %{_mandir}/man1/widl.1*
402 %{_mandir}/man1/winedump.1*
403 %{_mandir}/man1/winegcc.1*
404 %{_mandir}/man1/winemaker.1*
405 %{_mandir}/man1/winebuild.1*
406 %{_mandir}/man1/wmc.1*
407 %{_mandir}/man1/wrc.1*
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
413 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
414 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
415 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
420 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
424 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
426 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
447 # additional dependencies in *.so not separated (yet?) from main package
448 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
449 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
450 # ttydrv.dll.so depends on ncurses