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

  ViewVC Help
Powered by ViewVC 1.1.30