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