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