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