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