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