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