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