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