Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1481926
 поиск   регистрация   авторизация 
 
Группа :: Эмуляторы
Пакет: wine

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

# This spec for backport to M24 is autogenerated. Do not edit it.
# Spec for WINE at Etersoft, enhanced version of WINE
# Copyright (c) 2004, 2005, 2006 Etersoft llc., Russia, Saint-Petersburg.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via wine at etersoft.ru
%define debug %nil
#%define debug yes

Name: wine
Version: 20060902
%define relnum 2
%if %_vendor != "alt"
Release: alt0.M24.2
%else
Release: alt0.M24.2
%endif

Summary: Enviroment for running Windows applications (Etersoft edition)
Summary(ru_RU.KOI8-R): Среда для запуска программ Windows (сборка от Etersoft)

License: LGPL
Group: Emulators
Url: http://winehq.org.ru/

Packager: Vitaly Lipatov <lav at altlinux.ru>

#Source: ftp://ftp.lip6.fr/pub/linux/Wine/development/%name-%version.tar.bz2

Source: ftp://updates.etersoft.ru/pub/Etersoft/WINE at Etersoft/sources/tarball/%name-%version.tar.bz2
Source1: %name-etersoft-public-%version.tar.bz2

AutoReq: yes, noperl

# Thanks PLD folks for the note:

# NOTE: wine detects the following SONAMES for dlopen at build time:
#   libssl (libcrypto inside) (wininet.dll)
#   libcups (winspool.dll.so,wineps.dll.so)
#   libcurses/libncurses (wineconsole program)
#   libfontconfig (gdi32.dll.so)
#   libfreetype (wineps.dll.so,gdi32.dll.so)
#   libGL (x11drv.dll.so,ddraw.dll.so)
#   libjack (winejack.drv.so - explicit dependency in subpackage)
#   libX11, libXext, libXi, libXrender (x11drv.dll.so)
# thus requires rebuild after change of any of the above.
#

#==========================================================================


# Needed freetype (it is recommended to use 2.1.10 for better results)

%define freetype_ver 2.1.9

# General dependencies

# FIXME: why c++ ?, test it
BuildRequires: flex bison fontconfig-devel gcc-c++ libjpeg-devel zlib-devel util-linux libxml2-devel

# We have not to use it in production (used in winedbg)

#BuildConflicts: valgrind-devel valgrind

# TODO: where is used?

# FIXME: xpm-devel is override by libXpm-devel since xorg
%if %_vendor != "suse" && %_vendor != "redhat"
BuildRequires: gpm-devel xpm-devel libungif-devel
%endif

%if %_vendor == "alt"
ExclusiveArch:  %{ix86} x86_64
# For internal use in wrapper scripts
# TODO: rewrite with more standart utils
#Requires: Xdialog, hd2u, iconv, webclient
# TODO: do not use XDialog, hd2u in scripts
Requires: iconv, webclient
BuildRequires: rpm-build-compat >= 0.4
%else
BuildRequires: rpm-build-altlinux-compat >= 0.6
%endif

Provides: wine-etersoft-public = %version

# Loads with dl_open

Requires: fontconfig

# Do not require strict release

Requires: lib%name = %version
Provides: %name-utils
Obsoletes: %name-utils
Obsoletes: %name-test

# for cross tests compiling

#BuildPreReq: i386-mingw32msvc-binutils i386-mingw32msvc-gcc

######################## ALT Linux dependencies ################################

%if %_vendor == "alt"
%set_verify_elf_method rpath=strict
%define freetypepack freetype2
# For menu/MIME subsystem
Requires(post,postun): desktop-file-utils
BuildRequires: desktop-file-utils menu-devel

# FIXME: ifdef does not work, will do it in autobuild script

#BuildRequires: prelink

# TODO: only in Sisyphus: libicu-devel

# FIXME: Missed on other platform: libcapi, libicu
#
BuildRequires: XFree86-devel libGLU-devel XFree86-devel
BuildRequires: libtinfo-devel libncurses-devel libssl-devel
BuildRequires: libldap-devel libxslt-devel
BuildRequires: jackit-devel libalsa-devel libarts-devel libcups-devel
BuildRequires: libgphoto2-devel libieee1284-devel libsane-devel libusb-devel liblcms-devel
# Unusable: libcapi20-devel
# Do not need for build anymore: libuninameslist-devel

