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