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