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