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