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