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