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