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