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