]> git.pld-linux.org Git - packages/wine.git/blob - wine.spec
- bcond xlibs.
[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_without  xlibs
12 #
13 # NOTE: wine detects 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 requild after change of any of 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:        20040213
34 Release:        1
35 License:        LGPL
36 Group:          Applications/Emulators
37 Source0:        http://dl.sourceforge.net/%{name}/Wine-%{version}.tar.gz
38 # Source0-md5:  074fb9771a600a32538cf15dc1cfcf6a
39 Source1:        %{name}.init
40 Source2:        %{name}.reg
41 Source3:        %{name}.systemreg
42 Source4:        %{name}.userreg
43 Patch0:         %{name}-fontcache.patch
44 Patch1:         %{name}-destdir.patch
45 Patch2:         %{name}-ncurses.patch
46 Patch3:         %{name}-makedep.patch
47 Patch4:         %{name}-dga.patch
48 URL:            http://www.winehq.org/
49 %if %{with xlibs}
50 BuildRequires:  libSM-devel
51 BuildRequires:  libXrandr-devel
52 BuildRequires:  libXrender-devel
53 BuildRequires:  libXt-devel
54 BuildRequires:  libXv-devel
55 %else
56 BuildRequires:  XFree86-devel
57 %endif
58 BuildRequires:  XFree86-OpenGL-devel-base
59 BuildRequires:  XFree86-OpenGL-devel
60 %{?with_alsa:BuildRequires:     alsa-lib-devel}
61 %{?with_arts:BuildRequires:     artsc-devel}
62 BuildRequires:  autoconf
63 BuildRequires:  automake
64 BuildRequires:  bison
65 # BuildRequires:        chpax >= 0.20020901-2
66 %{?with_cups:BuildRequires:     cups-devel}
67 BuildRequires:  docbook-dtd31-sgml
68 BuildRequires:  docbook-utils
69 BuildRequires:  flex
70 BuildRequires:  fontconfig-devel
71 BuildRequires:  freetype-devel >= 2.0.5
72 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel}
73 BuildRequires:  libjpeg-devel
74 BuildRequires:  libungif-devel
75 %{?with_nas:BuildRequires:      nas-devel}
76 BuildRequires:  ncurses-devel
77 %if %{with html_docs} || %{with pdf_docs}
78 # db2* failed previously - probably openjade or opensp bug
79 BuildRequires:  openjade >= 1:1.3.3-0.pre1
80 BuildRequires:  opensp >= 1:1.5.1
81 %endif
82 BuildRequires:  openssl-devel
83 %if %{with pdf_docs}
84 BuildRequires:  tetex-latex-cyrillic
85 BuildRequires:  tetex-metafont
86 BuildRequires:  tetex-fonts-jknappen
87 BuildRequires:  tetex-fonts-pazo
88 BuildRequires:  tetex-fonts-stmaryrd
89 BuildRequires:  tetex-fonts-type1-urw
90 %endif
91 %{?with_sane:BuildRequires:     sane-backends-devel}
92 BuildRequires:  xrender-devel
93 Requires(post): /sbin/ldconfig
94 Requires(post,preun):   /sbin/chkconfig
95 # link to wine/ntdll.dll.so, without any SONAME
96 Provides:       libntdll.dll.so
97 ExclusiveArch:  %{ix86}
98 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
99
100 %define         _noautoreqdep           libGL.so.1 libGLU.so.1
101 %define         no_install_post_strip   1
102
103 %define         _winedir                %{_datadir}/%{name}
104
105 %define         getsoname()     %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
106
107 %description
108 Wine is a program which allows running Microsoft Windows programs
109 (including DOS, Windows 3.x and Win32 executables) on Unix. It
110 consists of a program loader which loads and executes a Microsoft
111 Windows binary, and a library that implements Windows API calls using
112 their Unix or X11 equivalents. The library may also be used for
113 porting Win32 code into native Unix executables.
114
115 %description -l es
116 Ejecuta programas Windows en Linux.
117
118 %description -l pl
119 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
120 dla Microsoft Windows pod systemami unixowymi. Sk³ada siê on z
121 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
122 Microsoft Windows oraz z biblioteki, która implementuje API Windows
123 przy u¿yciu odpowiedników Unixowych oraz z X11. Biblioteka mo¿e byæ
124 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Unixa.
125
126 %description -l pt_BR
127 O Wine é um programa que permite rodar programas MS-Windows no X11.
128 Ele consiste de um carregador de programa, que carrega e executa um
129 binário MS-Windows, e de uma biblioteca de emulação que traduz as
130 chamadas da API para as equivalentes Unix/X11.
131
132 %package devel
133 Summary:        Wine - header files
134 Summary(es):    Biblioteca de desarrollo de wine
135 Summary(pl):    Wine - pliki nag³owkowe
136 Summary(pt_BR): Biblioteca de desenvolvimento do wine
137 Group:          Development/Libraries
138 Requires:       %{name} = %{version}-%{release}
139
140 %description devel
141 Wine - header files.
142
143 %description devel -l es
144 Biblioteca de desarrollo de wine.
145
146 %description devel -l pl
147 Wine - pliki nag³ówkowe.
148
149 %description devel -l pt_BR
150 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
151 WINE.
152
153 %package programs
154 Summary:        Wine - programs
155 Summary(pl):    Wine - programy
156 Group:          Applications
157 Requires:       %{name} = %{version}-%{release}
158
159 %description programs
160 Wine - programs.
161
162 %description programs -l pl
163 Wine - programy.
164
165 %package doc-pdf
166 Summary:        Wine documentation in PDF
167 Summary(pl):    Dokumentacja Wine w formacie PDF
168 Group:          Documentation
169
170 %description doc-pdf
171 Wine documentation in PDF format.
172
173 %description doc-pdf -l pl
174 Dokumentacja Wine w formacie PDF.
175
176 %package dll-d3d
177 Summary:        Direct3D implementation DLLs for Wine
178 Summary(pl):    Biblioteki DLL z implementacj± Direct3D dla Wine
179 Group:          Applications/Emulators
180 Requires:       %{name} = %{version}-%{release}
181 Requires:       OpenGL
182
183 %description dll-d3d
184 Direct3D implementation DLLs for Wine (through OpenGL).
185
186 %description dll-d3d -l pl
187 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
188
189 %package dll-gl
190 Summary:        OpenGL implementation DLLs for Wine
191 Summary(pl):    Biblioteki DLL z implementacj± OpenGL dla Wine
192 Group:          Applications/Emulators
193 Requires:       %{name} = %{version}-%{release}
194 Requires:       OpenGL
195
196 %description dll-gl
197 OpenGL implementation DLLs for Wine.
198
199 %description dll-gl -l pl
200 Biblioteki DLL z implementacj± OpenGL dla Wine.
201
202 %package dll-twain
203 Summary:        TWAIN implementation DLL for Wine
204 Summary(pl):    Biblioteka DLL z implementacj± TWAIN dla Wine
205 Group:          Applications/Emulators
206 Requires:       %{name} = %{version}-%{release}
207
208 %description dll-twain
209 TWAIN implementation DLL for Wine (through SANE).
210
211 %description dll-twain -l pl
212 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
213
214 %package drv-alsa
215 Summary:        ALSA driver for WINE mm.dll implementation
216 Summary(pl):    Sterownik ALSA dla implementacji mm.dll w Wine
217 Group:          Applications/Emulators
218 Requires:       %{name} = %{version}-%{release}
219
220 %description drv-alsa
221 ALSA driver for WINE mm.dll (multimedia system) implementation.
222
223 %description drv-alsa -l pl
224 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
225
226 %package drv-arts
227 Summary:        aRts driver for WINE mm.dll implementation
228 Summary(pl):    Sterownik aRts dla implementacji mm.dll w Wine
229 Group:          Applications/Emulators
230 Requires:       %{name} = %{version}
231
232 %description drv-arts
233 aRts driver for WINE mm.dll (multimedia system) implementation.
234
235 %description drv-arts -l pl
236 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
237
238 %package drv-jack
239 Summary:        JACK driver for WINE mm.dll implementation
240 Summary(pl):    Sterownik JACK dla implementacji mm.dll w Wine
241 Group:          Applications/Emulators
242 Requires:       %{name} = %{version}-%{release}
243 Requires:       jack-audio-connection-kit
244 # dlopened by SONAME detected at build time
245 %{?with_jack:Requires:  %{getsoname /usr/%{_lib}/libjack.so}}
246
247 %description drv-jack
248 JACK driver for WINE mm.dll (multimedia system) implementation.
249
250 %description drv-jack -l pl
251 Sterownik JACK dla implementacji mm.dll (systemu multimediów) w Wine.
252
253 %package drv-nas
254 Summary:        NAS driver for WINE mm.dll implementation
255 Summary(pl):    Sterownik NAS dla implementacji mm.dll w Wine
256 Group:          Applications/Emulators
257 Requires:       %{name} = %{version}-%{release}
258
259 %description drv-nas
260 NAS driver for WINE mm.dll (multimedia system) implementation.
261
262 %description drv-nas -l pl
263 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
264
265 %prep
266 %setup -q
267 %patch0 -p1
268 %patch1 -p1
269 %patch2 -p1
270 %patch3 -p1
271 #%patch4 -p1
272
273 # turn off compilation of some tools
274 #sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
275 sed -e "s|avitools||" programs/Makefile.in > .tmp
276 mv -f .tmp programs/Makefile.in
277
278 %build
279 %{__libtoolize}
280 %{__aclocal}
281 %{__autoconf}
282 CPPFLAGS="-DALSA_PCM_OLD_HW_PARAMS_API"
283 CFLAGS="%{rpmcflags} $CPPFLAGS"
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}/wine-kthread
422 %attr(755,root,root) %{_bindir}/wine-pthread
423 %attr(755,root,root) %{_bindir}/wineboot
424 %attr(755,root,root) %{_bindir}/winecfg
425 %attr(755,root,root) %{_bindir}/wineclipsrv
426 %attr(755,root,root) %{_bindir}/winedbg
427 %attr(755,root,root) %{_bindir}/winelauncher
428 %attr(755,root,root) %{_bindir}/wineserver
429 %attr(755,root,root) %{_bindir}/wineshelllink
430 %attr(755,root,root) %{_libdir}/*.so*
431 %dir %{_libdir}/wine
432 %{_mandir}/man1/wine.*
433 %{_mandir}/man5/wine.conf.*
434 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.reg
435 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.systemreg
436 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.userreg
437 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
438 %{_winedir}
439
440 %files programs -f files.programs
441 %defattr(644,root,root,755)
442
443 %files devel
444 %defattr(644,root,root,755)
445 %if %{with html_docs}
446 %doc documentation/{wine-devel,winelib-user}
447 %endif
448 %attr(755,root,root) %{_bindir}/fnt2bdf
449 %attr(755,root,root) %{_bindir}/function_grep.pl
450 %attr(755,root,root) %{_bindir}/hlp2sgml
451 %attr(755,root,root) %{_bindir}/widl
452 %attr(755,root,root) %{_bindir}/winebuild
453 %attr(755,root,root) %{_bindir}/winedump
454 %attr(755,root,root) %{_bindir}/wineg++
455 %attr(755,root,root) %{_bindir}/winegcc
456 %attr(755,root,root) %{_bindir}/winemaker
457 %attr(755,root,root) %{_bindir}/winewrap
458 %attr(755,root,root) %{_bindir}/wmc
459 %attr(755,root,root) %{_bindir}/wrc
460 %{_includedir}/wine
461 %{_mandir}/man1/winemaker.*
462 %{_mandir}/man1/winebuild.*
463 %{_mandir}/man1/wmc.*
464 %{_mandir}/man1/wrc.*
465 %{_aclocaldir}/*.m4
466
467 %if %{with pdf_docs}
468 %files doc-pdf
469 %defattr(644,root,root,755)
470 %doc documentation/*.pdf
471 %endif
472
473 %files dll-d3d
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
476 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
477 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
478 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
479
480 %files dll-gl
481 %defattr(644,root,root,755)
482 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
483 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
484
485 %if %{with sane}
486 %files dll-twain
487 %defattr(644,root,root,755)
488 %attr(755,root,root) %{_libdir}/wine/twain_32.dll.so
489 %endif
490
491 %if %{with alsa}
492 %files drv-alsa
493 %defattr(644,root,root,755)
494 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
495 %endif
496
497 %if %{with arts}
498 %files drv-arts
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
501 %endif
502
503 %if %{with jack}
504 %files drv-jack
505 %defattr(644,root,root,755)
506 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
507 %endif
508
509 %if %{with nas}
510 %files drv-nas
511 %defattr(644,root,root,755)
512 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
513 %endif
514
515 # additional dependencies in *.so not separated (yet?) from main package
516 #   ddraw.dll.so,x11drv.dll.so depend on X11 libs
517 #   ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
518 #   ttydrv.dll.so depends on ncurses
This page took 0.114246 seconds and 4 git commands to generate.