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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30