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