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