This is the old SliTaz forum - Please use the main forum.slitaz.org

Instalar Opera 10
  • tagnisptagnisp April 2010
    para conseguir instalar o opera 10
    basta criar um arquivo de texto o script que estara em anexo
    salvo com qualquer nome como "instalar-opera"
    entre xterm
    entre em modo root
    digite "su"
    e em seguida
    sua senha do usuario root
    va ate a pasta que vc salvou o arquivo do script
    e mande executar

    ex.
    ./instalar-opera

    automaticamente o opera sera instalado.


    #SCRIPT:



    #!/bin/sh -e

    URL=http://mirrors.dedipower.com/opera/linux/1010/
    ROOT="$1"

    if test $(id -u) != 0 ; then
    echo -e "\nYou must be root to run `basename $0`."
    echo -e "Please type 'su' and root password to become super-user.\n"
    exit 0
    fi

    if [ -d $ROOT/var/lib/tazpkg/installed/opera ]; then
    [ -n "$ROOT" ] && exit 1
    tazpkg remove opera
    [ -d /var/lib/tazpkg/installed/opera ] && exit 1
    fi

    TMP_DIR=/tmp/get-opera-$$-$RANDOM
    CUR_DIR=$(pwd)
    mkdir -p $TMP_DIR && cd $TMP_DIR

    # Download rpm
    set -- $(wget -O - $URL 2>/dev/null | grep -E 'href="[0-9]*/"' | tail -1 | sed 's|.*href="\(.*\)/".*|\1|')
    for RELEASE in final ; do
    N=$2
    wget -s $URL$N/$RELEASE/en/i386/ 2> /dev/null && break
    N=$1
    wget -s $URL$N/$RELEASE/en/i386/ 2> /dev/null && break
    done
    URL=$URL$N/$RELEASE/en/i386/
    FILE=$(wget -O - $URL 2> /dev/null | grep "gcc4.qt4.i386.rpm" | sed 's|.*href="\(.*\)".*|\1|')
    URL=$URL$FILE
    wget $URL
    if [ ! -f $FILE ]; then
    cd $CUR_DIR
    rm -rf $TMP_DIR
    echo "Could not download $FILE. Exiting."
    exit 1
    fi

    VERSION=$(rpm -qip $FILE | awk '/^Version/ { print $3 }')-$RELEASE

    mkdir -p opera-$VERSION/fs

    # Extract files
    cd opera-$VERSION/fs
    rpm2cpio < ../../$FILE | cpio -idm
    # extracted pkg can be removed: Save RAM
    rm -f ../../$FILE

    # Create menu
    mkdir -p usr/share/applications
    cat > usr/share/applications/opera.desktop <<EOT<br />[Desktop Entry]
    Version=1.0
    TryExec=opera
    Encoding=UTF-8
    Name=Opera
    Name[af]=opera
    Name[eo]=Opero
    Name[zu]=I Opera
    GenericName=Web browser
    GenericName[bs]=Web preglednik
    GenericName[de]=Web-Browser
    GenericName[eo]=TTT-rigardilo
    GenericName[es]=Navegador web
    GenericName[et]=Veebibrauser
    GenericName[eu]=Web arakatzailea
    GenericName[fi]=WWW-selain
    GenericName[fr]=Un navigateur web
    GenericName[is]=Vafri
    GenericName[it]=Browser Web
    GenericName[nl]=webbrowser
    GenericName[nn]=Nettlesar
    GenericName[pt]=Navegador Web
    GenericName[pt_BR]=Navegador
    GenericName[ro]=Navigator de web
    GenericName[sl]=Spletni brskalnik
    GenericName[ven]=Buronza ya Webu
    GenericName[xh]=Umkhangeli Zincwadi Zokubhaliweyo
    GenericName[zu]=Umkhangeli zincwadi we Web
    Exec=opera %u
    Terminal=false
    Categories=Application;Qt;Network;WebBrowser;X-Ximian-Main;X-Ximian-Toplevel
    Icon=opera.png
    MimeType=text/html;text/xml;application/xhtml+xml;application/x-mimearchive;application/xml;application/rss+xml;application/rdf+xml;image/svg+xml;image/gif;image/jpeg;image/png;image/x-bmp;image/x-xbm;application/mime
    Comment=Web Browser
    Type=Application
    EOT
    cd ../..

    cat > opera-$VERSION/receipt <<EOT<br />PACKAGE="opera"
    VERSION="$VERSION"
    CATEGORY="non-free"
    SHORT_DESC="Opera Web browser."
    DEPENDS="libQtGui"
    WEB_SITE="http://www.opera.com/"
    EOT

    # Remove unwanted locale
    mv opera-$VERSION/fs/usr/share/opera/locale opera-$VERSION/fs/usr/share/opera/locale-full
    mkdir -p opera-$VERSION/fs/usr/share/opera/locale
    cp -a opera-$VERSION/fs/usr/share/opera/locale-full/en \
    opera-$VERSION/fs/usr/share/opera/locale-full/fr \
    opera-$VERSION/fs/usr/share/opera/locale-full/pt \
    opera-$VERSION/fs/usr/share/opera/locale-full/de \
    opera-$VERSION/fs/usr/share/opera/locale-full/zh-cn \
    opera-$VERSION/fs/usr/share/opera/locale
    rm -rf opera-$VERSION/fs/usr/share/opera/locale-full
    rm -rf opera-$VERSION/fs/usr/share/pixmaps


    # Pack
    tazpkg pack opera-$VERSION

    # Clean to save RAM memory
    rm -rf opera-$VERSION

    # Install pseudo package
    tazpkg install opera-$VERSION.tazpkg --root=$ROOT

    # Clean
    cd $CUR_DIR
    rm -rf $TMP_DIR




    _________________________________________________________________

    Fagner Ab.Synth
    São Paulo



  • cangurucanguru April 2010
    vc pode usar o script q vem junto com o slitaz....get-opera

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social