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