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