]> git.pld-linux.org Git - packages/wine.git/blob - wine.spec
- added doc patch (SGML syntax fix)
[packages/wine.git] / wine.spec
1 #
2 # Conditional build:
3 %bcond_without  alsa            # don't build ALSA mm driver
4 %bcond_without  arts            # don't build aRts mm driver
5 %bcond_without  jack            # don't build JACK mm driver
6 %bcond_without  nas             # don't build NAS mm driver
7 %bcond_without  sane            # don't build TWAIN DLL with scanning support (through SANE)
8 %bcond_without  cups            # without CUPS printing support in winspool,wineps DLLs
9 %bcond_without  html_docs       # build html docs
10 %bcond_without  pdf_docs        # build pdf docs
11 %bcond_with     xlibs
12 #
13 # NOTE: wine detects the following SONAMES for dlopen at build time:
14 #   libcrypto,libssl (wininet.dll)
15 #   libcups (winspool.dll.so,wineps.dll.so)
16 #   libcurses/libncurses (wineconsole program)
17 #   libfontconfig (gdi32.dll.so)
18 #   libfreetype (wineps.dll.so,gdi32.dll.so)
19 #   libGL (x11drv.dll.so,ddraw.dll.so)
20 #   libjack (winejack.drv.so - explicit dependency in subpackage)
21 #   libX11, libXext, libXi, libXrender (x11drv.dll.so)
22 # thus requires rebuild after change of any of the above.
23 #
24 # JACK requires ALSA
25 %if %{without alsa}
26 %undefine       with_jack
27 %endif
28 Summary:        Program that lets you launch Win applications
29 Summary(es):    Ejecuta programas Windows en Linux
30 Summary(pl):    Program pozwalaj±cy uruchamiaæ aplikacje Windows
31 Summary(pt_BR): Executa programas Windows no Linux
32 Name:           wine
33 Version:        20050211
34 Release:        1
35 License:        LGPL
36 Group:          Applications/Emulators
37 #Source0:       http://dl.sourceforge.net/%{name}/Wine-%{version}.tar.gz
38 Source0:        ftp://ftp.ibiblio.org/pub/Linux/ALPHA/%{name}/development/Wine-%{version}.tar.gz
39 # Source0-md5:  19c532b9b344d1b197ee8d55289ebf1c
40 Source1:        %{name}.init
41 Source2:        %{name}.reg
42 Source3:        %{name}.systemreg
43 Source4:        %{name}.userreg
44 Patch0:         %{name}-fontcache.patch
45 Patch1:         %{name}-destdir.patch
46 Patch2:         %{name}-ncurses.patch
47 Patch3:         %{name}-makedep.patch
48 Patch4:         %{name}-doc.patch
49 #Patch4:                %{name}-dga.patch
50 URL:            http://www.winehq.org/
51 %if %{with xlibs}
52 BuildRequires:  libSM-devel
53 BuildRequires:  libXrandr-devel
54 BuildRequires:  libXrender-devel
55 BuildRequires:  libXt-devel
56 BuildRequires:  libXv-devel
57 %else
58 BuildRequires:  XFree86-devel
59 %endif
60 BuildRequires:  XFree86-OpenGL-devel-base
61 BuildRequires:  XFree86-OpenGL-devel
62 %{?with_alsa:BuildRequires:     alsa-lib-devel}
63 %{?with_arts:BuildRequires:     artsc-devel}
64 BuildRequires:  autoconf
65 BuildRequires:  automake
66 BuildRequires:  bison
67 # BuildRequires:        chpax >= 0.20020901-2
68 %{?with_cups:BuildRequires:     cups-devel}
69 BuildRequires:  docbook-dtd31-sgml
70 BuildRequires:  docbook-utils
71 BuildRequires:  flex
72 BuildRequires:  fontconfig-devel
73 BuildRequires:  fontforge
74 BuildRequires:  freetype-devel >= 2.0.5
75 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel}
76 BuildRequires:  libjpeg-devel
77 BuildRequires:  libtool
78 BuildRequires:  libungif-devel
79 %{?with_nas:BuildRequires:      nas-devel}
80 BuildRequires:  ncurses-devel
81 %if %{with html_docs} || %{with pdf_docs}
82 # db2* failed previously - probably openjade or opensp bug
83 BuildRequires:  openjade >= 1:1.3.3-0.pre1
84 BuildRequires:  opensp >= 1:1.5.1
85 %endif
86 BuildRequires:  openssl-devel >= 0.9.7d
87 %if %{with pdf_docs}
88 BuildRequires:  tetex-latex-cyrillic
89 BuildRequires:  tetex-metafont
90 BuildRequires:  tetex-fonts-jknappen
91 BuildRequires:  tetex-fonts-pazo
92 BuildRequires:  tetex-fonts-stmaryrd
93 BuildRequires:  tetex-fonts-type1-urw
94 %endif
95 %{?with_sane:BuildRequires:     sane-backends-devel}
96 BuildRequires:  xrender-devel
97 Requires(post): /sbin/ldconfig
98 Requires(post,preun):   /sbin/chkconfig
99 # link to wine/ntdll.dll.so, without any SONAME
100 Provides:       libntdll.dll.so
101 ExclusiveArch:  %{ix86}
102 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
103
104 %define         _noautoreqdep           libGL.so.1 libGLU.so.1
105 %define         no_install_post_strip   1
106
107 %define         _winedir                %{_datadir}/%{name}
108
109 %define         getsoname()     %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
110
111 %description
112 Wine is a program which allows running Microsoft Windows programs
113 (including DOS, Windows 3.x and Win32 executables) on Unix. It
114 consists of a program loader which loads and executes a Microsoft
115 Windows binary, and a library that implements Windows API calls using
116 their Unix or X11 equivalents. The library may also be used for
117 porting Win32 code into native Unix executables.
118
119 %description -l es
120 Ejecuta programas Windows en Linux.
121
122 %description -l pl
123 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
124 dla Microsoft Windows pod systemami uniksowymi. Sk³ada siê on z
125 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
126 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
127 przy u¿yciu odpowiedników uniksowych oraz z X11. Biblioteka mo¿e byæ
128 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
129
130 %description -l pt_BR
131 O Wine é um programa que permite rodar programas MS-Windows no X11.
132 Ele consiste de um carregador de programa, que carrega e executa um
133 binário MS-Windows, e de uma biblioteca de emulação que traduz as
134 chamadas da API para as equivalentes Unix/X11.
135
136 %package devel
137 Summary:        Wine - header files
138 Summary(es):    Biblioteca de desarrollo de wine
139 Summary(pl):    Wine - pliki nag³owkowe
140 Summary(pt_BR): Biblioteca de desenvolvimento do wine
141 Group:          Development/Libraries
142 Requires:       %{name} = %{version}-%{release}
143
144 %description devel
145 Wine - header files.
146
147 %description devel -l es
148 Biblioteca de desarrollo de wine.
149
150 %description devel -l pl
151 Wine - pliki nag³ówkowe.
152
153 %description devel -l pt_BR
154 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
155 WINE.
156
157 %package programs
158 Summary:        Wine - programs
159 Summary(pl):    Wine - programy
160 Group:          Applications
161 Requires:       %{name} = %{version}-%{release}
162
163 %description programs
164 Wine - programs.
165
166 %description programs -l pl
167 Wine - programy.
168
169 %package doc-pdf
170 Summary:        Wine documentation in PDF
171 Summary(pl):    Dokumentacja Wine w formacie PDF
172 Group:          Documentation
173
174 %description doc-pdf
175 Wine documentation in PDF format.
176
177 %description doc-pdf -l pl
178 Dokumentacja Wine w formacie PDF.
179
180 %package dll-d3d
181 Summary:        Direct3D implementation DLLs for Wine
182 Summary(pl):    Biblioteki DLL z implementacj± Direct3D dla Wine
183 Group:          Applications/Emulators
184 Requires:       %{name} = %{version}-%{release}
185 Requires:       OpenGL
186
187 %description dll-d3d
188 Direct3D implementation DLLs for Wine (through OpenGL).
189
190 %description dll-d3d -l pl
191 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
192
193 %package dll-gl
194 Summary:        OpenGL implementation DLLs for Wine
195 Summary(pl):    Biblioteki DLL z implementacj± OpenGL dla Wine
196 Group:          Applications/Emulators
197 Requires:       %{name} = %{version}-%{release}
198 Requires:       OpenGL
199
200 %description dll-gl
201 OpenGL implementation DLLs for Wine.
202
203 %description dll-gl -l pl
204 Biblioteki DLL z implementacj± OpenGL dla Wine.
205
206 %package dll-twain
207 Summary:        TWAIN implementation DLL for Wine
208 Summary(pl):    Biblioteka DLL z implementacj± TWAIN dla Wine
209 Group:          Applications/Emulators
210 Requires:       %{name} = %{version}-%{release}
211
212 %description dll-twain
213 TWAIN implementation DLL for Wine (through SANE).
214
215 %description dll-twain -l pl
216 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
217
218 %package drv-alsa
219 Summary:        ALSA driver for WINE mm.dll implementation
220 Summary(pl):    Sterownik ALSA dla implementacji mm.dll w Wine
221 Group:          Applications/Emulators
222 Requires:       %{name} = %{version}-%{release}
223
224 %description drv-alsa
225 ALSA driver for WINE mm.dll (multimedia system) implementation.
226
227 %description drv-alsa -l pl
228 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
229
230 %package drv-arts
231 Summary:        aRts driver for WINE mm.dll implementation
232 Summary(pl):    Sterownik aRts dla implementacji mm.dll w Wine
233 Group:          Applications/Emulators
234 Requires:       %{name} = %{version}-%{release}
235
236 %description drv-arts
237 aRts driver for WINE mm.dll (multimedia system) implementation.
238
239 %description drv-arts -l pl
240 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
241
242 %package drv-jack
243 Summary:        JACK driver for WINE mm.dll implementation
244 Summary(pl):    Sterownik JACK-a dla implementacji mm.dll w Wine
245 Group:          Applications/Emulators
246 Requires:       %{name} = %{version}-%{release}
247 Requires:       jack-audio-connection-kit
248 # dlopened by SONAME detected at build time
249 %{?with_jack:Requires:  %{getsoname /usr/%{_lib}/libjack.so}}
250
251 %description drv-jack
252 JACK driver for WINE mm.dll (multimedia system) implementation.
253
254 %description drv-jack -l pl
255 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
256 Wine.
257
258 %package drv-nas
259 Summary:        NAS driver for WINE mm.dll implementation
260 Summary(pl):    Sterownik NAS dla implementacji mm.dll w Wine
261 Group:          Applications/Emulators
262 Requires:       %{name} = %{version}-%{release}
263
264 %description drv-nas
265 NAS driver for WINE mm.dll (multimedia system) implementation.
266
267 %description drv-nas -l pl
268 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
269
270 %prep
271 %setup -q
272 %patch0 -p1
273 %patch1 -p1
274 %patch2 -p1
275 %patch3 -p1
276 %patch4 -p1
277
278 # turn off compilation of some tools
279 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
280 #sed -i -e "s|avitools||" programs/Makefile.in
281
282 %build
283 %{__autoconf}
284 %configure \
285         %{!?debug:--disable-debug} \
286         %{!?debug:--disable-trace} \
287         --enable-curses \
288         --enable-opengl \
289         --with-x
290 %{__make} depend
291 %{__make}
292 %{__make} -C programs
293 #%{__make} -C programs/regapi
294
295 cd documentation
296 %if %{with html_docs}
297 db2html wine-user.sgml
298 db2html wine-devel.sgml
299 db2html wine-faq.sgml
300 db2html winelib-user.sgml
301 %endif
302
303 %if %{with pdf_docs}
304 db2pdf wine-user.sgml
305 db2pdf wine-devel.sgml
306 db2pdf wine-faq.sgml
307 db2pdf winelib-user.sgml
308 %endif
309 cd -
310
311 %install
312 rm -rf $RPM_BUILD_ROOT
313 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
314
315 %{__make} install \
316         DESTDIR=$RPM_BUILD_ROOT
317
318 %{__make} -C programs install \
319         DESTDIR=$RPM_BUILD_ROOT
320
321 install programs/winhelp/hlp2sgml       $RPM_BUILD_ROOT%{_bindir}
322 install tools/fnt2bdf                   $RPM_BUILD_ROOT%{_bindir}
323
324 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
325 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
326
327 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
328         $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
329         "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
330         $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
331         $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
332         $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
333
334 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
335 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
336 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
337 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
338
339 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
340 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
341 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
342
343 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
344 [mci]
345 cdaudio=mcicda.drv
346 sequencer=mciseq.drv
347 waveaudio=mciwave.drv
348 avivideo=mciavi.drv
349 videodisc=mcipionr.drv
350 vcr=mciviscd.drv
351 MPEGVideo=mciqtz.drv
352 EOF
353
354 %if %{?debug:0}%{!?debug:1}
355 echo "Strip executable binaries and shared object files."
356 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
357 elfexelist=`echo $filelist | xargs -r file | \
358         awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
359 elfsharedlist=`echo $filelist | xargs -r file | \
360         awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
361 if [ -n "$elfexelist" ]; then \
362         strip -R .note -R .comment $elfexelist
363 fi
364 if [ -n "$elfsharedlist" ]; then
365         strip --strip-unneeded -R .note -R .comment $elfsharedlist
366 fi
367 %endif
368
369 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
370
371 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
372
373 BZZZ=`pwd`
374 rm -f files.so;         touch files.so
375 rm -f files.programs;   touch files.programs
376 cd $RPM_BUILD_ROOT%{_libdir}/wine
377 for f in *.so; do
378         case $f in
379                 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|opengl32.dll.so|twain_32.dll.so|winealsa.drv.so|winearts.drv.so|winejack.drv.so|winenas.drv.so)
380                         ;;
381                 *)
382                         echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
383         esac
384 done
385 cd -
386 for p in $programs; do
387         echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
388         echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
389         grep -v "$p\.exe\.so$" files.so > files.so.
390         mv -f files.so. files.so
391 done
392
393 %clean
394 rm -rf $RPM_BUILD_ROOT
395
396 %post
397 /sbin/ldconfig
398 /sbin/chkconfig --add wine
399 if [ ! -f /var/lock/subsys/wine ]; then
400         echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
401 fi
402
403 %preun
404 if [ "$1" = "0" ]; then
405         if [ -f /var/lock/subsys/wine ]; then
406                 /etc/rc.d/init.d/wine stop >&2
407         fi
408         /sbin/chkconfig --del wine
409 fi
410
411 %postun -p /sbin/ldconfig
412
413 %files -f files.so
414 %defattr(644,root,root,755)
415 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
416 %doc documentation/samples
417 %if %{with html_docs}
418 %doc documentation/wine-{faq,user}
419 %endif
420 %attr(755,root,root) %{_bindir}/wine
421 %attr(755,root,root) %{_bindir}/wineboot
422 %attr(755,root,root) %{_bindir}/winebrowser
423 %attr(755,root,root) %{_bindir}/winecfg
424 %attr(755,root,root) %{_bindir}/winedbg
425 %attr(755,root,root) %{_bindir}/wine-kthread
426 %attr(755,root,root) %{_bindir}/winelauncher
427 %attr(755,root,root) %{_bindir}/wineprefixcreate
428 %attr(755,root,root) %{_bindir}/wine-preloader
429 %attr(755,root,root) %{_bindir}/wine-pthread
430 %attr(755,root,root) %{_bindir}/wineserver
431 %attr(755,root,root) %{_bindir}/wineshelllink
432 %attr(755,root,root) %{_libdir}/*.so*
433 %dir %{_libdir}/wine
434 %{_mandir}/man1/wine.*
435 %{_mandir}/man1/winedbg.1*
436 %{_mandir}/man5/wine.conf.*
437 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.reg
438 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.systemreg
439 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.userreg
440 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
441 %{_winedir}
442 %{_datadir}/fonts/wine
443 %{_desktopdir}/wine.desktop
444
445 %files programs -f files.programs
446 %defattr(644,root,root,755)
447
448 %files devel
449 %defattr(644,root,root,755)
450 %if %{with html_docs}
451 %doc documentation/{wine-devel,winelib-user}
452 %endif
453 %attr(755,root,root) %{_bindir}/fnt2bdf
454 %attr(755,root,root) %{_bindir}/function_grep.pl
455 %attr(755,root,root) %{_bindir}/hlp2sgml
456 %attr(755,root,root) %{_bindir}/widl
457 %attr(755,root,root) %{_bindir}/winebuild
458 %attr(755,root,root) %{_bindir}/winedump
459 %attr(755,root,root) %{_bindir}/wineg++
460 %attr(755,root,root) %{_bindir}/winegcc
461 %attr(755,root,root) %{_bindir}/winemaker
462 #%attr(755,root,root) %{_bindir}/winewrap
463 %attr(755,root,root) %{_bindir}/wmc
464 %attr(755,root,root) %{_bindir}/wrc
465 %{_includedir}/wine
466 %{_mandir}/man1/widl.1*
467 %{_mandir}/man1/winedump.1*
468 %{_mandir}/man1/winegcc.1*
469 %{_mandir}/man1/winemaker.1*
470 %{_mandir}/man1/winebuild.1*
471 %{_mandir}/man1/wmc.1*
472 %{_mandir}/man1/wrc.1*
473 %{_aclocaldir}/*.m4
474
475 %if %{with pdf_docs}
476 %files doc-pdf
477 %defattr(644,root,root,755)
478 %doc documentation/*.pdf
479 %endif
480
481 %files dll-d3d
482 %defattr(644,root,root,755)
483 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
484 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
485 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
486 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
487
488 %files dll-gl
489 %defattr(644,root,root,755)
490 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
491 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
492
493 %if %{with sane}
494 %files dll-twain
495 %defattr(644,root,root,755)
496 %attr(755,root,root) %{_libdir}/wine/twain_32.dll.so
497 %endif
498
499 %if %{with alsa}
500 %files drv-alsa
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
503 %endif
504
505 %if %{with arts}
506 %files drv-arts
507 %defattr(644,root,root,755)
508 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
509 %endif
510
511 %if %{with jack}
512 %files drv-jack
513 %defattr(644,root,root,755)
514 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
515 %endif
516
517 %if %{with nas}
518 %files drv-nas
519 %defattr(644,root,root,755)
520 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
521 %endif
522
523 # additional dependencies in *.so not separated (yet?) from main package
524 #   ddraw.dll.so,x11drv.dll.so depend on X11 libs
525 #   ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
526 #   ttydrv.dll.so depends on ncurses
This page took 0.075583 seconds and 4 git commands to generate.