/[packages]/cauldron/wine/current/SPECS/wine.spec
ViewVC logotype

Annotation of /cauldron/wine/current/SPECS/wine.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30