]> git.pld-linux.org Git - packages/wine.git/blob - wine.spec
- added cdrom-segv patch (avoid SEGV when scsi cdrom is present)
[packages/wine.git] / wine.spec
1 #
2 # Conditional build:
3 %bcond_without arts     # without arts support
4 %bcond_without cups     # without CUPS printing support
5 %bcond_without sane     # without TWAIN scanning support (through SANE)
6 %bcond_with    pdf_docs # build pdf docs (missing BR)
7 %bcond_with    html_docs # build html docs (jade fault ?)
8 #
9 # maybe TODO: alsa,jack,nas BRs/checks (see dlls/winmm/wine*)
10 Summary:        Program that lets you launch Win applications
11 Summary(es):    Ejecuta programas Windows en Linux
12 Summary(pl):    Program pozwalaj±cy uruchamiaæ aplikacje Windows
13 Summary(pt_BR): Executa programas Windows no Linux
14 Name:           wine
15 Version:        20030911
16 Release:        0.2
17 License:        GPL
18 Group:          Applications/Emulators
19 Source0:        http://dl.sf.net/wine/Wine-%{version}.tar.gz
20 # Source0-md5:  81521fe47d540427183e88d02d5c5f88
21 Source1:        %{name}.init
22 Source2:        %{name}.reg
23 Source3:        %{name}.systemreg
24 Source4:        %{name}.userreg
25 Patch0:         %{name}-fontcache.patch
26 Patch1:         %{name}-destdir.patch
27 Patch2:         %{name}-ncurses.patch
28 Patch3:         %{name}-ac-ksh.patch
29 Patch4:         %{name}-binutils.patch
30 Patch5:         %{name}-makedep.patch
31 Patch6:         %{name}-dga.patch
32 Patch7:         %{name}-winebuild.patch
33 Patch8:         %{name}-cdrom-segv.patch
34 URL:            http://www.winehq.com/
35 BuildRequires:  OpenGL-devel
36 BuildRequires:  XFree86-devel
37 %{?with_arts:BuildRequires:     arts-devel}
38 BuildRequires:  bison
39 BuildRequires:  chpax >= 0.20020901-2
40 %{?with_cups:BuildRequires:     cups-devel}
41 BuildRequires:  docbook-dtd31-sgml
42 BuildRequires:  docbook-utils
43 BuildRequires:  flex
44 BuildRequires:  freetype-devel >= 2.0.5
45 BuildRequires:  libjpeg-devel
46 BuildRequires:  ncurses-devel
47 %if %{with html_docs} || %{with pdf_docs}
48 BuildRequires:  openjade
49 %endif
50 %if %{with pdf_docs}
51 BuildRequires:  tetex-metafont
52 BuildRequires:  tetex-fonts-pazo
53 BuildRequires:  tetex-fonts-stmaryrd
54 BuildRequires:  tetex-fonts-type1-urw
55 %endif
56 %{?with_sane:BuildRequires:     sane-backends-devel}
57 Requires:       OpenGL
58 Requires(post): /sbin/ldconfig
59 Requires(post,preun):/sbin/chkconfig
60 # link to wine/ntdll.dll.so, without any SONAME
61 Provides:       libntdll.dll.so
62 ExclusiveArch:  %{ix86}
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 %define         _noautoreqdep           libGL.so.1 libGLU.so.1
66 %define         no_install_post_strip   1
67
68 %define         _winedir                %{_datadir}/%{name}
69
70 %description
71 Wine is a program which allows running Microsoft Windows programs
72 (including DOS, Windows 3.x and Win32 executables) on Unix. It
73 consists of a program loader which loads and executes a Microsoft
74 Windows binary, and a library that implements Windows API calls using
75 their Unix or X11 equivalents. The library may also be used for
76 porting Win32 code into native Unix executables.
77
78 %description -l es
79 Ejecuta programas Windows en Linux.
80
81 %description -l pl
82 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
83 dla Microsoft Windows pod systemami unixowymi. Sk³ada siê on z
84 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
85 Microsoft Windows oraz z biblioteki, która implementuje API Windows
86 przy u¿yciu odpowiedników Unixowych oraz z X11. Biblioteka mo¿e byæ
87 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Unixa.
88
89 %description -l pt_BR
90 O Wine é um programa que permite rodar programas MS-Windows no X11.
91 Ele consiste de um carregador de programa, que carrega e executa um
92 binário MS-Windows, e de uma biblioteca de emulação que traduz as
93 chamadas da API para as equivalentes Unix/X11.
94
95 %package devel
96 Summary:        Wine - header files
97 Summary(es):    Biblioteca de desarrollo de wine
98 Summary(pl):    Wine - pliki nag³owkowe
99 Summary(pt_BR): Biblioteca de desenvolvimento do wine
100 Group:          Development/Libraries
101 Requires:       %{name} = %{version}
102
103 %description devel
104 Wine - header files.
105
106 %description devel -l es
107 Biblioteca de desarrollo de wine.
108
109 %description devel -l pl
110 Wine - pliki nag³ówkowe.
111
112 %description devel -l pt_BR
113 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
114 WINE.
115
116 %package programs
117 Summary:        Wine - programs
118 Summary(pl):    Wine - programy
119 Group:          Applications
120 Requires:       %{name} = %{version}
121
122 %description programs
123 Wine - programs.
124
125 %description programs -l pl
126 Wine - programy.
127
128 %package doc-pdf
129 Summary:        Wine documentation in PDF
130 Summary(pl):    Dokumentacja Wine w formacie PDF
131 Group:          Documentation
132
133 %description doc-pdf
134 Wine documentation in PDF format.
135
136 %description doc-pdf -l pl
137 Dokumentacja Wine w formacie PDF.
138
139 %prep
140 %setup -q
141 %patch0 -p1
142 %patch1 -p1
143 %patch2 -p1
144 %patch3 -p1
145 %patch4 -p0
146 %patch5 -p1
147 %patch6 -p1
148 %patch7 -p1
149 %patch8 -p1
150
151 # turn off compilation of some tools
152 #sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
153 sed -e "s|avitools||" programs/Makefile.in > .tmp
154 mv -f .tmp programs/Makefile.in
155
156 %build
157 %{__aclocal}
158 %{__autoconf}
159 CPPFLAGS="-I/usr/include/ncurses"; export CPPFLAGS
160 CFLAGS="%{rpmcflags} $CPPFLAGS"
161 %configure \
162         %{!?debug:--disable-debug} \
163         %{!?debug:--disable-trace} \
164         --enable-curses \
165         --enable-opengl \
166         --with-x
167 %{__make} depend
168 %{__make}
169 %{__make} -C programs
170 %{__make} -C programs/regapi
171
172 cd documentation
173 %if %{with html_docs}
174 db2html wine-user.sgml
175 db2html wine-devel.sgml
176 db2html wine-faq.sgml
177 db2html winelib-user.sgml
178 %endif
179
180 %if %{with pdf_docs}
181 db2pdf  wine-user.sgml
182 db2pdf  wine-devel.sgml
183 db2pdf  wine-faq.sgml
184 db2pdf  winelib-user.sgml
185 %endif
186 cd -
187
188 %install
189 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
191
192 %{__make} install DESTDIR=$RPM_BUILD_ROOT
193 %{__make} -C programs install DESTDIR=$RPM_BUILD_ROOT
194
195 install programs/winhelp/hlp2sgml       $RPM_BUILD_ROOT%{_bindir}
196 install tools/fnt2bdf                   $RPM_BUILD_ROOT%{_bindir}
197
198 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
199 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
200
201 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
202         $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
203         "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
204         $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
205         $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
206         $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
207
208 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
209 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
210 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
211 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
212
213 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
214 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
215 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
216
217 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
218 [mci]
219 cdaudio=mcicda.drv
220 sequencer=mciseq.drv
221 waveaudio=mciwave.drv
222 avivideo=mciavi.drv
223 videodisc=mcipionr.drv
224 vcr=mciviscd.drv
225 MPEGVideo=mciqtz.drv
226 EOF
227
228 %if %{?debug:0}%{!?debug:1}
229 echo "Strip executable binaries and shared object files."
230 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
231 elfexelist=`echo $filelist | xargs -r file | \
232         awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
233 elfsharedlist=`echo $filelist | xargs -r file | \
234         awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
235 if [ -n "$elfexelist" ]; then \
236         strip -R .note -R .comment $elfexelist
237 fi
238 if [ -n "$elfsharedlist" ]; then
239         strip --strip-unneeded -R .note  -R .comment $elfsharedlist
240 fi
241 %endif
242
243 /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
244
245 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
246
247 BZZZ=`pwd`
248 rm -f files.so;         touch files.so
249 rm -f files.programs;   touch files.programs
250 cd $RPM_BUILD_ROOT%{_libdir}/wine
251 for f in *.so; do
252         echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
253 done
254 cd -
255 for p in $programs; do
256         echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
257         echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
258         grep -v "$p\.exe\.so$" files.so > files.so.
259         mv -f files.so. files.so
260 done
261
262 %clean
263 rm -rf $RPM_BUILD_ROOT
264
265 %post
266 /sbin/ldconfig
267 /sbin/chkconfig --add wine
268 if [ ! -f /var/lock/subsys/wine ]; then
269         echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
270 fi
271
272 %preun
273 if [ "$1" = "0" ]; then
274         if [ -f /var/lock/subsys/wine ]; then
275                 /etc/rc.d/init.d/wine stop >&2
276         fi
277         /sbin/chkconfig --del wine
278 fi
279
280 %postun -p /sbin/ldconfig
281
282 %files -f files.so
283 %defattr(644,root,root,755)
284 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
285 %doc documentation/{samples,status}
286 %if %{with html_docs}
287 %doc documentation/wine-{faq,user}
288 %endif
289 %attr(755,root,root) %{_bindir}/wine
290 %attr(755,root,root) %{_bindir}/wineboot
291 %attr(755,root,root) %{_bindir}/winecfg
292 %attr(755,root,root) %{_bindir}/wineclipsrv
293 %attr(755,root,root) %{_bindir}/winedbg
294 %attr(755,root,root) %{_bindir}/winelauncher
295 %attr(755,root,root) %{_bindir}/wineserver
296 %attr(755,root,root) %{_bindir}/wineshelllink
297 %attr(755,root,root) %{_libdir}/*.so*
298 %dir %{_libdir}/wine
299 %{_mandir}/man1/wine.*
300 %{_mandir}/man5/wine.conf.*
301 %config(noreplace) %{_sysconfdir}/wine.reg
302 %config(missingok) %{_sysconfdir}/wine.systemreg
303 %config(missingok) %{_sysconfdir}/wine.userreg
304 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
305 %{_winedir}
306
307 %files programs -f files.programs
308 %defattr(644,root,root,755)
309
310 %files devel
311 %defattr(644,root,root,755)
312 %if %{with html_docs}
313 %doc documentation/{wine-devel,winelib-user,HOWTO-winelib}
314 %endif
315 %attr(755,root,root) %{_bindir}/fnt2bdf
316 %attr(755,root,root) %{_bindir}/function_grep.pl
317 %attr(755,root,root) %{_bindir}/hlp2sgml
318 %attr(755,root,root) %{_bindir}/widl
319 %attr(755,root,root) %{_bindir}/winebuild
320 %attr(755,root,root) %{_bindir}/winedump
321 %attr(755,root,root) %{_bindir}/wineg++
322 %attr(755,root,root) %{_bindir}/winegcc
323 %attr(755,root,root) %{_bindir}/winemaker
324 %attr(755,root,root) %{_bindir}/winewrap
325 %attr(755,root,root) %{_bindir}/wmc
326 %attr(755,root,root) %{_bindir}/wrc
327 %{_includedir}/wine
328 %{_libdir}/*.a
329 %{_mandir}/man1/winemaker.*
330 %{_mandir}/man1/winebuild.*
331 %{_mandir}/man1/wmc.*
332 %{_mandir}/man1/wrc.*
333 %{_aclocaldir}/*.m4
334
335 %if %{with pdf_docs}
336 %files doc-pdf
337 %defattr(644,root,root,755)
338 %doc documentation/*.pdf
339 %endif
This page took 0.059829 seconds and 4 git commands to generate.