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