# Description: Mozilla Thunderbird binary version
# URL: https://www.thunderbird.net/
# Maintainer: Matt Housh, jaeger at crux dot ninja
# Depends on: gtk3 dbus-glib alsa-lib

name=thunderbird-bin
version=115.9.0
release=1
source=(https://ftp.mozilla.org/pub/thunderbird/releases/$version/linux-x86_64/en-US/thunderbird-$version.tar.bz2
    policies.json thunderbird.desktop)

build() {
    cd thunderbird

    install -d $PKG/usr/{lib,bin}
    mv $SRC/thunderbird $PKG/usr/lib/thunderbird
    ln -s /usr/lib/thunderbird/thunderbird $PKG/usr/bin/thunderbird

    # Disable autoupdate
    install -d $PKG/usr/lib/thunderbird/distribution
    install -m644 $SRC/policies.json $PKG/usr/lib/thunderbird/distribution/

    install -d  $PKG/etc/revdep.d
    echo "/usr/lib/thunderbird" > $PKG/etc/revdep.d/thunderbird-bin

    install -m 0755 -d $PKG/usr/share/pixmaps
    ln -s /usr/lib/thunderbird/chrome/icons/default/default32.png \
        $PKG/usr/share/pixmaps/thunderbird.png

    install -m 0644 -D $SRC/thunderbird.desktop \
        $PKG/usr/share/applications/thunderbird.desktop
}

# vim: set ts=4 et:
