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