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