File wine14.spec of Package wine14
#
# spec file for package wine
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: wine14
BuildRequires: Mesa-devel
BuildRequires: alsa-devel
BuildRequires: bison
BuildRequires: capi4linux
BuildRequires: cups-devel
BuildRequires: dbus-1-devel
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: fontconfig-devel
BuildRequires: freeglut-devel
BuildRequires: freetype2-devel
BuildRequires: giflib-devel
BuildRequires: gnutls-devel
BuildRequires: libgphoto2-devel
BuildRequires: libgsm-devel
BuildRequires: libjpeg-devel
BuildRequires: liblcms-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: ncurses-devel
BuildRequires: openldap2-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: prelink
BuildRequires: update-desktop-files
BuildRequires: valgrind-devel
BuildRequires: xorg-x11-devel
%if 0%{?suse_version} == 0 || 0%{?suse_version} < 1210
BuildRequires: hal-devel
%endif
%if 0%{?suse_version} >= 1140
BuildRequires: gstreamer-0_10-plugins-base-devel
%endif
%if 0%{?suse_version} >= 1120
BuildRequires: libv4l-devel
BuildRequires: openal-soft-devel
%endif
%if 0%{?suse_version} >= 1110 && 0%{?sles_version} == 0
BuildRequires: libv4l-devel
%endif
Version: 1.4.1
Release: 0
Summary: An MS Windows emulator
License: LGPL-2.1+
Group: System/Emulators/PC
Url: http://www.winehq.org/
Source0: wine-%version.tar.bz2
Patch0: susepatches.patch
Source1: http://kegel.com/wine/winetricks
Source2: http://kegel.com/wine/wisotool
Source3: README.SuSE
Source4: wine.desktop
Source5: ubuntuwine.tar.bz2
Source7: baselibs.conf
%if 0%{?suse_version} > 1120
%ifarch x86_64
Requires: %{name}-32bit = %{version}
%endif
%endif
%ifarch %ix86 x86_64
Requires: wine-gecko >= 1.4
%endif
# wine-mp3 is built at Packman, not in OBS
Recommends: wine-mp3
# for DOS support
Recommends: dosbox
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
An MS Windows emulator, consisting of both runtime and also source
compatibility functions. You can run your MS executables with it, and
you can write your Windows programs under Linux and link against the
WINE libraries.
It is not necessary to have a Windows installation to run WINE.
Please have a look at /usr/share/doc/packages/wine/README.SuSE. There
is more documentation available in that directory. Read 'man wine' for
further information.
You can invoke wine by entering: 'wine program.exe' wine can be
configured by running 'winecfg'.
%package devel
Summary: Files for wine development
Group: Development/Libraries/C and C++
%description devel
This RPM contains the header files and development tools for the WINE
libraries.
%prep
%setup -q -n wine-%version
%patch0 -p1
#
cp %{SOURCE3} .
#
%build
cat VERSION
%ifarch %ix86
# Steam wants proper %ebp frames to hook functions
export RPM_OPT_FLAGS=`echo %{optflags}|sed -e 's/-fomit-frame-pointer//'`
%endif
CFLAGS="-DLDAP_DEPRECATED=1 $RPM_OPT_FLAGS" \
%configure \
--with-x --verbose \
%ifarch x86_64
--enable-win64
%endif
grep "have_x=yes" config.log || exit 1
# generate baselibs.conf
%ifarch %ix86
echo "# autogenerated in .spec file" >%SOURCE7
echo "%name" >> %SOURCE7
echo " +^/usr/bin/wine\$" >> %SOURCE7
echo " +^/usr/bin/wine-preloader\$" >> %SOURCE7
echo " +^/usr/lib/wine/fakedlls" >> %SOURCE7
grep SONAME_ config.log
grep SONAME_ config.log|grep -v 'so"'|sed -e 's/^.*\(".*"\).*$/ requires \1/;'|sort -u >>%SOURCE7
echo "%name-devel" >> %SOURCE7
cat %SOURCE7
%endif
make %{?_smp_mflags} depend
make %{?_smp_mflags} all
%install
make install DESTDIR=$RPM_BUILD_ROOT
# install desktop file
install -d %{buildroot}%{_datadir}/applications/
install -m 0644 %{SOURCE4} %{buildroot}%{_datadir}/applications/
install -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/
install -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/
mv %{buildroot}/%{_mandir}/de.UTF-8 %{buildroot}/%{_mandir}/de
mv %{buildroot}/%{_mandir}/fr.UTF-8 %{buildroot}/%{_mandir}/fr
mv %{buildroot}/%{_mandir}/pl.UTF-8 %{buildroot}/%{_mandir}/pl
tar xjf %{SOURCE5}
# Copied from Ubuntu Wine out of debian.diff
# https://launchpad.net/~ubuntu-wine/+archive/ppa/+packages
# taken on 1.2rc2 time.
cd ubuntuwine
install -d %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
install -c -m 644 wine.menu %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
# Install application-specific desktop files
install -d %{buildroot}%{_datadir}/applications
install -c -m 644 *.desktop %{buildroot}%{_datadir}/applications/
install -d %{buildroot}%{_datadir}/desktop-directories/
install -c -m 644 *.directory %{buildroot}%{_datadir}/desktop-directories/
# Install icons
install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
install -c -m 644 *.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
cd ..
# breaks btrfs installation, see bnc#723402
# fdupes %{buildroot}
%if 0%{?suse_version}
%suse_update_desktop_file wine
%endif
# find the implicit dependencies
%define winedir %_builddir/wine-%version/
cat >%winedir/my-find-requires.sh <<EOF
#!/bin/bash
%{__find_requires}
%ifarch x86_64
grep SONAME_ %winedir/config.log|grep -v 'so"'|sed -e 's/^.*"\(.*\)".*$/\1()(64bit)/;'|sort -u
%else
grep SONAME_ %winedir/config.log|grep -v 'so"'|sed -e 's/^.*"\(.*\)".*$/\1/;'|sort -u
%endif
EOF
chmod 755 %winedir/my-find-requires.sh
%define _use_internal_dependency_generator 0
%define __find_requires %winedir/my-find-requires.sh
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc ANNOUNCE AUTHORS LICENSE LICENSE.OLD README*
%{_bindir}/function_grep.pl
%{_bindir}/msiexec
%{_bindir}/notepad
%{_bindir}/regedit
%{_bindir}/regsvr32
%{_bindir}/wineboot
%{_bindir}/winecfg
%{_bindir}/wineconsole
%{_bindir}/winedbg
%{_bindir}/winefile
%{_bindir}/winemine
%{_bindir}/winepath
%{_bindir}/wineserver
%{_bindir}/winetricks
%{_bindir}/wisotool
%{_datadir}/wine
%{_datadir}/applications/wine.desktop
%dir %doc %{_mandir}/pl
%dir %doc %{_mandir}/pl/man1
%doc %{_mandir}/man1/wine.1*
%doc %{_mandir}/man1/winedbg.1*
%doc %{_mandir}/man1/wineserver.1*
%doc %{_mandir}/*/man1/wine.1*
%doc %{_mandir}/*/man1/wineserver.1*
%doc %{_mandir}/man1/msiexec.1.*
%doc %{_mandir}/man1/notepad.1.*
%doc %{_mandir}/man1/regedit.1.*
%doc %{_mandir}/man1/regsvr32.1.*
%doc %{_mandir}/man1/wineboot.1.*
%doc %{_mandir}/man1/winebuild.1.*
%doc %{_mandir}/man1/winecfg.1.*
%doc %{_mandir}/man1/wineconsole.1.*
%doc %{_mandir}/man1/winecpp.1.*
%doc %{_mandir}/man1/winefile.1.*
%doc %{_mandir}/man1/winemine.1.*
%doc %{_mandir}/man1/winepath.1.*
%dir %{_sysconfdir}/xdg/menus/
%dir %{_sysconfdir}/xdg/menus/applications-merged
%config %{_sysconfdir}/xdg/menus/applications-merged/*.menu
%{_datadir}/applications/*.desktop
%dir %{_datadir}/desktop-directories/
%{_datadir}/desktop-directories/*.directory
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%ifarch %ix86
%{_bindir}/wine
%{_bindir}/wine-preloader
%endif
%ifarch x86_64
%{_bindir}/wine64
%{_bindir}/wine64-preloader
%endif
%{_libdir}/wine/*.so
%{_libdir}/lib*.so.*
%dir %{_libdir}/wine
%{_libdir}/wine/fakedlls/
%files devel
%defattr(-,root,root)
%{_includedir}/wine
%{_bindir}/widl
%{_bindir}/winebuild
%{_bindir}/winecpp
%{_bindir}/winedump
%{_bindir}/wineg++
%{_bindir}/winegcc
%{_bindir}/winemaker
%{_bindir}/wmc
%{_bindir}/wrc
%{_libdir}/wine/*.def
%{_libdir}/wine/*.a
%{_libdir}/lib*.so
%doc %{_mandir}/man1/winemaker.1*
%doc %{_mandir}/*/man1/winemaker.1*
%doc %{_mandir}/man1/widl.1*
%doc %{_mandir}/man1/winedump.1*
%doc %{_mandir}/man1/wineg++.1*
%doc %{_mandir}/man1/winegcc.1*
%doc %{_mandir}/man1/wmc.1*
%doc %{_mandir}/man1/wrc.1*
%changelog