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