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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30