# FIXME: move to libwine

# Load with dl_open
Requires: libcups libssl
%endif


######################## Mandriva dependencies ################################

%if %_vendor == "Mandrakesoft" || %_vendor == "Mandriva"
%define freetypepack libfreetype6
BuildRequires: libMesaGLU1-devel libXFree86-devel
BuildRequires: jackit-devel libalsa-devel libarts-devel libcups2-devel
BuildRequires: libgphoto2-devel libieee1284-devel libsane-devel libusb-devel liblcms-devel
BuildRequires: openssl-devel libxslt1-devel

# Load with dl_open

Requires: libcups2 openssl
%endif

######################## RHEL / Scientific / Fedora / CentOS / ASP ############

%if %_vendor == "redhat" || %_vendor == "asplinux"
%define freetypepack freetype
BuildRequires: arts-devel cups-devel prelink
# FIXME: xorg for newest (wait for new rpm-build-compat)
#BuildPreReq: XFree86-Mesa-libGLU XFree86-devel
#BuildPreReq: mesa-libGLU-devel mesa-libGL-devel libXext-devel
BuildRequires: openssl-devel alsa-lib-devel libxslt-devel
# TODO: libcapi-devel libicu-devel
# Load with dl_open
Requires: cups-libs openssl
%endif

########################## SuSe dependencies #############################

%if %_vendor == "suse"
%define freetypepack freetype2
# XFree on NLD:
#BuildRequires: XFree86-Mesa-devel XFree86-devel

BuildRequires: alsa-devel arts-devel liblcms-devel
BuildRequires: openssl-devel cups-devel libxslt-devel

# NLD9 SP3:

#        giflib-devel is needed by wine-20060412-eter1suse
#        jack-devel is needed by wine-20060412-eter1suse
# BuildRequires: jack-devel giflib-devel

# Can't locate:

#BuildRequires: sane-devel libusb-devel libgphoto2-devel
# Load with dl_open
Requires: cups-libs openssl
%endif

########################## Special Linux ##################################

%if %_vendor == "RPM"
%define freetypepack freetype
BuildRequires: XFree86-devel ncurses-devel
BuildRequires: alsa-lib-devel cups-devel openssl-devel
# TODO: can be improved
#BuildRequires: libldap-devel
#BuildRequires: libGLU-devel libxslt-devel jackit-devel libarts-devel
#BuildRequires: libgphoto2-devel libieee1284-devel libsane-devel libusb-devel liblcms-devel
# Load with dl_open
Requires: cups-libs openssl
%endif

# FIXME: for non rpm-based distro (see README in Debian dir for detail buildreqs)

%if %_vendor == "rpm"
%define freetypepack libfreetype6
BuildRequires: prelink
%endif

# comment it for apt-get build-dep

BuildRequires: %freetypepack-devel >= %freetype_ver
# Load with dl_open
Requires: %freetypepack >= %freetype_ver


#=========================================================================


BuildRequires: rpm-build-compat >= 0.4

%description
This build is a LGPL-part of WINE at Etersoft product prepared for
using commercial programs.
WINE Is Not Emulator. Wine is an Open Source implementation of the Windows
API on top of X and Unix.  Think of Wine as a compatibility layer for
running Windows programs. Wine does not require Microsoft Windows,
as it is a completely free alternative implementation of the Windows
API consisting of 100 percent LGPL code, however Wine can optionally
use native Windows DLLs if they are available. Wine provides both a
development toolkit for porting Windows source code to Unix as well as
a program loader, allowing many unmodified Windows programs to run on
x86-based Unixes, including Linux, FreeBSD, and Solaris.

It is still alpha level code; don't expect everything to work.
Check http://winehq.org.ru or http://winehq.org if you experience some problems.

You can obtain commercial support of the product from Etersoft company:
wine at etersoft.ru

