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 URL: http://www.winehq.com/
34 BuildRequires: OpenGL-devel
35 BuildRequires: XFree86-devel
36 %{?with_arts:BuildRequires: arts-devel}
37 BuildRequires: autoconf
38 BuildRequires: automake
40 BuildRequires: chpax >= 0.20020901-2
41 %{?with_cups:BuildRequires: cups-devel}
42 BuildRequires: docbook-dtd31-sgml
43 BuildRequires: docbook-utils
45 BuildRequires: freetype-devel >= 2.0.5
46 BuildRequires: libjpeg-devel
47 BuildRequires: ncurses-devel
48 %if %{with html_docs} || %{with pdf_docs}
49 BuildRequires: openjade
52 BuildRequires: tetex-metafont
53 BuildRequires: tetex-fonts-pazo
54 BuildRequires: tetex-fonts-stmaryrd
55 BuildRequires: tetex-fonts-type1-urw
57 %{?with_sane:BuildRequires: sane-backends-devel}
59 Requires(post): /sbin/ldconfig
60 Requires(post,preun):/sbin/chkconfig
61 # link to wine/ntdll.dll.so, without any SONAME
62 Provides: libntdll.dll.so
63 ExclusiveArch: %{ix86}
64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 %define _noautoreqdep libGL.so.1 libGLU.so.1
67 %define no_install_post_strip 1
69 %define _winedir %{_datadir}/%{name}
72 Wine is a program which allows running Microsoft Windows programs
73 (including DOS, Windows 3.x and Win32 executables) on Unix. It
74 consists of a program loader which loads and executes a Microsoft
75 Windows binary, and a library that implements Windows API calls using
76 their Unix or X11 equivalents. The library may also be used for
77 porting Win32 code into native Unix executables.
80 Ejecuta programas Windows en Linux.
83 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
84 dla Microsoft Windows pod systemami unixowymi. Sk³ada siê on z
85 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
86 Microsoft Windows oraz z biblioteki, która implementuje API Windows
87 przy u¿yciu odpowiedników Unixowych oraz z X11. Biblioteka mo¿e byæ
88 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Unixa.
91 O Wine é um programa que permite rodar programas MS-Windows no X11.
92 Ele consiste de um carregador de programa, que carrega e executa um
93 binário MS-Windows, e de uma biblioteca de emulação que traduz as
94 chamadas da API para as equivalentes Unix/X11.
97 Summary: Wine - header files
98 Summary(es): Biblioteca de desarrollo de wine
99 Summary(pl): Wine - pliki nag³owkowe
100 Summary(pt_BR): Biblioteca de desenvolvimento do wine
101 Group: Development/Libraries
102 Requires: %{name} = %{version}
107 %description devel -l es
108 Biblioteca de desarrollo de wine.
110 %description devel -l pl
111 Wine - pliki nag³ówkowe.
113 %description devel -l pt_BR
114 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
118 Summary: Wine - programs
119 Summary(pl): Wine - programy
121 Requires: %{name} = %{version}
123 %description programs
126 %description programs -l pl
130 Summary: Wine documentation in PDF
131 Summary(pl): Dokumentacja Wine w formacie PDF
135 Wine documentation in PDF format.
137 %description doc-pdf -l pl
138 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}}
193 DESTDIR=$RPM_BUILD_ROOT
195 %{__make} -C programs install \
196 DESTDIR=$RPM_BUILD_ROOT
198 install programs/winhelp/hlp2sgml $RPM_BUILD_ROOT%{_bindir}
199 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
201 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
202 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
204 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
205 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
206 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
207 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
208 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
209 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
211 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
212 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
213 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
214 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
216 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
217 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
218 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
220 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
224 waveaudio=mciwave.drv
226 videodisc=mcipionr.drv
231 %if %{?debug:0}%{!?debug:1}
232 echo "Strip executable binaries and shared object files."
233 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
234 elfexelist=`echo $filelist | xargs -r file | \
235 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
236 elfsharedlist=`echo $filelist | xargs -r file | \
237 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
238 if [ -n "$elfexelist" ]; then \
239 strip -R .note -R .comment $elfexelist
241 if [ -n "$elfsharedlist" ]; then
242 strip --strip-unneeded -R .note -R .comment $elfsharedlist
246 /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
248 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
251 rm -f files.so; touch files.so
252 rm -f files.programs; touch files.programs
253 cd $RPM_BUILD_ROOT%{_libdir}/wine
255 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
258 for p in $programs; do
259 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
260 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
261 grep -v "$p\.exe\.so$" files.so > files.so.
262 mv -f files.so. files.so
266 rm -rf $RPM_BUILD_ROOT
270 /sbin/chkconfig --add wine
271 if [ ! -f /var/lock/subsys/wine ]; then
272 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
276 if [ "$1" = "0" ]; then
277 if [ -f /var/lock/subsys/wine ]; then
278 /etc/rc.d/init.d/wine stop >&2
280 /sbin/chkconfig --del wine
283 %postun -p /sbin/ldconfig
286 %defattr(644,root,root,755)
287 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
288 %doc documentation/samples
289 %if %{with html_docs}
290 %doc documentation/wine-{faq,user}
292 %attr(755,root,root) %{_bindir}/wine
293 %attr(755,root,root) %{_bindir}/wineboot
294 %attr(755,root,root) %{_bindir}/winecfg
295 %attr(755,root,root) %{_bindir}/wineclipsrv
296 %attr(755,root,root) %{_bindir}/winedbg
297 %attr(755,root,root) %{_bindir}/winelauncher
298 %attr(755,root,root) %{_bindir}/wineserver
299 %attr(755,root,root) %{_bindir}/wineshelllink
300 %attr(755,root,root) %{_libdir}/*.so*
302 %{_mandir}/man1/wine.*
303 %{_mandir}/man5/wine.conf.*
304 %config(noreplace) %{_sysconfdir}/wine.reg
305 %config(missingok) %{_sysconfdir}/wine.systemreg
306 %config(missingok) %{_sysconfdir}/wine.userreg
307 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
310 %files programs -f files.programs
311 %defattr(644,root,root,755)
314 %defattr(644,root,root,755)
315 %if %{with html_docs}
316 %doc documentation/{wine-devel,winelib-user,HOWTO-winelib}
318 %attr(755,root,root) %{_bindir}/fnt2bdf
319 %attr(755,root,root) %{_bindir}/function_grep.pl
320 %attr(755,root,root) %{_bindir}/hlp2sgml
321 %attr(755,root,root) %{_bindir}/widl
322 %attr(755,root,root) %{_bindir}/winebuild
323 %attr(755,root,root) %{_bindir}/winedump
324 %attr(755,root,root) %{_bindir}/wineg++
325 %attr(755,root,root) %{_bindir}/winegcc
326 %attr(755,root,root) %{_bindir}/winemaker
327 %attr(755,root,root) %{_bindir}/winewrap
328 %attr(755,root,root) %{_bindir}/wmc
329 %attr(755,root,root) %{_bindir}/wrc
332 %{_mandir}/man1/winemaker.*
333 %{_mandir}/man1/winebuild.*
334 %{_mandir}/man1/wmc.*
335 %{_mandir}/man1/wrc.*
340 %defattr(644,root,root,755)
341 %doc documentation/*.pdf