]> git.pld-linux.org Git - packages/wine.git/blob - wine.spec
- release 2
[packages/wine.git] / wine.spec
1 #
2 # Conditional build:
3 %bcond_without  alsa            # don't build ALSA mm driver
4 %bcond_without  arts            # don't build aRts mm driver
5 %bcond_without  jack            # don't build JACK mm driver
6 %bcond_without  nas             # don't build NAS mm driver
7 %bcond_without  sane            # don't build TWAIN DLL with scanning support (through SANE)
8 %bcond_without  cups            # without CUPS printing support in winspool,wineps DLLs
9 #
10 # NOTE: wine detects the following SONAMES for dlopen at build time:
11 #   libcrypto,libssl (wininet.dll)
12 #   libcups (winspool.dll.so,wineps.dll.so)
13 #   libcurses/libncurses (wineconsole program)
14 #   libfontconfig (gdi32.dll.so)
15 #   libfreetype (wineps.dll.so,gdi32.dll.so)
16 #   libGL (x11drv.dll.so,ddraw.dll.so)
17 #   libjack (winejack.drv.so - explicit dependency in subpackage)
18 #   libX11, libXext, libXi, libXrender (x11drv.dll.so)
19 # thus requires rebuild after change of any of the above.
20 #
21 # JACK requires ALSA
22 %if %{without alsa}
23 %undefine       with_jack
24 %endif
25 Summary:        Program that lets you launch Win applications
26 Summary(es):    Ejecuta programas Windows en Linux
27 Summary(pl):    Program pozwalaj±cy uruchamiaæ aplikacje Windows
28 Summary(pt_BR): Executa programas Windows no Linux
29 Name:           wine
30 Version:        0.9.18
31 Release:        2
32 Epoch:          1
33 License:        LGPL
34 Group:          Applications/Emulators
35 Source0:        http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
36 # Source0-md5:  165e297315e236e9fd1351cdb90e01c6
37 Patch0:         %{name}-fontcache.patch
38 Patch1:         %{name}-makedep.patch
39 Patch2:         %{name}-alsa.patch
40 Patch3:         %{name}-ncurses.patch
41 #PatchX:                %{name}-dga.patch
42 URL:            http://www.winehq.org/
43 BuildRequires:  OpenGL-GLU-devel
44 BuildRequires:  OpenGL-glut-devel
45 %{?with_alsa:BuildRequires:     alsa-lib-devel}
46 %{?with_arts:BuildRequires:     artsc-devel}
47 BuildRequires:  autoconf
48 BuildRequires:  automake
49 BuildRequires:  bison
50 # BuildRequires:        chpax >= 0.20020901-2
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:  xorg-lib-libXi-devel
70 BuildRequires:  xorg-lib-libXmu-devel
71 BuildRequires:  xorg-lib-libXrender-devel
72 BuildRequires:  xorg-lib-libXxf86dga-devel
73 BuildRequires:  xorg-lib-libXxf86vm-devel
74 Requires:       binfmt-detector
75 # link to wine/ntdll.dll.so, without any SONAME
76 Provides:       libntdll.dll.so
77 ExclusiveArch:  %{ix86}
78 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79
80 %define         _noautoreqdep           libGL.so.1 libGLU.so.1
81 %define         no_install_post_strip   1
82
83 %define         _winedir                %{_datadir}/%{name}
84
85 %define         getsoname()     %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
86
87 %description
88 Wine is a program which allows running Microsoft Windows programs
89 (including DOS, Windows 3.x and Win32 executables) on Unix. It
90 consists of a program loader which loads and executes a Microsoft
91 Windows binary, and a library that implements Windows API calls using
92 their Unix or X11 equivalents. The library may also be used for
93 porting Win32 code into native Unix executables.
94
95 %description -l es
96 Ejecuta programas Windows en Linux.
97
98 %description -l pl
99 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
100 dla Microsoft Windows pod systemami uniksowymi. Sk³ada siê on z
101 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
102 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
103 przy u¿yciu odpowiedników uniksowych oraz z X11. Biblioteka mo¿e byæ
104 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
105
106 %description -l pt_BR
107 O Wine é um programa que permite rodar programas MS-Windows no X11.
108 Ele consiste de um carregador de programa, que carrega e executa um
109 binário MS-Windows, e de uma biblioteca de emulação que traduz as
110 chamadas da API para as equivalentes Unix/X11.
111
112 %package devel
113 Summary:        Wine - header files
114 Summary(es):    Biblioteca de desarrollo de wine
115 Summary(pl):    Wine - pliki nag³owkowe
116 Summary(pt_BR): Biblioteca de desenvolvimento do wine
117 Group:          Development/Libraries
118 Requires:       %{name} = %{epoch}:%{version}-%{release}
119
120 %description devel
121 Wine - header files.
122
123 %description devel -l es
124 Biblioteca de desarrollo de wine.
125
126 %description devel -l pl
127 Wine - pliki nag³ówkowe.
128
129 %description devel -l pt_BR
130 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
131 WINE.
132
133 %package programs
134 Summary:        Wine - programs
135 Summary(pl):    Wine - programy
136 Group:          Applications
137 Requires:       %{name} = %{epoch}:%{version}-%{release}
138
139 %description programs
140 Wine - programs.
141
142 %description programs -l pl
143 Wine - programy.
144
145 %package dll-d3d
146 Summary:        Direct3D implementation DLLs for Wine
147 Summary(pl):    Biblioteki DLL z implementacj± Direct3D dla Wine
148 Group:          Applications/Emulators
149 Requires:       %{name} = %{epoch}:%{version}-%{release}
150 Requires:       OpenGL
151
152 %description dll-d3d
153 Direct3D implementation DLLs for Wine (through OpenGL).
154
155 %description dll-d3d -l pl
156 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
157
158 %package dll-gl
159 Summary:        OpenGL implementation DLLs for Wine
160 Summary(pl):    Biblioteki DLL z implementacj± OpenGL dla Wine
161 Group:          Applications/Emulators
162 Requires:       %{name} = %{epoch}:%{version}-%{release}
163 Requires:       OpenGL
164
165 %description dll-gl
166 OpenGL implementation DLLs for Wine.
167
168 %description dll-gl -l pl
169 Biblioteki DLL z implementacj± OpenGL dla Wine.
170
171 %package dll-twain
172 Summary:        TWAIN implementation DLL for Wine
173 Summary(pl):    Biblioteka DLL z implementacj± TWAIN dla Wine
174 Group:          Applications/Emulators
175 Requires:       %{name} = %{epoch}:%{version}-%{release}
176
177 %description dll-twain
178 TWAIN implementation DLL for Wine (through SANE).
179
180 %description dll-twain -l pl
181 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
182
183 %package drv-alsa
184 Summary:        ALSA driver for WINE mm.dll implementation
185 Summary(pl):    Sterownik ALSA dla implementacji mm.dll w Wine
186 Group:          Applications/Emulators
187 Requires:       %{name} = %{epoch}:%{version}-%{release}
188
189 %description drv-alsa
190 ALSA driver for WINE mm.dll (multimedia system) implementation.
191
192 %description drv-alsa -l pl
193 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
194
195 %package drv-arts
196 Summary:        aRts driver for WINE mm.dll implementation
197 Summary(pl):    Sterownik aRts dla implementacji mm.dll w Wine
198 Group:          Applications/Emulators
199 Requires:       %{name} = %{epoch}:%{version}-%{release}
200
201 %description drv-arts
202 aRts driver for WINE mm.dll (multimedia system) implementation.
203
204 %description drv-arts -l pl
205 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
206
207 %package drv-jack
208 Summary:        JACK driver for WINE mm.dll implementation
209 Summary(pl):    Sterownik JACK-a dla implementacji mm.dll w Wine
210 Group:          Applications/Emulators
211 Requires:       %{name} = %{epoch}:%{version}-%{release}
212 Requires:       jack-audio-connection-kit
213 # dlopened by SONAME detected at build time
214 %{?with_jack:Requires:  %{getsoname /usr/%{_lib}/libjack.so}}
215
216 %description drv-jack
217 JACK driver for WINE mm.dll (multimedia system) implementation.
218
219 %description drv-jack -l pl
220 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
221 Wine.
222
223 %package drv-nas
224 Summary:        NAS driver for WINE mm.dll implementation
225 Summary(pl):    Sterownik NAS dla implementacji mm.dll w Wine
226 Group:          Applications/Emulators
227 Requires:       %{name} = %{epoch}:%{version}-%{release}
228
229 %description drv-nas
230 NAS driver for WINE mm.dll (multimedia system) implementation.
231
232 %description drv-nas -l pl
233 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
234
235 %prep
236 %setup -q
237 %patch0 -p1
238 %patch1 -p1
239 %patch2 -p1
240 %patch3 -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 wcmd"
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|glut32.dll.so|opengl32.dll.so|sane.ds.so|twain.dll.so|twain_32.dll.so|winealsa.drv.so|winearts.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 if [ -f /var/lock/subsys/wine ]; then
344         rm -f /var/lock/subsys/wine
345 fi
346 if [ -x /sbin/chkconfig ]; then
347         /sbin/chkconfig --del wine
348 fi
349
350 %files -f files.so
351 %defattr(644,root,root,755)
352 %doc README DEVELOPERS-HINTS ChangeLog AUTHORS ANNOUNCE
353 %lang(de) %doc documentation/README.de
354 %lang(es) %doc documentation/README.es
355 %lang(fr) %doc documentation/README.fr
356 %lang(it) %doc documentation/README.it
357 %lang(ko) %doc documentation/README.ko
358 %lang(nb) %doc documentation/README.no
359 %lang(pt) %doc documentation/README.pt
360 %lang(pt_BR) %doc documentation/README.pt_br
361 %attr(755,root,root) %{_bindir}/msiexec
362 %attr(755,root,root) %{_bindir}/wine
363 %attr(755,root,root) %{_bindir}/wineboot
364 %attr(755,root,root) %{_bindir}/winebrowser
365 %attr(755,root,root) %{_bindir}/winecfg
366 %attr(755,root,root) %{_bindir}/winedbg
367 %attr(755,root,root) %{_bindir}/wine-kthread
368 %attr(755,root,root) %{_bindir}/winelauncher
369 %attr(755,root,root) %{_bindir}/wineprefixcreate
370 %attr(755,root,root) %{_bindir}/wine-preloader
371 %attr(755,root,root) %{_bindir}/wine-pthread
372 %attr(755,root,root) %{_bindir}/wineserver
373 %attr(755,root,root) %{_bindir}/wineshelllink
374 %attr(755,root,root) %{_libdir}/*.so*
375 %dir %{_libdir}/wine
376 %{_libdir}/wine/*.dll16
377 %{_libdir}/wine/*.drv16
378 %{_libdir}/wine/*.exe16
379 %{_mandir}/man1/wine.*
380 %{_mandir}/man1/winedbg.1*
381 %{_mandir}/man1/wineserver.*
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}/winewrap
399 %attr(755,root,root) %{_bindir}/wmc
400 %attr(755,root,root) %{_bindir}/wrc
401 %{_libdir}/wine/lib*.def
402 # no shared variants, so not separated
403 %{_libdir}/wine/lib*.def.a
404 %{_libdir}/wine/libdx*.a
405 %{_libdir}/wine/libstrmiids.a
406 %{_libdir}/wine/libuuid.a
407 %{_libdir}/wine/libwinecrt0.a
408 %{_includedir}/wine
409 %{_mandir}/man1/widl.1*
410 %{_mandir}/man1/winedump.1*
411 %{_mandir}/man1/winegcc.1*
412 %{_mandir}/man1/winemaker.1*
413 %{_mandir}/man1/winebuild.1*
414 %{_mandir}/man1/wmc.1*
415 %{_mandir}/man1/wrc.1*
416 %{_aclocaldir}/*.m4
417
418 %files dll-d3d
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
421 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
422 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
423 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
424
425 %files dll-gl
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
428 %attr(755,root,root) %{_libdir}/wine/glut32.dll.so
429 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
430
431 %if %{with sane}
432 %files dll-twain
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
435 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
436 %endif
437
438 %if %{with alsa}
439 %files drv-alsa
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
442 %endif
443
444 %if %{with arts}
445 %files drv-arts
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
448 %endif
449
450 %if %{with jack}
451 %files drv-jack
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
454 %endif
455
456 %if %{with nas}
457 %files drv-nas
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
460 %endif
461
462 # additional dependencies in *.so not separated (yet?) from main package
463 #   ddraw.dll.so,x11drv.dll.so depend on X11 libs
464 #   ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
465 #   ttydrv.dll.so depends on ncurses
This page took 0.111786 seconds and 4 git commands to generate.