Something here

Compilando Wine 1.7 CHROOT no Debian

Jul 28, 2015 | Tags: , | Categoria: Linux

Querendo compilar uma nova versão do wine? Esse é um jeito fácil.

1. Instalando e configurando o Chroot

Logado como root execute:

apt-get install debootstrap &&
mkdir $HOME/tmp/architectures/wine32 -p &&
cd $HOME/tmp/architectures &&
debootstrap --arch i386 jessie $HOME/tmp/architectures/wine32 http://ftp.au.debian.org/debian/ &&
mount -o bind /proc wine32/proc &&
cp /etc/resolv.conf wine32/etc/resolv.conf &&
chroot wine32

Agora que você está logado no chroot:

apt-get update &&
apt-get install locales sudo vim &&
echo 'export LC_ALL="C"'>>/etc/bash.bashrc &&
echo 'export LANG="C"'>>/etc/bash.bashrc &&
echo '127.0.0.1 localhost homehost' >> /etc/hosts &&
source /etc/bash.bashrc &&
adduser sandbox &&
usermod -g sudo sandbox &&
echo 'Defaults !tty_tickets' >> /etc/sudoers &&
su sandbox &&
cd ~/

Em hostname, coloque o nome nome do sistema.

2. Building Wine e instalando dependências

sudo apt-get install libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu1-mesa-dev:i386 libosmesa6-dev:i386  libdbus-1-dev:i386 libncurses5-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-2-dev:i386 liblcms2-dev:i386 libgstreamer-plugins-base0.10-dev:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig1-dev:i386 libgsm1-dev:i386 libtiff5-dev:i386 libpng12-dev:i386 libjpeg-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap2-dev:i386 libxrender-dev:i386 libxml2-dev:i386 libxslt1-dev:i386 gettext:i386 prelink:i386 bzip2:i386 bison:i386 flex:i386 oss4-dev:i386 checkinstall:i386 ocl-icd-libopencl1:i386 opencl-headers:i386 libasound2-dev:i386 libgnutls28-dev:i386 build-essential

Baixe a versão mais recente do wine aqui.

mkdir ~/tmp &&
cd ~/tmp &&
wget http://nbtelecom.dl.sourceforge.net/project/wine/Source/wine-1.7.47.tar.bz2 &&
tar xvf wine-1.7.47.tar.bz2 &&
cd wine-1.7.47/ &&
./configure &&
time make -j3 &&
checkinstall --install=no

 

E resultará:

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values: 

0 -  Maintainer: [ sandbox@homehost ]
1 -  Summary: [ Package created with checkinstall 1.6.2 ]
2 -  Name:    [ wine ]
3 -  Version: [ 1.7.47 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ wine-1.7.47 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ wine ]
12 - Conflicts: [  ]
13 - Replaces: [  ]


**********************************************************************

 Done. The new package has been saved to

 /home/sandbox/tmp/wine-1.7.47/wine_1.7.47-1_i386.deb
 You can install it in your system anytime using: 

      dpkg -i wine_1.7.47-1_i386.deb

3. Instalando o Wine 1.7

Saia do chroot:

exit ; exit ; exit ; exit

Agora para você instalar, se você estiver em ambiente 64 bits você precisa habilitar multiarch:

dpkg --add-architecture i386 &&
apt-get update &&
apt-get install lib32z1 lib32ncurses5 libgstreamer-plugins-base0.10-0 libmpg123-0:i386

Agora copie os arquivos .deb e instale-os:

cp /root/tmp/architectures/wine32/home/sandbox/tmp/wine-1.7.47/wine_1.7.47-1_i386.deb . &&
chown $USER wine_1.7.47-1_i386.deb &&
dpkg -i wine_1.7.47-1_i386.deb