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