%description -l ru_RU.KOI8-R
Данная сборка является свободной частью продукта WINE at Etersoft,
предназначенного для исполнения коммерческих Windows-программ.
WINE Не Является Эмулятором. Это альтернативная реализация API Windows
3.x и Win32. Wine предоставляет как инструментарий разработки (Winelib)
для переноса унаследованных исходных кодов из среды Windows в среду
Unix, так и программный загрузчик, позволяющий исполнять двоичный код, разработанный
для Windows 3.1/95/NT, в среде разных вариантов
Unix на платформе Intel. Wine не требует наличия Microsoft Windows,
поскольку это полностью альтернативная реализация, состоящая из полностью
свободного кода.

WINE всё ещё находится в стадии разработки, поэтому
не ожидайте, что всё будет работать.

Обращайтесь за дополнительной информацией на сайт http://winehq.org.ru

При необходимости вы можете получить коммерческую поддержку данного продукта
в компании Etersoft или у её партнёров: wine at etersoft.ru

%package -n %name-test
Summary: API test for WINE
Summary(ru_RU.KOI8-R): Тест API для WINE
Group: Emulators
Requires: %name = %version-%release

%description -n %name-test
API test for WINE (unneeded for usual work).
Warning: it may kill your X server suddenly.

%package -n lib%name
Summary: Main library for wine
Group: System/Libraries
Provides: wine-fonts-ttf
Obsoletes: wine-fonts-ttf
%if %_vendor == "Mandrakesoft" || %_vendor == "Mandriva"
Provides: lib%{name}1
%endif

%description -n lib%name
This is an ALPHA release of Wine, the MS-Windows emulator.  This is
still a developers release and many applications may still not work.

This package contains the library needed to run programs dynamically
linked with Wine.

%description -n lib%name -l ru_RU.KOI8-R
Это предварительный выпуск среды Wine, имитатора MS-Windows.
Он всё ещё в разработке, и многие приложения могут пока не работать.

Этот пакет состоит из библиотеки, которая реализует Windows API.

########## separate libraries

%package -n lib%name-arts
Summary: arts support library for wine
Group: System/Libraries

%description -n lib%name-arts
This package contains the library for arts sound output.

%package -n lib%name-twain
Summary: twain support library for wine
Group: System/Libraries

%description -n lib%name-twain
This package contains the library for twain support.

##########################################################################

%package -n lib%name-devel
Summary: Headers for lib%name-devel
Group: Development/C
Requires: lib%name = %version-%release
Obsoletes: wine-devel
Provides: wine-devel

%description -n lib%name-devel
This is an ALPHA release of Wine, the MS-Windows emulator.  This is
still a developers release and many applications may still not work.

lib%name-devel contains the header files and some utilities needed to
develop programs using lib%name.

%description -n lib%name-devel -l ru_RU.KOI8-R
Это предварительный выпуск среды Wine, имитатора MS-Windows.
Он всё ещё в разработке, и многие приложения могут пока не работать.

lib%name-devel содержит файлы для разработки программ, использующих Wine -
заголовочные файлы и утилиты, предназначенные
для компилирования программ с lib%name.

%package -n lib%name-devel-doc
Summary: Documentation for lib%name-devel
Group: Development/C

%description -n lib%name-devel-doc
Development documentation for WINE API.

%package -n lib%name-devel-static
Summary: Static libraries for lib%name
Group: Development/C
Requires: lib%name = %version-%release

%description -n lib%name-devel-static
This is an ALPHA release of Wine, the MS-Windows emulator.  This is
still a developers release and many applications may still not work.

lib%name-devel-static contains the static libraries needed to
develop programs which make use of wine.

##########################################################################


%prep
%setup -q -b 1
patch -p0 < etersoft/wine-etersoft.patch -b -z .eter
# disable RPATH at all
%__subst "s| at LIBWINE_LDFLAGS at ||g" Make.rules.in

%build


%if %debug != "yes"
# CHECKME: disable hard debugging for fast compiling
%__subst "s|CFLAGS -gstabs.|CFLAGS|g" configure
%endif

%if %_vendor == "RPM"
# disable long file support for Special Linux
%__subst "s|.*_FILE_OFFSET_BITS.*||" include/wine/port.h
%endif

%configure --enable-dll --enable-opengl \
%if %debug == "yes"
--with-debug \
%endif
%ifarch x86_64
--enable-win64 \
%endif
--with-x

