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