]> git.pld-linux.org Git - packages/wine.git/blob - wine.spec
- up to 1.1.39
[packages/wine.git] / wine.spec
1 #
2 # Conditional build:
3 %bcond_without  alsa            # don't build ALSA mm driver
4 %bcond_without  jack            # don't build JACK mm driver
5 %bcond_without  nas             # don't build NAS mm driver
6 %bcond_without  sane            # don't build TWAIN DLL with scanning support (through SANE)
7 %bcond_without  cups            # without CUPS printing support in winspool,wineps DLLs
8 #
9 # TODO:
10 # - support for CAPI (ISDN support; --with-capi)
11 #
12 # NOTE: wine detects the 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, libXi, libXrender (x11drv.dll.so)
21 # thus requires rebuild after change of any of the 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.UTF-8):      Ejecuta programas Windows en Linux
29 Summary(pl.UTF-8):      Program pozwalający uruchamiać aplikacje Windows
30 Summary(pt_BR.UTF-8):   Executa programas Windows no Linux
31 Name:           wine
32 Version:        1.1.39
33 Release:        1
34 Epoch:          1
35 License:        LGPL
36 Group:          Applications/Emulators
37 Source0:        http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
38 # Source0-md5:  cbde85e50db653f54fe9da34be4a6de5
39 Source1:        %{name}-uninstaller.desktop
40 Patch0:         %{name}-fontcache.patch
41 Patch1:         %{name}-makedep.patch
42 Patch2:         %{name}-ncurses.patch
43 Patch4:         %{name}-disable-valgrind.patch
44 Patch5:         %{name}-ca_certificates.patch
45 Patch6:         %{name}-notarget.patch
46 Patch7:         %{name}-manpaths.patch
47 #PatchX:        %{name}-dga.patch
48 URL:            http://www.winehq.org/
49 BuildRequires:  OpenAL-devel
50 BuildRequires:  OpenGL-GLU-devel
51 %{?with_alsa:BuildRequires:     alsa-lib-devel}
52 %{?with_arts:BuildRequires:     artsc-devel}
53 BuildRequires:  autoconf
54 BuildRequires:  automake
55 BuildRequires:  bison
56 %{?with_cups:BuildRequires:     cups-devel}
57 BuildRequires:  docbook-dtd31-sgml
58 BuildRequires:  docbook-utils
59 BuildRequires:  flex
60 BuildRequires:  fontconfig-devel
61 BuildRequires:  fontforge
62 BuildRequires:  freetype-devel >= 2.0.5
63 BuildRequires:  giflib-devel
64 BuildRequires:  gnutls-devel
65 BuildRequires:  hal-devel
66 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel}
67 BuildRequires:  lcms-devel
68 BuildRequires:  libgphoto2-devel
69 BuildRequires:  libgsm-devel
70 BuildRequires:  libjpeg-devel
71 BuildRequires:  libmpg123-devel
72 BuildRequires:  libtool
73 BuildRequires:  libxslt-devel
74 %{?with_nas:BuildRequires:      nas-devel}
75 BuildRequires:  ncurses-devel
76 # db2* failed previously - probably openjade or opensp bug
77 BuildRequires:  openjade >= 1:1.3.3-0.pre1
78 BuildRequires:  openldap-devel
79 BuildRequires:  opensp >= 1:1.5.1
80 BuildRequires:  openssl-devel >= 0.9.7d
81 BuildRequires:  pkgconfig
82 %{?with_sane:BuildRequires:     sane-backends-devel}
83 BuildRequires:  unixODBC-devel >= 2.2.12-2
84 #BuildRequires: valgrind
85 BuildRequires:  xorg-lib-libXcomposite-devel
86 BuildRequires:  xorg-lib-libXcursor-devel
87 BuildRequires:  xorg-lib-libXi-devel
88 BuildRequires:  xorg-lib-libXinerama-devel
89 BuildRequires:  xorg-lib-libXmu-devel
90 BuildRequires:  xorg-lib-libXrandr-devel
91 BuildRequires:  xorg-lib-libXrender-devel
92 BuildRequires:  xorg-lib-libXxf86dga-devel
93 BuildRequires:  xorg-lib-libXxf86vm-devel
94 Requires:       libfreetype.so.6
95 Suggests:       binfmt-detector
96 Suggests:       ca-certificates
97 Conflicts:      ca-certificates < 20080809-4
98 # for printing needs lpr
99 Suggests:       cups-clients
100 # for winelauncher
101 Suggests:       xorg-app-xmessage
102 # for ntlm_auth
103 Suggests:       samba-common >= 1:3.0.25
104 # link to wine/ntdll.dll.so, without any SONAME
105 Provides:       libntdll.dll.so
106 Obsoletes:      wine-doc-pdf
107 Obsoletes:      wine-drv-arts
108 ExclusiveArch:  %{ix86}
109 ExcludeArch:    i386
110 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
111
112 %define         _noautoreqdep           libGL.so.1 libGLU.so.1
113 %define         no_install_post_strip   1
114
115 %define         _winedir                %{_datadir}/%{name}
116
117 %define         getsoname()     %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
118
119 %undefine       debuginfocflags
120
121 %description
122 Wine is a program which allows running Microsoft Windows programs
123 (including DOS, Windows 3.x and Win32 executables) on Unix. It
124 consists of a program loader which loads and executes a Microsoft
125 Windows binary, and a library that implements Windows API calls using
126 their Unix or X11 equivalents. The library may also be used for
127 porting Win32 code into native Unix executables.
128
129 %description -l es.UTF-8
130 Ejecuta programas Windows en Linux.
131
132 %description -l pl.UTF-8
133 Wine jest programem dzięki któremu można uruchamiać programy napisane
134 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
135 loadera, który pozwala wczytywać i uruchamiać programy w formacie
136 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
137 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
138 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
139
140 %description -l pt_BR.UTF-8
141 O Wine é um programa que permite rodar programas MS-Windows no X11.
142 Ele consiste de um carregador de programa, que carrega e executa um
143 binário MS-Windows, e de uma biblioteca de emulação que traduz as
144 chamadas da API para as equivalentes Unix/X11.
145
146 %package devel
147 Summary:        Wine - header files
148 Summary(es.UTF-8):      Biblioteca de desarrollo de wine
149 Summary(pl.UTF-8):      Wine - pliki nagłowkowe
150 Summary(pt_BR.UTF-8):   Biblioteca de desenvolvimento do wine
151 Group:          Development/Libraries
152 Requires:       %{name} = %{epoch}:%{version}-%{release}
153
154 %description devel
155 Wine - header files.
156
157 %description devel -l es.UTF-8
158 Biblioteca de desarrollo de wine.
159
160 %description devel -l pl.UTF-8
161 Wine - pliki nagłówkowe.
162
163 %description devel -l pt_BR.UTF-8
164 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
165 WINE.
166
167 %package programs
168 Summary:        Wine - programs
169 Summary(pl.UTF-8):      Wine - programy
170 Group:          Applications
171 Requires:       %{name} = %{epoch}:%{version}-%{release}
172
173 %description programs
174 Wine - programs.
175
176 %description programs -l pl.UTF-8
177 Wine - programy.
178
179 %package dll-d3d
180 Summary:        Direct3D implementation DLLs for Wine
181 Summary(pl.UTF-8):      Biblioteki DLL z implementacją Direct3D dla Wine
182 Group:          Applications/Emulators
183 Requires:       %{name} = %{epoch}:%{version}-%{release}
184 Requires:       OpenGL
185
186 %description dll-d3d
187 Direct3D implementation DLLs for Wine (through OpenGL).
188
189 %description dll-d3d -l pl.UTF-8
190 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
191
192 %package dll-gl
193 Summary:        OpenGL implementation DLLs for Wine
194 Summary(pl.UTF-8):      Biblioteki DLL z implementacją OpenGL dla Wine
195 Group:          Applications/Emulators
196 Requires:       %{name} = %{epoch}:%{version}-%{release}
197 Requires:       OpenGL
198
199 %description dll-gl
200 OpenGL implementation DLLs for Wine.
201
202 %description dll-gl -l pl.UTF-8
203 Biblioteki DLL z implementacją OpenGL dla Wine.
204
205 %package dll-twain
206 Summary:        TWAIN implementation DLL for Wine
207 Summary(pl.UTF-8):      Biblioteka DLL z implementacją TWAIN dla Wine
208 Group:          Applications/Emulators
209 Requires:       %{name} = %{epoch}:%{version}-%{release}
210
211 %description dll-twain
212 TWAIN implementation DLL for Wine (through SANE).
213
214 %description dll-twain -l pl.UTF-8
215 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
216
217 %package drv-alsa
218 Summary:        ALSA driver for WINE mm.dll implementation
219 Summary(pl.UTF-8):      Sterownik ALSA dla implementacji mm.dll w Wine
220 Group:          Applications/Emulators
221 Requires:       %{name} = %{epoch}:%{version}-%{release}
222
223 %description drv-alsa
224 ALSA driver for WINE mm.dll (multimedia system) implementation.
225
226 %description drv-alsa -l pl.UTF-8
227 Sterownik ALSA 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.UTF-8):      Sterownik JACK-a dla implementacji mm.dll w Wine
232 Group:          Applications/Emulators
233 Requires:       %{name} = %{epoch}:%{version}-%{release}
234 Requires:       jack-audio-connection-kit
235 # dlopened by SONAME detected at build time
236 %{?with_jack:Requires:  %{getsoname /usr/%{_lib}/libjack.so}}
237
238 %description drv-jack
239 JACK driver for WINE mm.dll (multimedia system) implementation.
240
241 %description drv-jack -l pl.UTF-8
242 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
243 Wine.
244
245 %package drv-nas
246 Summary:        NAS driver for WINE mm.dll implementation
247 Summary(pl.UTF-8):      Sterownik NAS dla implementacji mm.dll w Wine
248 Group:          Applications/Emulators
249 Requires:       %{name} = %{epoch}:%{version}-%{release}
250
251 %description drv-nas
252 NAS driver for WINE mm.dll (multimedia system) implementation.
253
254 %description drv-nas -l pl.UTF-8
255 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
256
257 %prep
258 %setup -q
259 %patch0 -p1
260 %patch1 -p1
261 %patch2 -p1
262 %patch4 -p1
263 %patch5 -p1
264 %patch6 -p1
265 %patch7 -p1
266
267 # turn off compilation of some tools
268 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
269 #sed -i -e "s|avitools||" programs/Makefile.in
270
271 %build
272 %{__autoconf}
273 %{__autoheader}
274 %configure \
275         --with%{!?with_alsa:out}-alsa \
276         --with-audioio \
277         --without-capi \
278         --with-cms \
279         --with-coreaudio \
280         --with%{!?with_cups:out}-cups \
281         --with-curses \
282         --with-esd \
283         --with-fontconfig \
284         --with-freetype \
285         --with-glu \
286         --with-gnutls \
287         --with-gphoto \
288         --with-gsm \
289         --with-hal \
290         --with%{!?with_jack:out}-jack \
291         --with-jpeg \
292         --with-ldap \
293         --with-mpg123 \
294         --with%{!?with_nas:out}-nas \
295         --with-opengl \
296         --with-openssl \
297         --with-oss \
298         --with-png \
299         --with-pthread \
300         --with%{!?with_sane:out}-sane \
301         --with-xcomposite \
302         --with-xcursor \
303         --with-xinerama \
304         --with-xinput \
305         --with-xml \
306         --with-xrandr \
307         --with-xrender \
308         --with-xshape \
309         --with-xshm \
310         --with-xslt \
311         --with-xxf86vm \
312         --with-x
313 %{__make} depend
314 %{__make}
315 %{__make} -C programs
316
317 %install
318 rm -rf $RPM_BUILD_ROOT
319 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
320
321 %{__make} install \
322         DESTDIR=$RPM_BUILD_ROOT
323
324 %{__make} -C programs install \
325         DESTDIR=$RPM_BUILD_ROOT
326
327 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
328
329 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
330
331 install -d \
332         $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
333         "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
334         $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
335         $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
336         $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
337
338 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
339 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
340 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
341
342 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
343 [mci]
344 cdaudio=mcicda.drv
345 sequencer=mciseq.drv
346 waveaudio=mciwave.drv
347 avivideo=mciavi.drv
348 videodisc=mcipionr.drv
349 vcr=mciviscd.drv
350 MPEGVideo=mciqtz.drv
351 EOF
352
353 %if %{?debug:0}%{!?debug:1}
354 echo "Strip executable binaries and shared object files."
355 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
356 elfexelist=`echo $filelist | xargs -r file | \
357         awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
358 elfsharedlist=`echo $filelist | xargs -r file | \
359         awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
360 if [ -n "$elfexelist" ]; then \
361         strip -R .note -R .comment $elfexelist
362 fi
363 if [ -n "$elfsharedlist" ]; then
364         strip --strip-unneeded -R .note -R .comment $elfsharedlist
365 fi
366 %endif
367
368 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
369
370 programs="msiexec notepad regedit regsvr32 wineboot winecfg wineconsole winedbg winefile winemine winepath"
371
372 BZZZ=`pwd`
373 rm -f files.so;         touch files.so
374 rm -f files.programs;   touch files.programs
375 cd $RPM_BUILD_ROOT%{_libdir}/wine
376 for f in *.so; do
377         case $f in
378                 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|opengl32.dll.so|sane.ds.so|twain.dll.so|twain_32.dll.so|winealsa.drv.so|winejack.drv.so|winenas.drv.so)
379                         ;;
380                 *)
381                         echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
382         esac
383 done
384 cd -
385 for p in $programs; do
386         echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
387         echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
388         grep -v "$p\.exe\.so$" files.so > files.so.
389         mv -f files.so. files.so
390 done
391
392 install -d $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
393 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
394 install programs/winetest/winetest.svg $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
395
396 %clean
397 rm -rf $RPM_BUILD_ROOT
398
399 %post   -p /sbin/ldconfig
400 %postun -p /sbin/ldconfig
401
402 %triggerpostun -- wine < 1:0.9.12-1.9
403 rm -f /var/lock/subsys/wine
404 if [ -x /sbin/chkconfig ]; then
405         /sbin/chkconfig --del wine
406 fi
407
408 %files -f files.so
409 %defattr(644,root,root,755)
410 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
411 %lang(de) %doc documentation/README.de
412 %lang(es) %doc documentation/README.es
413 %lang(fr) %doc documentation/README.fr
414 %lang(it) %doc documentation/README.it
415 %lang(ko) %doc documentation/README.ko
416 %lang(nb) %doc documentation/README.no
417 %lang(pt) %doc documentation/README.pt
418 %lang(pt_BR) %doc documentation/README.pt_br
419 %attr(755,root,root) %{_bindir}/msiexec
420 %attr(755,root,root) %{_bindir}/wine
421 %attr(755,root,root) %{_bindir}/wineboot
422 %attr(755,root,root) %{_bindir}/winecfg
423 %attr(755,root,root) %{_bindir}/winedbg
424 %attr(755,root,root) %{_bindir}/wineprefixcreate
425 %attr(755,root,root) %{_bindir}/wine-preloader
426 %attr(755,root,root) %{_bindir}/wineserver
427 %attr(755,root,root) %{_libdir}/*.so*
428 %dir %{_libdir}/wine
429 %dir %{_libdir}/wine/fakedlls
430 %{_libdir}/wine/fakedlls/*.acm
431 %{_libdir}/wine/fakedlls/*.cpl
432 %{_libdir}/wine/fakedlls/*.dll
433 %{_libdir}/wine/fakedlls/*.dll16
434 %{_libdir}/wine/fakedlls/*.drv
435 %{_libdir}/wine/fakedlls/*.drv16
436 %{_libdir}/wine/fakedlls/*.ds
437 %{_libdir}/wine/fakedlls/*.exe
438 %{_libdir}/wine/fakedlls/*.exe16
439 %{_libdir}/wine/fakedlls/*.mod16
440 %{_libdir}/wine/fakedlls/*.ocx
441 %{_libdir}/wine/fakedlls/*.sys
442 %{_libdir}/wine/fakedlls/*.tlb
443 %{_libdir}/wine/fakedlls/*.vxd
444 %{_mandir}/man1/wine.1*
445 %lang(de) %{_mandir}/de/man1/wine.1*
446 %lang(fr) %{_mandir}/fr/man1/wine.1*
447 %{_mandir}/man1/winedbg.1*
448 %{_mandir}/man1/wineprefixcreate.1*
449 %{_mandir}/man1/wineserver.1*
450 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
451 %{_winedir}
452 %{_desktopdir}/wine.desktop
453 %{_desktopdir}/wine-uninstaller.desktop
454 %{_pixmapsdir}/wine.svg
455
456 %files programs -f files.programs
457 %defattr(644,root,root,755)
458
459 %files devel
460 %defattr(644,root,root,755)
461 %attr(755,root,root) %{_bindir}/fnt2bdf
462 %attr(755,root,root) %{_bindir}/function_grep.pl
463 %attr(755,root,root) %{_bindir}/widl
464 %attr(755,root,root) %{_bindir}/winebuild
465 %attr(755,root,root) %{_bindir}/winedump
466 %attr(755,root,root) %{_bindir}/wineg++
467 %attr(755,root,root) %{_bindir}/winegcc
468 %attr(755,root,root) %{_bindir}/winemaker
469 %attr(755,root,root) %{_bindir}/winecpp
470 %attr(755,root,root) %{_bindir}/wmc
471 %attr(755,root,root) %{_bindir}/wrc
472 %{_libdir}/wine/lib*.def
473 # no shared variants, so not separated
474 %{_libdir}/wine/lib*.def.a
475 %{_libdir}/wine/libadsiid.a
476 %{_libdir}/wine/libdx*.a
477 %{_libdir}/wine/libstrmiids.a
478 %{_libdir}/wine/libuuid.a
479 %{_libdir}/wine/libwinecrt0.a
480 %{_includedir}/wine
481 %{_mandir}/man1/widl.1*
482 %{_mandir}/man1/winedump.1*
483 %{_mandir}/man1/winegcc.1*
484 %{_mandir}/man1/wineg++.1*
485 %{_mandir}/man1/winemaker.1*
486 %{_mandir}/man1/winebuild.1*
487 %{_mandir}/man1/wmc.1*
488 %{_mandir}/man1/wrc.1*
489 %{_aclocaldir}/*.m4
490
491 %files dll-d3d
492 %defattr(644,root,root,755)
493 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
494 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
495 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
496
497 %files dll-gl
498 %defattr(644,root,root,755)
499 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
500 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
501
502 %if %{with sane}
503 %files dll-twain
504 %defattr(644,root,root,755)
505 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
506 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
507 %endif
508
509 %if %{with alsa}
510 %files drv-alsa
511 %defattr(644,root,root,755)
512 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
513 %endif
514
515 %if %{with jack}
516 %files drv-jack
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
519 %endif
520
521 %if %{with nas}
522 %files drv-nas
523 %defattr(644,root,root,755)
524 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
525 %endif
526
527 # additional dependencies in *.so not separated (yet?) from main package
528 #   ddraw.dll.so,x11drv.dll.so depend on X11 libs
529 #   ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
530 #   ttydrv.dll.so depends on ncurses
This page took 1.836993 seconds and 4 git commands to generate.