/[packages]/cauldron/wine/releases/1:1.5.13/1.mga3/SPECS/wine.spec
ViewVC logotype

Contents of /cauldron/wine/releases/1:1.5.13/1.mga3/SPECS/wine.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 37896 - (show annotations) (download)
Mon Jan 24 19:19:27 2011 UTC (13 years, 2 months ago) by ahmad
Original Path: cauldron/wine/current/SPECS/wine.spec
File size: 14774 byte(s)
- update the winepulse patches
- rename wine-mdkconf to wine-mgaconf and regenerate it
- drop an old conflicts

1 %ifarch x86_64
2 %define wine wine64
3 %define mark64 ()(64bit)
4 %else
5 %define wine wine
6 %define mark64 %{nil}
7 %endif
8 %define lib_name_orig lib%{name}
9 %define lib_major 1
10 %define lib_name %mklibname %{name} %{lib_major}
11 %define lib_name_devel %{mklibname -d wine}
12
13 # On 32-bit we have
14 # wine32 - those 32-bit binaries that are also used on 64-bit for 32-bit support
15 # wine - all other files (requires 'wine32')
16 # On 64-bit we have
17 # wine64 - all 64-bit files (suggests 'wine32')
18 # - Anssi 07/2010
19
20 Name: wine
21 Version: 1.3.12
22 %define pre 0
23 %define rel 1
24 %if %pre
25 Release: %mkrel 0.%pre.%rel
26 %define o_ver %version-%pre
27 %else
28 Release: %mkrel %rel
29 %define o_ver %version
30 %endif
31 Epoch: 1
32 Summary: WINE Is Not An Emulator - runs MS Windows programs
33 License: LGPLv2+
34 Group: Emulators
35 URL: http://www.winehq.com/
36 BuildRoot: %_tmppath/%{name}-%{version}-%{release}-buildroot
37 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{o_ver}.tar.bz2
38 Source1: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{o_ver}.tar.bz2.sign
39
40 # RH stuff
41 Source2: wine.init
42 Patch0: wine-1.0-rc3-fix-conflicts-with-openssl.patch
43 Patch1: wine-1.1.7-chinese-font-substitutes.patch
44 # (Anssi 05/2008) Adds:
45 # a: => /media/floppy (/mnt/floppy on 2007.1 and older)
46 # d: => $HOME (at config_dir creation time, not refreshed if $HOME changes;
47 # note that Wine also provides $HOME in My Documents)
48 # com4 => /dev/ttyUSB0 (replaces /dev/ttyS3)
49 Patch108: wine-mgaconf.patch
50
51 #(eandry) add a pulseaudio sound driver (from http://art.ified.ca/downloads/ )
52 Patch400: http://art.ified.ca/downloads/winepulse/winepulse-configure.ac-1.3.10.patch
53 Patch401: http://art.ified.ca/downloads/winepulse/winepulse-0.39.patch
54 Patch402: http://art.ified.ca/downloads/winepulse/winepulse-winecfg-1.3.11.patch
55
56 # (anssi) Wine needs GCC 4.4+ on x86_64 for MS ABI support. Note also that
57 # 64-bit wine cannot run 32-bit programs, so it should be named differently
58 # to allow co-installation. Upstream has not yet implemented this
59 # co-habitation, so one would need to resolve conflicts manually.
60 %ifarch x86_64
61 BuildRequires: gcc >= 4.4
62 %endif
63 BuildRequires: bison flex gpm-devel perl-devel ncurses-devel sgml-tools
64 BuildRequires: libx11-devel libxrender-devel libxext-devel libsm-devel
65 BuildRequires: freetype2-devel autoconf docbook-utils docbook-dtd-sgml
66 BuildRequires: cups-devel jackit-devel imagemagick isdn4k-utils-devel xpm-devel
67 BuildRequires: sane-devel glibc-static-devel ungif-devel chrpath
68 BuildRequires: desktop-file-utils libalsa-devel openldap-devel lcms-devel
69 BuildRequires: libxslt-devel dbus-devel hal-devel
70 BuildRequires: valgrind librsvg pulseaudio-devel
71 BuildRequires: gsm-devel
72 BuildRequires: mesaglu-devel
73 BuildRequires: fontforge
74 BuildRequires: gphoto2-devel
75 BuildRequires: unixODBC-devel
76 BuildRequires: libmpg123-devel
77 BuildRequires: openal-devel
78 BuildRequires: gnutls-devel tiff-devel libv4l-devel
79 BuildRequires: gstreamer0.10-devel libgstreamer0.10-plugins-base-devel
80 BuildRequires: prelink
81
82 %define desc Wine is a program which allows running Microsoft Windows programs \
83 (including DOS, Windows 3.x and Win32 executables) on Unix. It \
84 consists of a program loader which loads and executes a Microsoft \
85 Windows binary, and a library (called Winelib) that implements Windows \
86 API calls using their Unix or X11 equivalents. The library may also \
87 be used for porting Win32 code into native Unix executables.
88
89 %ifarch x86_64
90 %package -n %{wine}
91 Summary: WINE Is Not An Emulator - runs MS Windows programs
92 Group: Emulators
93 Suggests: wine32 = %{epoch}:%{version}-%{release}
94 %else
95 # on 32-bit we always want wine32 package
96 Requires: wine32 = %{epoch}:%{version}-%{release}
97 %endif
98
99 Provides: %{wine}-utils = %{epoch}:%{version}-%{release} %{wine}-full = %{epoch}:%{version}-%{release}
100 Provides: %{lib_name}-capi = %{epoch}:%{version}-%{release} %{lib_name}-twain = %{epoch}:%{version}-%{release}
101 Provides: %{lib_name} = %{epoch}:%{version}-%{release}
102 Provides: wine-bin = %{epoch}:%{version}-%{release}
103 Obsoletes: %{wine}-utils %{wine}-full %{lib_name}-capi %{lib_name}-twain
104 Obsoletes: %{lib_name} <= %{epoch}:%{version}-%{release}
105 Requires: xmessage
106 Suggests: sane-frontends
107 # wine dlopen's these, so let's add the dependencies ourself
108 Requires: libfreetype.so.6%{mark64} libasound.so.2%{mark64}
109 Requires: libXrender.so.1%{mark64} libpng.so.3%{mark64}
110 Requires(post): desktop-file-utils
111 Requires(postun): desktop-file-utils
112 Requires(post): desktop-common-data
113 Requires(postun): desktop-common-data
114 Requires(preun): rpm-helper
115 Requires(post): rpm-helper
116 %ifarch %{ix86}
117 Conflicts: wine64
118 %else
119 Conflicts: wine
120 %endif
121
122 %description
123 %desc
124
125 %ifarch x86_64
126 %description -n %{wine}
127 %desc
128
129 This package contains the Win64 version of Wine. You need the wine32
130 package from the 32-bit repository to be able to run 32-bit applications.
131 %endif
132
133 %ifarch %ix86
134 %package -n wine32
135 Summary: 32-bit support for Wine
136 Group: Emulators
137 # This is not an EVR-specific requirement, as otherwise on x86_64 urpmi could
138 # resolve the dependency to wine64 even on upgrades, and therefore replace
139 # wine+wine32 installation with a wine32+wine64 installation. - Anssi
140 Requires: wine-bin
141 Conflicts: wine < 1:1.2-0.rc7.1
142 Conflicts: wine64 < 1:1.2-0.rc7.1
143 # (Anssi) If wine-gecko is not installed, wine pops up a dialog on first
144 # start proposing to download wine-gecko from sourceforge, while recommending
145 # to use distribution packages instead. Therefore suggest wine-gecko here:
146 Suggests: wine-gecko
147
148 %description -n wine32
149 Wine is a program which allows running Microsoft Windows programs
150 (including DOS, Windows 3.x and Win32 executables) on Unix.
151
152 This package contains the files needed to support 32-bit Windows
153 programs.
154 %endif
155
156 %package -n %{wine}-devel
157 Summary: Static libraries and headers for %{name}
158 Group: Development/C
159 Requires: %{wine} = %{epoch}:%{version}
160 Provides: %{lib_name_devel} = %{epoch}:%{version}-%{release}
161 Provides: %{lib_name_orig}-devel = %{epoch}:%{version}-%{release}
162 Obsoletes: %{lib_name_devel} <= %{epoch}:%{version}-%{release}
163 Obsoletes: %{mklibname -d wine 1} < %{epoch}:%{version}
164 %ifarch %{ix86}
165 Conflicts: wine64-devel
166 %else
167 Conflicts: wine-devel
168 %endif
169
170 %description -n %{wine}-devel
171 Wine is a program which allows running Microsoft Windows programs
172 (including DOS, Windows 3.x and Win32 executables) on Unix.
173
174 %{wine}-devel contains the libraries and header files needed to
175 develop programs which make use of wine.
176
177 Wine is often updated.
178
179 %prep
180 %setup -q -n %name-%o_ver
181 %patch1 -p0 -b .chinese
182 %patch108 -p1 -b .conf
183 %patch400 -p1
184 %patch401 -p1
185 %patch402 -p1
186
187 %build
188 %ifarch %ix86
189 # (Anssi 04/2008) bug #39604
190 # Some protection systems complain "debugger detected" with our
191 # -fomit-frame-pointer flag, so disable it.
192 export CFLAGS="%{optflags} -fno-omit-frame-pointer"
193 %endif
194
195 # (Anssi 04/2008)
196 # If icotool is present, it is used to rebuild icon files. It is in contrib
197 # so we do not do that; this is here to ensure that installed icoutils does
198 # not change build behaviour.
199 export ICOTOOL=false
200
201 autoreconf
202 %configure2_5x --with-x \
203 --with-pulse \
204 --without-nas \
205 --without-esd \
206 %ifarch x86_64
207 --enable-win64
208 %endif
209
210 %make depend
211 %make
212
213 %install
214 rm -rf %{buildroot}
215 %makeinstall_std LDCONFIG=/bin/true
216
217 # Danny: dirty:
218 install -m755 tools/fnt2bdf -D %{buildroot}%{_bindir}/fnt2bdf
219
220 # Allow users to launch Windows programs by just clicking on the .exe file...
221 install -m755 %{SOURCE2} -D %{buildroot}%{_initrddir}/%{name}
222
223 mkdir -p %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
224 cat > %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged/mageia-%{name}.menu <<EOF
225 <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
226 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
227 <Menu>
228 <Name>Applications</Name>
229 <Menu>
230 <Name>Tools</Name>
231 <Menu>
232 <Name>Emulators</Name>
233 <Menu>
234 <Name>Wine</Name>
235 <Directory>mageia-%{name}.directory</Directory>
236 <Include>
237 <Category>X-MandrivaLinux-MoreApplications-Emulators-Wine</Category>
238 </Include>
239 </Menu>
240 </Menu>
241 </Menu>
242 </Menu>
243 EOF
244
245 mkdir -p %{buildroot}%{_datadir}/desktop-directories
246 cat > %{buildroot}%{_datadir}/desktop-directories/mageia-%{name}.directory <<EOF
247 [Desktop Entry]
248 Name=Wine
249 Icon=%{name}
250 Type=Directory
251 EOF
252
253 mkdir -p %{buildroot}%{_datadir}/applications/
254 for i in winecfg:Configurator \
255 notepad:Notepad \
256 winefile:File\ Manager \
257 regedit:Registry\ Editor \
258 winemine:Minesweeper \
259 wineboot:Reboot \
260 "wineconsole cmd":Command\ Line \
261 "wine uninstaller:Wine Software Uninstaller";
262 do cat > %{buildroot}%{_datadir}/applications/mageia-%{name}-`echo $i|cut -d: -f1`.desktop << EOF
263 [Desktop Entry]
264 Name=`echo $i|cut -d: -f2`
265 Comment=`echo $i|cut -d: -f2`
266 Exec=`echo $i|cut -d: -f1`
267 Icon=%{name}
268 Terminal=false
269 Type=Application
270 Categories=X-MandrivaLinux-MoreApplications-Emulators-Wine;
271 EOF
272 done
273
274 # Categories=Emulator does nothing and is added as a workaround to kde #27700
275 desktop-file-install --vendor="" \
276 --add-mime-type=application/x-zip-compressed \
277 --remove-mime-type=application/x-zip-compressed \
278 --add-category=Emulator \
279 --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/wine.desktop
280
281 %ifarch x86_64
282 # fix the binary name
283 sed -i 's,Exec=wine ,Exec=wine64 ,' %{buildroot}%{_datadir}/applications/wine.desktop
284 %endif
285
286 install -d %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}}
287
288 # winecfg icon
289 convert dlls/user32/resources/oic_winlogo.ico[8] %{buildroot}%{_miconsdir}/%{name}.png
290 convert dlls/user32/resources/oic_winlogo.ico[7] %{buildroot}%{_iconsdir}/%{name}.png
291 convert dlls/user32/resources/oic_winlogo.ico[6] %{buildroot}%{_liconsdir}/%{name}.png
292
293 # notepad icon
294 convert programs/notepad/notepad.ico[2] %{buildroot}%{_miconsdir}/notepad.png
295 convert programs/notepad/notepad.ico[7] %{buildroot}%{_iconsdir}/notepad.png
296 convert programs/notepad/notepad.ico[8] %{buildroot}%{_liconsdir}/notepad.png
297 # winefile icon
298 convert programs/winefile/winefile.ico[2] %{buildroot}%{_miconsdir}/winefile.png
299 convert programs/winefile/winefile.ico[8] %{buildroot}%{_iconsdir}/winefile.png
300 convert programs/winefile/winefile.ico[7] %{buildroot}%{_liconsdir}/winefile.png
301 # regedit icon
302 convert programs/regedit/regedit.ico[2] %{buildroot}%{_miconsdir}/regedit.png
303 convert programs/regedit/regedit.ico[8] %{buildroot}%{_iconsdir}/regedit.png
304 convert programs/regedit/regedit.ico[7] %{buildroot}%{_liconsdir}/regedit.png
305 # winemine icon
306 convert programs/winemine/winemine.ico[2] %{buildroot}%{_miconsdir}/winemine.png
307 convert programs/winemine/winemine.ico[8] %{buildroot}%{_iconsdir}/winemine.png
308 convert programs/winemine/winemine.ico[7] %{buildroot}%{_liconsdir}/winemine.png
309
310 # wine uninstaller icon:
311 convert programs/msiexec/msiexec.ico[2] %{buildroot}%{_miconsdir}/msiexec.png
312 convert programs/msiexec/msiexec.ico[8] %{buildroot}%{_iconsdir}/msiexec.png
313 convert programs/msiexec/msiexec.ico[7] %{buildroot}%{_liconsdir}/msiexec.png
314
315 # change the icons in the respective .desktop files, in order:
316 sed -i 's,Icon=%{name},Icon=notepad,' %{buildroot}%{_datadir}/applications/mageia-wine-notepad.desktop
317 sed -i 's,Icon=%{name},Icon=winefile,' %{buildroot}%{_datadir}/applications/mageia-wine-winefile.desktop
318 sed -i 's,Icon=%{name},Icon=regedit,' %{buildroot}%{_datadir}/applications/mageia-wine-regedit.desktop
319 sed -i 's,Icon=%{name},Icon=winemine,' %{buildroot}%{_datadir}/applications/mageia-wine-winemine.desktop
320 sed -i 's,Icon=%{name},Icon=msiexec,' "%{buildroot}%{_datadir}/applications/mageia-wine-wine uninstaller.desktop"
321
322 %ifarch x86_64
323 chrpath -d %{buildroot}%{_bindir}/{wine64,wineserver,wmc,wrc} %{buildroot}%{_libdir}/%{name}/*.so
324 %else
325 chrpath -d %{buildroot}%{_bindir}/{wine,wineserver,wmc,wrc} %{buildroot}%{_libdir}/%{name}/*.so
326 %endif
327
328 %ifarch x86_64
329 cat > README.install.urpmi <<EOF
330 This is the Win64 version of Wine. This version can only be used to run
331 64-bit Windows applications as is. For running 32-bit Windows applications,
332 you need to also install the 'wine32' package from the 32-bit repository.
333 EOF
334 %endif
335
336 %clean
337 rm -fr %{buildroot}
338
339 %preun -n %{wine}
340 %_preun_service %{name}
341
342 %post -n %{wine}
343 %_post_service %{name}
344
345 %files -n %{wine}
346 %defattr(-,root,root)
347 %doc ANNOUNCE AUTHORS README
348 %ifarch x86_64
349 %doc README.install.urpmi
350 %{_bindir}/wine64
351 %{_bindir}/wine64-preloader
352 %endif
353 %{_initrddir}/%{name}
354 %{_bindir}/winecfg
355 %{_bindir}/wineconsole*
356 %{_bindir}/wineserver
357 %{_bindir}/wineboot
358 %{_bindir}/function_grep.pl
359 #%{_bindir}/wineprefixcreate
360 %{_bindir}/msiexec
361 %{_bindir}/notepad
362 %{_bindir}/regedit
363 %{_bindir}/winemine
364 %{_bindir}/winepath
365 %{_bindir}/regsvr32
366 %{_bindir}/winefile
367 %{_mandir}/man1/wine.1*
368 %lang(de) %{_mandir}/de.UTF-8/man1/wine.1*
369 %lang(de) %{_mandir}/de.UTF-8/man1/winemaker.1*
370 %lang(de) %{_mandir}/de.UTF-8/man1/wineserver.1*
371 %lang(fr) %{_mandir}/fr.UTF-8/man1/*
372 %{_mandir}/man1/wineserver.1*
373 %{_mandir}/man1/msiexec.1*
374 %{_mandir}/man1/notepad.1*
375 %{_mandir}/man1/regedit.1*
376 %{_mandir}/man1/regsvr32.1*
377 %{_mandir}/man1/wineboot.1*
378 %{_mandir}/man1/winecfg.1*
379 %{_mandir}/man1/wineconsole.1*
380 %{_mandir}/man1/winecpp.1*
381 %{_mandir}/man1/winefile.1*
382 %{_mandir}/man1/winemine.1*
383 %{_mandir}/man1/winepath.1*
384 %dir %{_datadir}/%{name}
385 %{_datadir}/%{name}/generic.ppd
386 %{_datadir}/%{name}/%{name}.inf
387 %{_datadir}/%{name}/l_intl.nls
388 %{_datadir}/applications/*.desktop
389 %{_sysconfdir}/xdg/menus/applications-merged/mageia-%{name}.menu
390 %{_datadir}/desktop-directories/mageia-%{name}.directory
391 %dir %{_datadir}/wine/fonts
392 %{_datadir}/wine/fonts/*
393 %{_miconsdir}/*.png
394 %{_iconsdir}/*.png
395 %{_liconsdir}/*.png
396
397 %ifarch %{ix86}
398 %files -n wine32
399 %defattr(-,root,root)
400 %{_bindir}/wine
401 %{_bindir}/wine-preloader
402 %endif
403
404 %{_libdir}/libwine*.so.%{lib_major}*
405 %dir %{_libdir}/%{name}
406 %{_libdir}/%{name}/*.cpl.so
407 %{_libdir}/%{name}/*.drv.so
408 %{_libdir}/%{name}/*.dll.so
409 %{_libdir}/%{name}/*.exe.so
410 %{_libdir}/%{name}/*.acm.so
411 %{_libdir}/%{name}/*.ocx.so
412 %ifarch %{ix86}
413 %{_libdir}/%{name}/*.vxd.so
414 %{_libdir}/%{name}/*16.so
415 %endif
416 %{_libdir}/%{name}/*.tlb.so
417 %{_libdir}/%{name}/*.ds.so
418 %{_libdir}/%{name}/*.sys.so
419 %{_libdir}/%{name}/fakedlls
420
421 %files -n %{wine}-devel
422 %defattr(-,root,root)
423 %{_libdir}/%{name}/*.a
424 %{_libdir}/libwine*.so
425 %{_libdir}/%{name}/*.def
426 %{_includedir}/*
427 %{_bindir}/fnt2bdf
428 %{_bindir}/wmc
429 %{_bindir}/wrc
430 %{_bindir}/winebuild
431 %{_bindir}/winegcc
432 %{_bindir}/wineg++
433 %{_bindir}/winecpp
434 %{_bindir}/widl
435 %{_bindir}/winedbg
436 %{_bindir}/winemaker
437 %{_bindir}/winedump
438 %{_mandir}/man1/wmc.1*
439 %{_mandir}/man1/wrc.1*
440 %{_mandir}/man1/winebuild.1*
441 %{_mandir}/man1/winemaker.1*
442 %{_mandir}/man1/winedump.1*
443 %{_mandir}/man1/widl.1*
444 %{_mandir}/man1/winedbg.1*
445 %{_mandir}/man1/wineg++.1*
446 %{_mandir}/man1/winegcc.1*
447
448

  ViewVC Help
Powered by ViewVC 1.1.30