make depend
%make_build

%if %_vendor == "alt"
%make -C documentation htmlpages
%endif

##########################################################################


%install
%make_install install DESTDIR=%buildroot

# Always override with our tested fonts

mkdir -p %buildroot/%_datadir/%name/fonts/
install -m644 fonts/prebuild/*.* %buildroot/%_datadir/%name/fonts/

# Rename wine binary for our wrapper use

mv %buildroot%_bindir/wine %buildroot%_bindir/wine-glibc

# enable stack execution (for newest kernels > 2.6.12?) - need prelink package already installed

test -e %_bindir/execstack && %_bindir/execstack -s %buildroot%_bindir/wine-glibc || echo "WARNING: your have no execstack utility from prelink package"
# enable stack execution in wine binary (old kernel patches)
test -e %_bindir/chstk && %_bindir/chstk -e %buildroot/%_bindir/wine{-kthread,-pthread} || :

# Do not use standart wine launcher and wineprefixcreate

%__rm -f %buildroot/%_bindir/{winelauncher,wineprefixcreate} %buildroot/%_man1dir/wineprefixcreate*
%__rm -f %buildroot/%_bindir/function_grep.pl
# at first run wine does like wineprefixcreate
ln -s wine %buildroot/%_bindir/wineprefixcreate

make -C etersoft install prefix=%buildroot%_prefix initdir=%buildroot%_initdir sysconfdir=%buildroot%_sysconfdir

# FIXME: use desktop menu

mkdir -p %buildroot%_menudir
%define SECT "WINE Applications/Accessories"
cat >%buildroot%_menudir/%name <<EOF
?package(%name): needs=x11 section="/" title="WINE Applications" icon="wine.png"
?package(%name): needs=x11 section="/WINE Applications" title="Accessories" icon="wine.png"
?package(%name): command="%{name}reboot -v" section=%SECT \\
title="Reboot WINE system" longtitle="Reboot wine system" \\
needs="text" icon="%name.png"
?package(%name): command="%{name}autorun" section=%SECT \\
title="CD Autorun" longtitle="Start CD autorun now" \\
needs="text" icon="%name.png"
?package(%name): command="%{name}file" section=%SECT \\
title="File Manager" needs="x11" icon="%name.png"
?package(%name): command="%name progman" section=%SECT \\
title="Program Manager" needs="x11" icon="%name.png"
?package(%name): command="uninstaller" section=%SECT \\
title="Application Uninstaller" needs="text" icon="%name.png"
?package(%name): command="wine control" section=%SECT \\
title="Control Panel" needs="text" icon="%name.png"
?package(%name): command="regedit" section=%SECT \\
title="Registry Editor" needs="text" icon="%name.png"
?package(%name): command="wcmd" section=%SECT \\
title="Command Prompt" needs="text" icon="%name.png"
?package(%name): command="notepad" section=%SECT \\
title="Notepad" needs="x11" icon="%name.png"
?package(%name): command="winemine" section=%SECT \\
title="Mine Sweeper" needs="x11" icon="%name.png"
?package(%name): command="winecfg" section=%SECT \\
title="Wine Configuration" needs="x11" icon="%name.png"
EOF


# CHECKME: Strip binaries in some dummy distro

%if %_vendor != "alt"
strip %buildroot/%_libdir/*.so*
strip %buildroot/%_libdir/%name/*.so*
%endif

# Check for freetype is compiled in and fail if no

strings %buildroot%_libdir/%name/gdi32.dll.so | grep "freetype" >/dev/null

install -d %buildroot%_localstatedir/wine/

%pre
# Add wine group
%_sbindir/groupadd -r -f wine 2>/dev/null || :
# Add group for wine admin
%_sbindir/groupadd -r -f wineadmin 2>/dev/null || :

%post
%post_service %name
%update_menus
%update_desktopdb
# start service if first time install
[ "$1" = "1" ] && %_initdir/wine start || :

%postun
%clean_menus
%clean_desktopdb

%preun
%preun_service %name

%post -n lib%name
%post_ldconfig
%postun -n lib%name
%postun_ldconfig

%post -n lib%name-arts
%post_ldconfig
%postun -n lib%name-arts
%postun_ldconfig

%post -n lib%name-twain
%post_ldconfig
%postun -n lib%name-twain
%postun_ldconfig


%files
%defattr(-,root,root)
%doc ANNOUNCE AUTHORS LICENSE README documentation/PACKAGING
%lang(de) %doc documentation/README.de
%lang(es) %doc documentation/README.es
%lang(fr) %doc documentation/README.fr
%lang(hu) %doc documentation/README.hu
%lang(it) %doc documentation/README.it
%lang(ko) %doc documentation/README.ko
%lang(nb) %doc documentation/README.no
%lang(pt) %doc documentation/README.pt
%lang(pt_BR) %doc documentation/README.pt_br
%lang(tr) %doc documentation/README.tr
%_bindir/wine
%_bindir/wine-*
%_bindir/regsvr32
%_bindir/wcmd
%_bindir/winecfg

# link to wine for ies4linux compatibility

%_bindir/wineprefixcreate
%_bindir/ieinstall

%_bindir/wineconsole*
%_bindir/wineserver
# FIXME: can we returns to standart scheme?
#%_bindir/winelauncher
%_bindir/wineshelllink

%_bindir/winelog
%_bindir/winereboot
%_bindir/wineautorun

%_bindir/msiexec
%_bindir/notepad
%_bindir/progman
%_bindir/regedit
%_bindir/uninstaller
%_bindir/winedbg
%_bindir/wineboot
%_bindir/winefile
%_bindir/winemine
%_bindir/winepath
%_bindir/winhelp
%_bindir/winebrowser
#%_bindir/fnt2bdf
%_libdir/%name/*.exe.so

%_initdir/*
%attr(0775 root wineadmin) %dir %_localstatedir/wine/
%dir %_sysconfdir/wine/
%_sysconfdir/wine/*.reg
%config(noreplace) %_sysconfdir/wine/map_devices.sh
%_menudir/%name
%_desktopdir/*

%_man1dir/wine.1*
%_man1dir/wineserver.1*
%_man1dir/winedbg.1.*



%files -n lib%name
%defattr(-,root,root)
%doc LICENSE AUTHORS COPYING.LIB
#%_sysconfdir/ld.so.conf.d/%name.conf
%_libdir/libwine*.so.*
%dir %_libdir/%name/
%_libdir/%name/*.???16
%_libdir/%name/*.drv.so
%_libdir/%name/*.dll.so
%_libdir/%name/*.acm.so
%_libdir/%name/*.ocx.so
%_libdir/%name/*.vxd.so
%_libdir/%name/*.tlb.so
%exclude %_libdir/%name/twain*
%exclude %_libdir/%name/winearts.drv.so
%_datadir/%name/


%files -n lib%name-arts
%defattr(-,root,root)
%_libdir/%name/winearts.drv.so


%files -n lib%name-twain
%defattr(-,root,root)
%_libdir/%name/twain*
%_libdir/%name/gphoto2.ds*
%_libdir/%name/sane.ds*


%files -n lib%name-devel
%defattr(-,root,root)
%doc ChangeLog LICENSE*
%_bindir/winebuild
%_bindir/wmc
%_bindir/wrc
%_bindir/widl
%_bindir/wineg++
%_bindir/winegcc
%_bindir/winecpp
%_bindir/winedump
%_bindir/winemaker
# only internal use?
#%_bindir/function_grep.pl
%_libdir/lib*.so
%_includedir/%name/
%_libdir/%name/lib*.def
%_libdir/%name/libwinecrt0.a
%_aclocaldir/%name.m4
%_man1dir/wmc.1*
%_man1dir/wrc.1*
%_man1dir/widl.1*
%_man1dir/winebuild*
%_man1dir/winedump.1.*
%_man1dir/wineg++.1.*
%_man1dir/winegcc.1.*
%_man1dir/winemaker.1.*


%if %_vendor == "alt"
# WineAPI documentation
%files -n lib%name-devel-doc
%doc documentation/html
%endif

%files -n lib%name-devel-static
%defattr(-,root,root)
%_libdir/%name/lib*.a
%exclude %_libdir/%name/libwinecrt0.a

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005