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