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