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