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