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