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