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: ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/Wine-%{version}.tar.gz
20 # Source0-md5: c26e151ecd49545afd5b15c1a4d726cc
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 URL: http://www.winehq.com/
33 BuildRequires: OpenGL-devel
34 BuildRequires: XFree86-devel
35 %{?with_arts:BuildRequires: arts-devel}
37 BuildRequires: chpax >= 0.20020901-2
38 %{?with_cups:BuildRequires: cups-devel}
39 BuildRequires: docbook-dtd31-sgml
40 BuildRequires: docbook-utils
42 BuildRequires: freetype-devel >= 2.0.5
43 BuildRequires: libjpeg-devel
44 BuildRequires: ncurses-devel
45 %if %{with html_docs} || %{with pdf_docs}
46 BuildRequires: openjade
49 BuildRequires: tetex-metafont
50 BuildRequires: tetex-fonts-pazo
51 BuildRequires: tetex-fonts-stmaryrd
52 BuildRequires: tetex-fonts-type1-urw
54 %{?with_sane:BuildRequires: sane-backends-devel}
56 Requires(post): /sbin/ldconfig
57 Requires(post,preun):/sbin/chkconfig
58 # link to wine/ntdll.dll.so, without any SONAME
59 Provides: libntdll.dll.so
60 ExclusiveArch: %{ix86}
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 %define _noautoreqdep libGL.so.1 libGLU.so.1
64 %define no_install_post_strip 1
66 %define _winedir %{_datadir}/%{name}
69 Wine is a program which allows running Microsoft Windows programs
70 (including DOS, Windows 3.x and Win32 executables) on Unix. It
71 consists of a program loader which loads and executes a Microsoft
72 Windows binary, and a library that implements Windows API calls using
73 their Unix or X11 equivalents. The library may also be used for
74 porting Win32 code into native Unix executables.
77 Ejecuta programas Windows en Linux.
80 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
81 dla Microsoft Windows pod systemami unixowymi. Sk³ada siê on z
82 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
83 Microsoft Windows oraz z biblioteki, która implementuje API Windows
84 przy u¿yciu odpowiedników Unixowych oraz z X11. Biblioteka mo¿e byæ
85 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Unixa.
88 O Wine é um programa que permite rodar programas MS-Windows no X11.
89 Ele consiste de um carregador de programa, que carrega e executa um
90 binário MS-Windows, e de uma biblioteca de emulação que traduz as
91 chamadas da API para as equivalentes Unix/X11.
94 Summary: Wine - header files
95 Summary(es): Biblioteca de desarrollo de wine
96 Summary(pl): Wine - pliki nag³owkowe
97 Summary(pt_BR): Biblioteca de desenvolvimento do wine
98 Group: Development/Libraries
99 Requires: %{name} = %{version}
104 %description devel -l es
105 Biblioteca de desarrollo de wine.
107 %description devel -l pl
108 Wine - pliki nag³ówkowe.
110 %description devel -l pt_BR
111 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
115 Summary: Wine - programs
116 Summary(pl): Wine - programy
118 Requires: %{name} = %{version}
120 %description programs
123 %description programs -l pl
127 Summary: Wine documentation in PDF
128 Summary(pl): Dokumentacja Wine w formacie PDF
132 Wine documentation in PDF format.
134 %description doc-pdf -l pl
135 Dokumentacja Wine w formacie PDF.
147 # turn off compilation of some tools
148 #sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
149 sed -e "s|avitools||" programs/Makefile.in > .tmp
150 mv -f .tmp programs/Makefile.in
155 CPPFLAGS="-I/usr/include/ncurses"; export CPPFLAGS
156 CFLAGS="%{rpmcflags} $CPPFLAGS"
158 %{!?debug:--disable-debug} \
159 %{!?debug:--disable-trace} \
165 %{__make} -C programs
166 %{__make} -C programs/regapi
169 %if %{with html_docs}
170 db2html wine-user.sgml
171 db2html wine-devel.sgml
172 db2html wine-faq.sgml
173 db2html winelib-user.sgml
177 db2pdf wine-user.sgml
178 db2pdf wine-devel.sgml
180 db2pdf winelib-user.sgml
185 rm -rf $RPM_BUILD_ROOT
186 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
188 %{__make} install DESTDIR=$RPM_BUILD_ROOT
189 %{__make} -C programs install DESTDIR=$RPM_BUILD_ROOT
191 install programs/winhelp/hlp2sgml $RPM_BUILD_ROOT%{_bindir}
192 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
194 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
195 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
197 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
198 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
199 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
200 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
201 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
202 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
204 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
205 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
206 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
207 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
209 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
210 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
211 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
213 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
217 waveaudio=mciwave.drv
219 videodisc=mcipionr.drv
224 %if %{?debug:0}%{!?debug:1}
225 echo "Strip executable binaries and shared object files."
226 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
227 elfexelist=`echo $filelist | xargs -r file | \
228 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
229 elfsharedlist=`echo $filelist | xargs -r file | \
230 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
231 if [ -n "$elfexelist" ]; then \
232 strip -R .note -R .comment $elfexelist
234 if [ -n "$elfsharedlist" ]; then
235 strip --strip-unneeded -R .note -R .comment $elfsharedlist
239 /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
241 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
244 rm -f files.so; touch files.so
245 rm -f files.programs; touch files.programs
246 cd $RPM_BUILD_ROOT%{_libdir}/wine
248 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
251 for p in $programs; do
252 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
253 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
254 grep -v "$p\.exe\.so$" files.so > files.so.
255 mv -f files.so. files.so
259 rm -rf $RPM_BUILD_ROOT
263 /sbin/chkconfig --add wine
264 if [ ! -f /var/lock/subsys/wine ]; then
265 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
269 if [ "$1" = "0" ]; then
270 if [ -f /var/lock/subsys/wine ]; then
271 /etc/rc.d/init.d/wine stop >&2
273 /sbin/chkconfig --del wine
276 %postun -p /sbin/ldconfig
279 %defattr(644,root,root,755)
280 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
281 %doc documentation/{samples,status}
282 %if %{with html_docs}
283 %doc documentation/wine-{faq,user}
285 %attr(755,root,root) %{_bindir}/wine
286 %attr(755,root,root) %{_bindir}/wineboot
287 %attr(755,root,root) %{_bindir}/winecfg
288 %attr(755,root,root) %{_bindir}/wineclipsrv
289 %attr(755,root,root) %{_bindir}/winedbg
290 %attr(755,root,root) %{_bindir}/winelauncher
291 %attr(755,root,root) %{_bindir}/wineserver
292 %attr(755,root,root) %{_bindir}/wineshelllink
293 %attr(755,root,root) %{_libdir}/*.so*
295 %{_mandir}/man1/wine.*
296 %{_mandir}/man5/wine.conf.*
297 %config(noreplace) %{_sysconfdir}/wine.reg
298 %config(missingok) %{_sysconfdir}/wine.systemreg
299 %config(missingok) %{_sysconfdir}/wine.userreg
300 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
303 %files programs -f files.programs
304 %defattr(644,root,root,755)
307 %defattr(644,root,root,755)
308 %if %{with html_docs}
309 %doc documentation/{wine-devel,winelib-user,HOWTO-winelib}
311 %attr(755,root,root) %{_bindir}/fnt2bdf
312 %attr(755,root,root) %{_bindir}/function_grep.pl
313 %attr(755,root,root) %{_bindir}/hlp2sgml
314 %attr(755,root,root) %{_bindir}/widl
315 %attr(755,root,root) %{_bindir}/winebuild
316 %attr(755,root,root) %{_bindir}/winedump
317 %attr(755,root,root) %{_bindir}/wineg++
318 %attr(755,root,root) %{_bindir}/winegcc
319 %attr(755,root,root) %{_bindir}/winemaker
320 %attr(755,root,root) %{_bindir}/winewrap
321 %attr(755,root,root) %{_bindir}/wmc
322 %attr(755,root,root) %{_bindir}/wrc
325 %{_mandir}/man1/winemaker.*
326 %{_mandir}/man1/winebuild.*
327 %{_mandir}/man1/wmc.*
328 %{_mandir}/man1/wrc.*
333 %defattr(644,root,root,755)
334 %doc documentation/*.pdf