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: wine detects the following SONAMES for dlopen at build time:
10 # libcrypto,libssl (wininet.dll)
11 # libcups (winspool.dll.so,wineps.dll.so)
12 # libcurses/libncurses (wineconsole program)
13 # libfontconfig (gdi32.dll.so)
14 # libfreetype (wineps.dll.so,gdi32.dll.so)
15 # libGL (x11drv.dll.so,ddraw.dll.so)
16 # libjack (winejack.drv.so - explicit dependency in subpackage)
17 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
18 # thus requires rebuild after change of any of the above.
24 Summary: Program that lets you launch Win applications
25 Summary(es): Ejecuta programas Windows en Linux
26 Summary(pl): Program pozwalaj±cy uruchamiaæ aplikacje Windows
27 Summary(pt_BR): Executa programas Windows no Linux
33 Group: Applications/Emulators
34 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
35 # Source0-md5: d8f361e6fe7520cda983a78673cd3bda
36 Patch0: %{name}-fontcache.patch
37 Patch1: %{name}-makedep.patch
38 Patch2: %{name}-ncurses.patch
39 #PatchX: %{name}-dga.patch
40 URL: http://www.winehq.org/
41 BuildRequires: OpenGL-devel
42 BuildRequires: XFree86-devel
43 %{?with_alsa:BuildRequires: alsa-lib-devel}
44 %{?with_arts:BuildRequires: artsc-devel}
45 BuildRequires: autoconf
46 BuildRequires: automake
48 %{?with_cups:BuildRequires: cups-devel}
49 BuildRequires: docbook-dtd31-sgml
50 BuildRequires: docbook-utils
52 BuildRequires: fontconfig-devel
53 BuildRequires: fontforge
54 BuildRequires: freetype-devel >= 2.0.5
55 BuildRequires: glut-devel
56 BuildRequires: giflib-devel
57 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
58 BuildRequires: libjpeg-devel
59 BuildRequires: libtool
60 %{?with_nas:BuildRequires: nas-devel}
61 BuildRequires: ncurses-devel
62 # db2* failed previously - probably openjade or opensp bug
63 BuildRequires: openjade >= 1:1.3.3-0.pre1
64 BuildRequires: opensp >= 1:1.5.1
65 BuildRequires: openssl-devel >= 0.9.7d
66 %{?with_sane:BuildRequires: sane-backends-devel}
67 BuildRequires: valgrind
68 BuildRequires: xrender-devel
69 Requires: binfmt-detector
70 # link to wine/ntdll.dll.so, without any SONAME
71 Provides: libntdll.dll.so
72 Obsoletes: wine-doc-pdf
73 Obsoletes: wine-drv-arts
74 ExclusiveArch: %{ix86}
76 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78 %define _noautoreqdep libGL.so.1 libGLU.so.1
79 %define no_install_post_strip 1
81 %define _winedir %{_datadir}/%{name}
83 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
86 Wine is a program which allows running Microsoft Windows programs
87 (including DOS, Windows 3.x and Win32 executables) on Unix. It
88 consists of a program loader which loads and executes a Microsoft
89 Windows binary, and a library that implements Windows API calls using
90 their Unix or X11 equivalents. The library may also be used for
91 porting Win32 code into native Unix executables.
94 Ejecuta programas Windows en Linux.
97 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
98 dla Microsoft Windows pod systemami uniksowymi. Sk³ada siê on z
99 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
100 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
101 przy u¿yciu odpowiedników uniksowych oraz z X11. Biblioteka mo¿e byæ
102 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
104 %description -l pt_BR
105 O Wine é um programa que permite rodar programas MS-Windows no X11.
106 Ele consiste de um carregador de programa, que carrega e executa um
107 binário MS-Windows, e de uma biblioteca de emulação que traduz as
108 chamadas da API para as equivalentes Unix/X11.
111 Summary: Wine - header files
112 Summary(es): Biblioteca de desarrollo de wine
113 Summary(pl): Wine - pliki nag³owkowe
114 Summary(pt_BR): Biblioteca de desenvolvimento do wine
115 Group: Development/Libraries
116 Requires: %{name} = %{epoch}:%{version}-%{release}
121 %description devel -l es
122 Biblioteca de desarrollo de wine.
124 %description devel -l pl
125 Wine - pliki nag³ówkowe.
127 %description devel -l pt_BR
128 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
132 Summary: Wine - programs
133 Summary(pl): Wine - programy
135 Requires: %{name} = %{epoch}:%{version}-%{release}
137 %description programs
140 %description programs -l pl
144 Summary: Direct3D implementation DLLs for Wine
145 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
146 Group: Applications/Emulators
147 Requires: %{name} = %{epoch}:%{version}-%{release}
151 Direct3D implementation DLLs for Wine (through OpenGL).
153 %description dll-d3d -l pl
154 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
157 Summary: OpenGL implementation DLLs for Wine
158 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
159 Group: Applications/Emulators
160 Requires: %{name} = %{epoch}:%{version}-%{release}
164 OpenGL implementation DLLs for Wine.
166 %description dll-gl -l pl
167 Biblioteki DLL z implementacj± OpenGL dla Wine.
170 Summary: TWAIN implementation DLL for Wine
171 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
172 Group: Applications/Emulators
173 Requires: %{name} = %{epoch}:%{version}-%{release}
175 %description dll-twain
176 TWAIN implementation DLL for Wine (through SANE).
178 %description dll-twain -l pl
179 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
182 Summary: ALSA driver for WINE mm.dll implementation
183 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
184 Group: Applications/Emulators
185 Requires: %{name} = %{epoch}:%{version}-%{release}
187 %description drv-alsa
188 ALSA driver for WINE mm.dll (multimedia system) implementation.
190 %description drv-alsa -l pl
191 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
194 Summary: JACK driver for WINE mm.dll implementation
195 Summary(pl): Sterownik JACK-a dla implementacji mm.dll w Wine
196 Group: Applications/Emulators
197 Requires: %{name} = %{epoch}:%{version}-%{release}
198 Requires: jack-audio-connection-kit
199 # dlopened by SONAME detected at build time
200 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
202 %description drv-jack
203 JACK driver for WINE mm.dll (multimedia system) implementation.
205 %description drv-jack -l pl
206 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
210 Summary: NAS driver for WINE mm.dll implementation
211 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
212 Group: Applications/Emulators
213 Requires: %{name} = %{epoch}:%{version}-%{release}
216 NAS driver for WINE mm.dll (multimedia system) implementation.
218 %description drv-nas -l pl
219 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
227 # turn off compilation of some tools
228 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
229 #sed -i -e "s|avitools||" programs/Makefile.in
235 %{!?debug:--disable-debug} \
236 %{!?debug:--disable-trace} \
242 %{__make} -C programs
243 #%{__make} -C programs/regapi
246 rm -rf $RPM_BUILD_ROOT
247 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
250 DESTDIR=$RPM_BUILD_ROOT
252 %{__make} -C programs install \
253 DESTDIR=$RPM_BUILD_ROOT
255 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
257 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
258 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
261 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
262 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
263 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
264 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
265 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
267 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
268 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
269 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
271 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
275 waveaudio=mciwave.drv
277 videodisc=mcipionr.drv
282 %if %{?debug:0}%{!?debug:1}
283 echo "Strip executable binaries and shared object files."
284 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
285 elfexelist=`echo $filelist | xargs -r file | \
286 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
287 elfsharedlist=`echo $filelist | xargs -r file | \
288 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
289 if [ -n "$elfexelist" ]; then \
290 strip -R .note -R .comment $elfexelist
292 if [ -n "$elfsharedlist" ]; then
293 strip --strip-unneeded -R .note -R .comment $elfsharedlist
297 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
299 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp"
302 rm -f files.so; touch files.so
303 rm -f files.programs; touch files.programs
304 cd $RPM_BUILD_ROOT%{_libdir}/wine
307 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)
310 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
314 for p in $programs; do
315 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
316 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
317 grep -v "$p\.exe\.so$" files.so > files.so.
318 mv -f files.so. files.so
322 rm -rf $RPM_BUILD_ROOT
324 %post -p /sbin/ldconfig
325 %postun -p /sbin/ldconfig
327 %triggerpostun -- wine < 1:0.9.12-1.9
328 rm -f /var/lock/subsys/wine
329 if [ -x /sbin/chkconfig ]; then
330 /sbin/chkconfig --del wine
334 %defattr(644,root,root,755)
335 %doc README ChangeLog AUTHORS ANNOUNCE
336 %lang(de) %doc documentation/README.de
337 %lang(es) %doc documentation/README.es
338 %lang(fr) %doc documentation/README.fr
339 %lang(it) %doc documentation/README.it
340 %lang(ko) %doc documentation/README.ko
341 %lang(nb) %doc documentation/README.no
342 %lang(pt) %doc documentation/README.pt
343 %lang(pt_BR) %doc documentation/README.pt_br
344 %attr(755,root,root) %{_bindir}/msiexec
345 %attr(755,root,root) %{_bindir}/wine
346 %attr(755,root,root) %{_bindir}/wineboot
347 %attr(755,root,root) %{_bindir}/winebrowser
348 %attr(755,root,root) %{_bindir}/winecfg
349 %attr(755,root,root) %{_bindir}/winedbg
350 %attr(755,root,root) %{_bindir}/wine-kthread
351 %attr(755,root,root) %{_bindir}/winelauncher
352 %attr(755,root,root) %{_bindir}/wineprefixcreate
353 %attr(755,root,root) %{_bindir}/wine-preloader
354 %attr(755,root,root) %{_bindir}/wine-pthread
355 %attr(755,root,root) %{_bindir}/wineserver
356 %attr(755,root,root) %{_bindir}/wineshelllink
357 %attr(755,root,root) %{_libdir}/*.so*
359 %{_libdir}/wine/*.dll16
360 %{_libdir}/wine/*.drv16
361 %{_libdir}/wine/*.exe16
362 %{_mandir}/man1/wine.1*
363 %{_mandir}/man1/winedbg.1*
364 %{_mandir}/man1/wineprefixcreate.1*
365 %{_mandir}/man1/wineserver.1*
367 %{_desktopdir}/wine.desktop
369 %files programs -f files.programs
370 %defattr(644,root,root,755)
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_bindir}/fnt2bdf
375 %attr(755,root,root) %{_bindir}/function_grep.pl
376 %attr(755,root,root) %{_bindir}/widl
377 %attr(755,root,root) %{_bindir}/winebuild
378 %attr(755,root,root) %{_bindir}/winedump
379 %attr(755,root,root) %{_bindir}/wineg++
380 %attr(755,root,root) %{_bindir}/winegcc
381 %attr(755,root,root) %{_bindir}/winemaker
382 #%attr(755,root,root) %{_bindir}/winewrap
383 %attr(755,root,root) %{_bindir}/wmc
384 %attr(755,root,root) %{_bindir}/wrc
385 %{_libdir}/wine/lib*.def
386 # no shared variants, so not separated
387 %{_libdir}/wine/lib*.def.a
388 %{_libdir}/wine/libdx*.a
389 %{_libdir}/wine/libstrmiids.a
390 %{_libdir}/wine/libuuid.a
391 %{_libdir}/wine/libwinecrt0.a
393 %{_mandir}/man1/widl.1*
394 %{_mandir}/man1/winedump.1*
395 %{_mandir}/man1/winegcc.1*
396 %{_mandir}/man1/winemaker.1*
397 %{_mandir}/man1/winebuild.1*
398 %{_mandir}/man1/wmc.1*
399 %{_mandir}/man1/wrc.1*
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
405 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
406 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
407 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
412 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
416 %defattr(644,root,root,755)
417 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
418 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
423 %defattr(644,root,root,755)
424 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
435 %defattr(644,root,root,755)
436 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
439 # additional dependencies in *.so not separated (yet?) from main package
440 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
441 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
442 # ttydrv.dll.so depends on ncurses