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