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