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