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