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