/[packages]/updates/6/wine/current/SPECS/wine.spec
ViewVC logotype

Contents of /updates/6/wine/current/SPECS/wine.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1189845 - (show annotations) (download)
Tue Jan 2 22:04:52 2018 UTC (6 years, 3 months ago) by akien
File size: 15581 byte(s)
Version 2.0.4
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 wine -d
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 %define mainver 2.0
21 %define bugfix 4
22
23 # When altering these, make sure corresponding wine-gecko/wine-mono is
24 # submitted, or notify their maintainer about the new version:
25 # Dependencies hardcoded in dlls/appwiz.cpl/addons.c
26 %define gecko_version 2.47
27 %define mono_version 4.6.4
28
29 # disable fortify as it breaks wine
30 # http://bugs.winehq.org/show_bug.cgi?id=24606#c22
31 # http://bugs.winehq.org/show_bug.cgi?id=25073
32 %define _fortify_cflags %{nil}
33
34 # Build with staging during our development cycles, stick to stable for Mageia stable releases
35 %define staging 0
36
37 Name: wine
38 Epoch: 1
39 Version: %{mainver}%{?bugfix:.%{bugfix}}
40 Release: %mkrel 1
41 Summary: WINE Is Not An Emulator - runs MS Windows programs
42 License: LGPLv2+
43 Group: Emulators
44 URL: http://www.winehq.com/
45 Source0: https://dl.winehq.org/wine/source/%{mainver}/%{name}-%{version}.tar.xz
46 Source1: https://dl.winehq.org/wine/source/%{mainver}/%{name}-%{version}.tar.xz.sign
47 Source2: %{name}.init
48 Source3: %{name}-icons_256.tar.xz
49
50 %if 0%{?staging}
51 Source900: https://github.com/wine-compholio/wine-staging/archive/v%{mainver}/wine-staging-%{mainver}.tar.gz
52 %endif
53
54 # (Anssi 05/2008) Adds:
55 # a: => /media/floppy (/mnt/floppy on 2007.1 and older)
56 # d: => $HOME (at config_dir creation time, not refreshed if $HOME changes;
57 # note that Wine also provides $HOME in My Documents)
58 # com4 => /dev/ttyUSB0 (replaces /dev/ttyS3)
59 Patch108: %{name}-mgaconf.patch
60
61 BuildRequires: autoconf
62 BuildRequires: bison
63 BuildRequires: chrpath
64 BuildRequires: cups-devel
65 BuildRequires: dbus-devel
66 BuildRequires: desktop-file-utils
67 BuildRequires: docbook-dtd-sgml
68 BuildRequires: docbook-utils
69 BuildRequires: flex
70 BuildRequires: fontconfig-devel
71 BuildRequires: fontforge
72 BuildRequires: freetype2-devel
73 BuildRequires: gettext-devel
74 BuildRequires: glibc-static-devel
75 BuildRequires: gnutls-devel
76 BuildRequires: gphoto2-devel
77 BuildRequires: gpm-devel
78 BuildRequires: gsm-devel
79 BuildRequires: gstreamer1.0-devel
80 BuildRequires: gtk3-devel
81 BuildRequires: icoutils
82 BuildRequires: imagemagick
83 BuildRequires: isdn4k-utils-devel
84 BuildRequires: lcms2-devel
85 BuildRequires: libalsa-devel
86 BuildRequires: libgstreamer1.0-plugins-base-devel
87 BuildRequires: libmpg123-devel
88 BuildRequires: libpcap-devel
89 BuildRequires: librsvg
90 BuildRequires: libsm-devel
91 BuildRequires: libv4l-devel
92 BuildRequires: libva-devel
93 BuildRequires: libx11-devel
94 BuildRequires: libxcomposite-devel
95 BuildRequires: libxcursor-devel
96 BuildRequires: libxext-devel
97 BuildRequires: libxi-devel
98 BuildRequires: libxinerama-devel
99 BuildRequires: libxrandr-devel
100 BuildRequires: libxrender-devel
101 BuildRequires: libxslt-devel
102 BuildRequires: mesaglu-devel
103 BuildRequires: ncurses-devel
104 BuildRequires: openal-devel
105 BuildRequires: opencl-devel
106 BuildRequires: openldap-devel
107 BuildRequires: osmesa-devel
108 BuildRequires: perl-devel
109 BuildRequires: png-devel
110 BuildRequires: prelink
111 BuildRequires: pulseaudio-devel
112 BuildRequires: sane-devel
113 BuildRequires: sgml-tools
114 BuildRequires: tiff-devel
115 BuildRequires: ungif-devel
116 BuildRequires: unixODBC-devel
117 BuildRequires: valgrind-devel
118 BuildRequires: xpm-devel
119
120 %define desc Wine is a program which allows running Microsoft Windows programs \
121 (including DOS, Windows 3.x and Win32 executables) on Unix. It \
122 consists of a program loader which loads and executes a Microsoft \
123 Windows binary, and a library (called Winelib) that implements Windows \
124 API calls using their Unix or X11 equivalents. The library may also \
125 be used for porting Win32 code into native Unix executables.
126
127 %ifarch x86_64
128 %package -n %{wine}
129 Summary: WINE Is Not An Emulator - runs MS Windows programs
130 Group: Emulators
131 Recommends: %{name}32 = %{epoch}:%{version}-%{release}
132 Recommends: %{name}64-gecko = %gecko_version
133 %else
134 # on 32-bit we always want wine32 package
135 Requires: %{name}32 = %{epoch}:%{version}-%{release}
136 %endif
137
138 Provides: %{wine}-utils = %{epoch}:%{version}-%{release} %{wine}-full = %{epoch}:%{version}-%{release}
139 Provides: %{lib_name}-capi = %{epoch}:%{version}-%{release} %{lib_name}-twain = %{epoch}:%{version}-%{release}
140 Provides: %{lib_name} = %{epoch}:%{version}-%{release}
141 Provides: wine-bin = %{epoch}:%{version}-%{release}
142 Obsoletes: %{wine}-utils %{wine}-full %{lib_name}-capi %{lib_name}-twain
143 Obsoletes: %{lib_name} <= %{epoch}:%{version}-%{release}
144 Recommends: sane-frontends
145 %define dlopenreq() %(F=%{_libdir}/lib%{1}.so;[ -e $F ] && (file $F|grep -q ASCII && grep -o 'lib[^ ]*' $F|sed -e "s/\$/%{mark64}/"||objdump -p $F | grep SONAME | awk '{ print $2 "%{mark64}" }') || echo "wine-missing-buildrequires-on-%{1}")
146 # wine dlopen's these, so let's add the dependencies ourself
147 # Adding these here is especially important with wine, since wine32 is
148 # commonly one of the few 32-bit components on a 64-bit installation, so
149 # these packages might not necessarily be pulled by anything else.
150 # grep WINE_CHECK_SONAME configure.ac :) (though note that some of those
151 # results are in autoreq already) - (Anssi 08/2012)
152 Requires: %dlopenreq asound
153 Requires: %dlopenreq crypto
154 Requires: %dlopenreq cups
155 Requires: %dlopenreq dbus-1
156 Requires: %dlopenreq fontconfig
157 Requires: %dlopenreq freetype
158 Requires: %dlopenreq gnutls
159 Requires: %dlopenreq gsm
160 Requires: %dlopenreq jpeg
161 Requires: %dlopenreq ncurses
162 Requires: %dlopenreq odbc
163 Requires: %dlopenreq OSMesa
164 Requires: %dlopenreq png
165 Requires: %dlopenreq sane
166 Requires: %dlopenreq ssl
167 Requires: %dlopenreq tiff
168 Requires: %dlopenreq v4l1
169 Requires: %dlopenreq Xcomposite
170 Requires: %dlopenreq Xcursor
171 Requires: %dlopenreq Xi
172 Requires: %dlopenreq Xinerama
173 Requires: %dlopenreq Xrandr
174 Requires: %dlopenreq Xrender
175 Requires: %dlopenreq xslt
176 Requires: %dlopenreq Xxf86vm
177 #Requires: %%dlopenreq capi20 # ISDN support - unlikely to be needed
178 # (Anssi) If not installed, wine pops up a dialog on first start proposing to
179 # download pre-built binaries (unlike wine-gecko, same wine-mono works with
180 # both wine and wine64):
181 Recommends: wine-mono = %mono_version
182 Requires(post): desktop-file-utils
183 Requires(postun): desktop-file-utils
184 Requires(post): desktop-common-data
185 Requires(postun): desktop-common-data
186 Requires(preun): rpm-helper
187 Requires(post): rpm-helper
188 %ifarch %{ix86}
189 Conflicts: %{name}64
190 %else
191 Conflicts: %{name}
192 %endif
193
194 %description
195 %desc
196
197 %ifarch x86_64
198 %description -n %{wine}
199 %desc
200
201 This package contains the Win64 version of Wine. You need the wine32
202 package from the 32-bit repository to be able to run 32-bit applications.
203 %endif
204
205 %ifnarch x86_64
206 %package -n wine32
207 Summary: 32-bit support for Wine
208 Group: Emulators
209 # This is not an EVR-specific requirement, as otherwise on x86_64 urpmi could
210 # resolve the dependency to wine64 even on upgrades, and therefore replace
211 # wine+nwine32 installation with a wine32+wine64 installation. - Anssi
212 Requires: %{name}-bin
213 Conflicts: %{name} < 1:1.2-0.rc7.1
214 Conflicts: %{name}64 < 1:1.2-0.rc7.1
215 # (Anssi) If wine-gecko is not installed, wine pops up a dialog on first
216 # start proposing to download wine-gecko from sourceforge, while recommending
217 # to use distribution packages instead. Therefore suggest wine-gecko here:
218 Recommends: %{name}-gecko = %gecko_version
219
220 %description -n wine32
221 Wine is a program which allows running Microsoft Windows programs
222 (including DOS, Windows 3.x and Win32 executables) on Unix.
223
224 This package contains the files needed to support 32-bit Windows
225 programs.
226 %endif
227
228 %package -n %{wine}-devel
229 Summary: Static libraries and headers for %{name}
230 Group: Development/C
231 Requires: %{wine} = %{epoch}:%{version}
232 Provides: %{lib_name_devel} = %{epoch}:%{version}-%{release}
233 Provides: %{lib_name_orig}-devel = %{epoch}:%{version}-%{release}
234 Obsoletes: %{lib_name_devel} <= %{epoch}:%{version}-%{release}
235 Obsoletes: %{mklibname -d wine 1} < %{epoch}:%{version}
236 %ifarch %{ix86}
237 Conflicts: %{name}64-devel
238 %else
239 Conflicts: %{name}-devel
240 %endif
241
242 %description -n %{wine}-devel
243 Wine is a program which allows running Microsoft Windows programs
244 (including DOS, Windows 3.x and Win32 executables) on Unix.
245
246 %{wine}-devel contains the libraries and header files needed to
247 develop programs which make use of wine.
248
249 %prep
250 %setup -q
251 %autopatch -p1
252
253 %if 0%{?staging}
254 # setup and apply compholio-patches or pulseaudio-patch.
255 gzip -dc %{SOURCE900} | tar -xf - --strip-components=1
256 %{__make} -C patches DESTDIR="`pwd`" install
257 %endif
258
259 GECKO_VERSION=$(sed -rn 's,^#define\s+GECKO_VERSION\s+"([^"]*)".*$,\1,p' dlls/appwiz.cpl/addons.c)
260 [ "$GECKO_VERSION" = "%gecko_version" ] || { echo %{name}-gecko version mismatch; exit 1; }
261 MONO_VERSION=$(sed -rn 's,^#define\s+MONO_VERSION\s+"([^"]*)".*$,\1,p' dlls/appwiz.cpl/addons.c)
262 [ "$MONO_VERSION" = "%mono_version" ] || { echo wine-mono version mismatch; exit 1; }
263
264 %build
265 autoreconf
266
267 %ifarch %ix86
268 # (Anssi 04/2008) mdvbug #39604
269 # Some protection systems complain "debugger detected" with our
270 # -fomit-frame-pointer flag, so disable it.
271 # It also causes some crashing issues, and the upstream workaround
272 # in configure script does not seem to work properly. -Anssi 12/2012
273 export CFLAGS="%{optflags} -fno-omit-frame-pointer"
274 %endif
275
276 %configure2_5x --with-x \
277 --with-pulse \
278 --without-hal \
279 %ifarch x86_64
280 --enable-win64
281 %endif
282
283 %make_build depend
284 %make_build
285
286 %install
287 %make_install LDCONFIG=/bin/true
288
289 # Allow users to launch Windows programs by just clicking on the .exe file...
290 install -m 0755 %{SOURCE2} -D %{buildroot}%{_initrddir}/%{name}
291
292 mkdir -p %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
293 cat > %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged/%{name}.menu <<EOF
294 <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
295 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
296 <Menu>
297 <Name>Applications</Name>
298 <Menu>
299 <Name>Tools</Name>
300 <Menu>
301 <Name>Emulators</Name>
302 <Menu>
303 <Name>Wine</Name>
304 <Directory>%{name}.directory</Directory>
305 <Include>
306 <Category>X-Wine</Category>
307 </Include>
308 </Menu>
309 </Menu>
310 </Menu>
311 </Menu>
312 EOF
313
314 mkdir -p %{buildroot}%{_datadir}/desktop-directories
315 cat > %{buildroot}%{_datadir}/desktop-directories/%{name}.directory <<EOF
316 [Desktop Entry]
317 Encoding=UTF-8
318 Name=Wine
319 Icon=%{name}
320 Type=Directory
321 EOF
322
323 mkdir -p %{buildroot}%{_datadir}/applications
324 for i in winecfg:Wine\ Configuration:winecfg \
325 notepad:Wine\ Notepad:notepad \
326 winefile:Wine\ File\ Manager:winefile \
327 regedit:Wine\ Registry\ Editor:regedit \
328 winemine:Wine\ Minesweeper:winemine \
329 wineboot:Wine\ Reboot:wine \
330 "wineconsole cmd":Wine\ Command\ Line:wine \
331 "wine uninstaller":Wine\ Software\ Uninstaller:msiexec \
332 "wine wordpad":Wine\ Wordpad:wordpad \
333 "wine winhlp32":Wine\ WinHelp:winhelp \
334 "wine oleview":Wine\ OLE\ View:wine;
335 do cat > %{buildroot}%{_datadir}/applications/%{name}-`echo $i|cut -d: -f1|sed s/"%{name} "//g`.desktop << EOF
336 [Desktop Entry]
337 Name=`echo $i|cut -d: -f2`
338 Comment=`echo $i|cut -d: -f2`
339 Exec=`echo $i|cut -d: -f1`
340 Icon=`echo $i|cut -d: -f3`
341 Terminal=false
342 Type=Application
343 Categories=X-Wine;
344 EOF
345 done
346
347 # Use Category=Wine instead of the previous workaround (Category=Emulator)
348 desktop-file-install --add-mime-type=application/x-zip-compressed \
349 --remove-mime-type=application/x-zip-compressed \
350 --add-category=X-Wine \
351 --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/%{name}.desktop
352
353 %ifarch x86_64
354 # fix the binary name
355 sed -i 's,Exec=wine ,Exec=wine64 ,' %{buildroot}%{_datadir}/applications/%{name}.desktop
356 %endif
357
358 mkdir -p %{buildroot}%{_iconsdir}/hicolor/256x256/apps
359 tar -Jxf %{SOURCE3} -C %{buildroot}%{_iconsdir}/hicolor/256x256/apps/
360
361 %ifarch x86_64
362 chrpath -d %{buildroot}%{_bindir}/{wine64,wineserver,wmc,wrc} %{buildroot}%{_libdir}/%{name}/*.so
363 %else
364 chrpath -d %{buildroot}%{_bindir}/{wine,wineserver,wmc,wrc} %{buildroot}%{_libdir}/%{name}/*.so
365 %endif
366
367 %ifarch x86_64
368 cat > README.install.urpmi <<EOF
369 This is the Win64 version of Wine. This version can only be used to run
370 64-bit Windows applications as is. For running 32-bit Windows applications,
371 you need to also install the 'wine32' package from the 32-bit repository.
372 EOF
373 %endif
374
375 %preun -n %{wine}
376 %_preun_service %{name}
377
378 %post -n %{wine}
379 %_post_service %{name}
380
381 %files -n %{wine}
382 %doc ANNOUNCE AUTHORS README
383 %ifarch x86_64
384 %doc README.install.urpmi
385 %{_bindir}/%{name}64
386 %{_bindir}/%{name}64-preloader
387 %endif
388 %{_initrddir}/%{name}
389 %{_bindir}/winecfg
390 %{_bindir}/wineconsole*
391 %{_bindir}/wineserver
392 %{_bindir}/wineboot
393 %{_bindir}/function_grep.pl
394 %if 0%{?staging}
395 %{_bindir}/msidb
396 %endif
397 %{_bindir}/msiexec
398 %{_bindir}/notepad
399 %{_bindir}/regedit
400 %{_bindir}/winemine
401 %{_bindir}/winepath
402 %{_bindir}/regsvr32
403 %{_bindir}/winefile
404 %ifnarch x86_64
405 %{_mandir}/man?/%{name}.?*
406 %lang(de) %{_mandir}/de.UTF-8/man?/%{name}.?*
407 %lang(fr) %{_mandir}/fr.UTF-8/man?/%{name}.?*
408 %lang(pl) %{_mandir}/pl.UTF-8/man?/%{name}.?*
409 %endif
410 %lang(de) %{_mandir}/de.UTF-8/man?/wineserver.?*
411 %lang(fr) %{_mandir}/fr.UTF-8/man?/wineserver.?*
412 %{_mandir}/man?/wineserver.?*
413 %{_mandir}/man?/msiexec.?*
414 %{_mandir}/man?/notepad.?*
415 %{_mandir}/man?/regedit.?*
416 %{_mandir}/man?/regsvr32.?*
417 %{_mandir}/man?/wineboot.?*
418 %{_mandir}/man?/winecfg.?*
419 %{_mandir}/man?/wineconsole.?*
420 %{_mandir}/man?/winefile.?*
421 %{_mandir}/man?/winemine.?*
422 %{_mandir}/man?/winepath.?*
423 %dir %{_datadir}/%{name}
424 %{_datadir}/%{name}/%{name}.inf
425 %{_datadir}/%{name}/l_intl.nls
426 %{_datadir}/applications/*.desktop
427 %{_sysconfdir}/xdg/menus/applications-merged/%{name}.menu
428 %{_datadir}/desktop-directories/%{name}.directory
429 %dir %{_datadir}/wine/fonts
430 %{_datadir}/wine/fonts/*
431 %{_iconsdir}/hicolor/*/apps/*.png
432
433 %ifnarch x86_64
434 %files -n wine32
435 %{_bindir}/wine
436 %ifarch %{ix86}
437 %{_bindir}/wine-preloader
438 %endif
439 %{_mandir}/man?/%{name}.?*
440 %lang(de) %{_mandir}/de.UTF-8/man?/%{name}.?*
441 %lang(fr) %{_mandir}/fr.UTF-8/man?/%{name}.?*
442 %lang(pl) %{_mandir}/pl.UTF-8/man?/%{name}.?*
443 %endif
444
445 %{_libdir}/libwine*.so.%{lib_major}*
446 %dir %{_libdir}/%{name}
447 %{_libdir}/%{name}/*.cpl.so
448 %{_libdir}/%{name}/*.drv.so
449 %{_libdir}/%{name}/*.dll.so
450 %{_libdir}/%{name}/*.exe.so
451 %{_libdir}/%{name}/*.acm.so
452 %{_libdir}/%{name}/*.ocx.so
453 %ifarch %{ix86}
454 %{_libdir}/%{name}/*.vxd.so
455 %{_libdir}/%{name}/*16.so
456 %endif
457 %{_libdir}/%{name}/*.tlb.so
458 %{_libdir}/%{name}/*.ds.so
459 %{_libdir}/%{name}/*.sys.so
460 %{_libdir}/%{name}/fakedlls
461
462 %files -n %{wine}-devel
463 %{_libdir}/%{name}/*.a
464 %{_libdir}/libwine*.so
465 %{_libdir}/%{name}/*.def
466 %{_includedir}/*
467 %{_bindir}/wmc
468 %{_bindir}/wrc
469 %{_bindir}/winebuild
470 %{_bindir}/winegcc
471 %{_bindir}/wineg++
472 %{_bindir}/winecpp
473 %{_bindir}/widl
474 %{_bindir}/winedbg
475 %{_bindir}/winemaker
476 %{_bindir}/winedump
477 %lang(de) %{_mandir}/de.UTF-8/man?/winemaker.?*
478 %lang(fr) %{_mandir}/fr.UTF-8/man?/winemaker.?*
479 %{_mandir}/man1/wmc.1*
480 %{_mandir}/man1/wrc.1*
481 %{_mandir}/man1/winebuild.1*
482 %{_mandir}/man1/winemaker.1*
483 %{_mandir}/man1/winedump.1*
484 %{_mandir}/man1/widl.1*
485 %{_mandir}/man1/winedbg.1*
486 %{_mandir}/man1/wineg++.1*
487 %{_mandir}/man1/winegcc.1*
488 %{_mandir}/man1/winecpp.1*

  ViewVC Help
Powered by ViewVC 1.1.30