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