/[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 70892 - (show annotations) (download)
Sun Mar 13 22:55:25 2011 UTC (13 years, 1 month ago) by ahmad
Original Path: cauldron/wine/current/SPECS/wine.spec
File size: 14889 byte(s)
- add BR gettext-devel, this should fix the winecfg UI translations (mga#235)
- add more BR

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

  ViewVC Help
Powered by ViewVC 1.1.30