3 %bcond_without arts # without arts support
4 %bcond_without cups # without CUPS printing support
5 %bcond_without sane # without TWAIN scanning support (through SANE)
6 %bcond_with pdf_docs # build pdf docs (missing BR)
7 %bcond_with html_docs # build html docs (jade fault ?)
9 # maybe TODO: alsa,jack,nas BRs/checks (see dlls/winmm/wine*)
10 Summary: Program that lets you launch Win applications
11 Summary(es): Ejecuta programas Windows en Linux
12 Summary(pl): Program pozwalaj±cy uruchamiaæ aplikacje Windows
13 Summary(pt_BR): Executa programas Windows no Linux
18 Group: Applications/Emulators
19 Source0: http://dl.sf.net/wine/Wine-%{version}.tar.gz
20 # Source0-md5: 67eed2fb7a86d805ec8fc4bcf7a04254
23 Source3: %{name}.systemreg
24 Source4: %{name}.userreg
25 Patch0: %{name}-fontcache.patch
26 Patch1: %{name}-destdir.patch
27 Patch2: %{name}-ncurses.patch
28 Patch3: %{name}-ac-ksh.patch
29 Patch4: %{name}-binutils.patch
30 Patch5: %{name}-makedep.patch
31 Patch6: %{name}-dga.patch
32 Patch7: %{name}-winebuild.patch
33 Patch8: %{name}-cdrom-segv.patch
34 URL: http://www.winehq.com/
35 BuildRequires: OpenGL-devel
36 BuildRequires: XFree86-devel
37 %{?with_arts:BuildRequires: arts-devel}
39 BuildRequires: chpax >= 0.20020901-2
40 %{?with_cups:BuildRequires: cups-devel}
41 BuildRequires: docbook-dtd31-sgml
42 BuildRequires: docbook-utils
44 BuildRequires: freetype-devel >= 2.0.5
45 BuildRequires: libjpeg-devel
46 BuildRequires: ncurses-devel
47 %if %{with html_docs} || %{with pdf_docs}
48 BuildRequires: openjade
51 BuildRequires: tetex-metafont
52 BuildRequires: tetex-fonts-pazo
53 BuildRequires: tetex-fonts-stmaryrd
54 BuildRequires: tetex-fonts-type1-urw
56 %{?with_sane:BuildRequires: sane-backends-devel}
58 Requires(post): /sbin/ldconfig
59 Requires(post,preun):/sbin/chkconfig
60 # link to wine/ntdll.dll.so, without any SONAME
61 Provides: libntdll.dll.so
62 ExclusiveArch: %{ix86}
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 %define _noautoreqdep libGL.so.1 libGLU.so.1
66 %define no_install_post_strip 1
68 %define _winedir %{_datadir}/%{name}
71 Wine is a program which allows running Microsoft Windows programs
72 (including DOS, Windows 3.x and Win32 executables) on Unix. It
73 consists of a program loader which loads and executes a Microsoft
74 Windows binary, and a library that implements Windows API calls using
75 their Unix or X11 equivalents. The library may also be used for
76 porting Win32 code into native Unix executables.
79 Ejecuta programas Windows en Linux.
82 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
83 dla Microsoft Windows pod systemami unixowymi. Sk³ada siê on z
84 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
85 Microsoft Windows oraz z biblioteki, która implementuje API Windows
86 przy u¿yciu odpowiedników Unixowych oraz z X11. Biblioteka mo¿e byæ
87 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Unixa.
90 O Wine é um programa que permite rodar programas MS-Windows no X11.
91 Ele consiste de um carregador de programa, que carrega e executa um
92 binário MS-Windows, e de uma biblioteca de emulação que traduz as
93 chamadas da API para as equivalentes Unix/X11.
96 Summary: Wine - header files
97 Summary(es): Biblioteca de desarrollo de wine
98 Summary(pl): Wine - pliki nag³owkowe
99 Summary(pt_BR): Biblioteca de desenvolvimento do wine
100 Group: Development/Libraries
101 Requires: %{name} = %{version}
106 %description devel -l es
107 Biblioteca de desarrollo de wine.
109 %description devel -l pl
110 Wine - pliki nag³ówkowe.
112 %description devel -l pt_BR
113 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
117 Summary: Wine - programs
118 Summary(pl): Wine - programy
120 Requires: %{name} = %{version}
122 %description programs
125 %description programs -l pl
129 Summary: Wine documentation in PDF
130 Summary(pl): Dokumentacja Wine w formacie PDF
134 Wine documentation in PDF format.
136 %description doc-pdf -l pl
137 Dokumentacja Wine w formacie PDF.
151 # turn off compilation of some tools
152 #sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
153 sed -e "s|avitools||" programs/Makefile.in > .tmp
154 mv -f .tmp programs/Makefile.in
159 CPPFLAGS="-I/usr/include/ncurses"; export CPPFLAGS
160 CFLAGS="%{rpmcflags} $CPPFLAGS"
162 %{!?debug:--disable-debug} \
163 %{!?debug:--disable-trace} \
169 %{__make} -C programs
170 %{__make} -C programs/regapi
173 %if %{with html_docs}
174 db2html wine-user.sgml
175 db2html wine-devel.sgml
176 db2html wine-faq.sgml
177 db2html winelib-user.sgml
181 db2pdf wine-user.sgml
182 db2pdf wine-devel.sgml
184 db2pdf winelib-user.sgml
189 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
192 %{__make} install DESTDIR=$RPM_BUILD_ROOT
193 %{__make} -C programs install DESTDIR=$RPM_BUILD_ROOT
195 install programs/winhelp/hlp2sgml $RPM_BUILD_ROOT%{_bindir}
196 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
198 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
199 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
201 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
202 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
203 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
204 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
205 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
206 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
208 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
209 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
210 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
211 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
213 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
214 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
215 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
217 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
221 waveaudio=mciwave.drv
223 videodisc=mcipionr.drv
228 %if %{?debug:0}%{!?debug:1}
229 echo "Strip executable binaries and shared object files."
230 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
231 elfexelist=`echo $filelist | xargs -r file | \
232 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
233 elfsharedlist=`echo $filelist | xargs -r file | \
234 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
235 if [ -n "$elfexelist" ]; then \
236 strip -R .note -R .comment $elfexelist
238 if [ -n "$elfsharedlist" ]; then
239 strip --strip-unneeded -R .note -R .comment $elfsharedlist
243 /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
245 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
248 rm -f files.so; touch files.so
249 rm -f files.programs; touch files.programs
250 cd $RPM_BUILD_ROOT%{_libdir}/wine
252 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
255 for p in $programs; do
256 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
257 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
258 grep -v "$p\.exe\.so$" files.so > files.so.
259 mv -f files.so. files.so
263 rm -rf $RPM_BUILD_ROOT
267 /sbin/chkconfig --add wine
268 if [ ! -f /var/lock/subsys/wine ]; then
269 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
273 if [ "$1" = "0" ]; then
274 if [ -f /var/lock/subsys/wine ]; then
275 /etc/rc.d/init.d/wine stop >&2
277 /sbin/chkconfig --del wine
280 %postun -p /sbin/ldconfig
283 %defattr(644,root,root,755)
284 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
285 %doc documentation/samples
286 %if %{with html_docs}
287 %doc documentation/wine-{faq,user}
289 %attr(755,root,root) %{_bindir}/wine
290 %attr(755,root,root) %{_bindir}/wineboot
291 %attr(755,root,root) %{_bindir}/winecfg
292 %attr(755,root,root) %{_bindir}/wineclipsrv
293 %attr(755,root,root) %{_bindir}/winedbg
294 %attr(755,root,root) %{_bindir}/winelauncher
295 %attr(755,root,root) %{_bindir}/wineserver
296 %attr(755,root,root) %{_bindir}/wineshelllink
297 %attr(755,root,root) %{_libdir}/*.so*
299 %{_mandir}/man1/wine.*
300 %{_mandir}/man5/wine.conf.*
301 %config(noreplace) %{_sysconfdir}/wine.reg
302 %config(missingok) %{_sysconfdir}/wine.systemreg
303 %config(missingok) %{_sysconfdir}/wine.userreg
304 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
307 %files programs -f files.programs
308 %defattr(644,root,root,755)
311 %defattr(644,root,root,755)
312 %if %{with html_docs}
313 %doc documentation/{wine-devel,winelib-user,HOWTO-winelib}
315 %attr(755,root,root) %{_bindir}/fnt2bdf
316 %attr(755,root,root) %{_bindir}/function_grep.pl
317 %attr(755,root,root) %{_bindir}/hlp2sgml
318 %attr(755,root,root) %{_bindir}/widl
319 %attr(755,root,root) %{_bindir}/winebuild
320 %attr(755,root,root) %{_bindir}/winedump
321 %attr(755,root,root) %{_bindir}/wineg++
322 %attr(755,root,root) %{_bindir}/winegcc
323 %attr(755,root,root) %{_bindir}/winemaker
324 %attr(755,root,root) %{_bindir}/winewrap
325 %attr(755,root,root) %{_bindir}/wmc
326 %attr(755,root,root) %{_bindir}/wrc
329 %{_mandir}/man1/winemaker.*
330 %{_mandir}/man1/winebuild.*
331 %{_mandir}/man1/wmc.*
332 %{_mandir}/man1/wrc.*
337 %defattr(644,root,root,755)
338 %doc documentation/*.pdf