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