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