SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "firefox-official"

# SliTaz package receipt.

PACKAGE="firefox-official"
VERSION="102.15.1esr"
CATEGORY="network"
TAGS="web-browser"
SHORT_DESC="Official Firefox build by the Mozilla foundation (English language)."
MAINTAINER="al.bobylev@gmail.com"
LICENSE="MPL2"
WEB_SITE="https://www.mozilla.org/firefox"

TARBALL="firefox-$VERSION.tar.bz2"

case $SLITAZ_ARCH in
    i?86)
        WGET_URL="http://ftp.mozilla.org/pub/firefox/releases/$VERSION/linux-i686/en-US/$TARBALL" ;;
    x86_64)
        VERSION="128.8.0esr"
        TARBALL="firefox-$VERSION.tar.bz2"
        WGET_URL="http://ftp.mozilla.org/pub/firefox/releases/$VERSION/linux-x86_64/en-US/$TARBALL" ;;        
esac

PROVIDE="browser-html5"
SUGGESTED="vlc"
DEPENDS="adwaita-icon-theme librsvg alsa-lib dbus-glib gtk+ gtk+3 libatomic xorg-libXt libwrap"

CONFIG_FILES="/opt/mozilla/firefox/distribution/policies.json"

HOST_ARCH="i486 x86_64"

# What is the latest version available today?
current_version()
{
    wget -O - http://ftp.mozilla.org/pub/firefox/releases/ 2>/dev/null | \
    sed '/releases\/[0-9]/!d;s|.*releases/||;s|/.*||' | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    # Installation path
    fx='/opt/mozilla/firefox'

    mkdir -p $install$fx/distribution
    mkdir -p $install/usr/bin
    mkdir -p $install/usr/share/applications
    mkdir -p $install/usr/share/icons/hicolor/128x128/apps

    # Copy everything
    cp -a $src/*        $install$fx

    # Executable
    ln -s $fx/firefox    $install/usr/bin/firefox-official

    # Icons
    ln -s $fx/browser/icons/mozicon128.png \
        $install/usr/share/icons/hicolor/128x128/apps/firefox-official.png
    for size in 16 32 48
      do
        icon_folder="$install/usr/share/icons/hicolor/${size}x$size/apps"
        mkdir -p $icon_folder
        ln -s $fx/browser/chrome/icons/default/default$size.png \
            $icon_folder/firefox-official.png
      done

    # Allow user updates (save user's and our traffic)
    case $SLITAZ_ARCH in
        x86_64)
            chmod -R a+w $install$fx ;;
    esac

    # Desktop shortcut
    cp $stuff/firefox-official.desktop \
        $install/usr/share/applications
    cp $stuff/firefox-official-private.desktop \
        $install/usr/share/applications
    cp $stuff/firefox-official-safe.desktop \
        $install/usr/share/applications

    # Disable update
    case $SLITAZ_ARCH in
        i?86|x86_64)
            cp $stuff/policies.json    $install$fx/distribution ;;
    esac
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    cp -a $install/*    $fs
    ln -s firefox-official    $fs/usr/bin/browser-html5
}
6088 packages and 256128 files in current database (Wed Mar 5 09:18:31 2025)