#Packager: Dimitris Tzemos # pkgname=mozilla-thunderbird #pkgver=128.0.1esr pkgver=${pkgver:-$(wget --spider -S --max-redirect 0 "https://download.mozilla.org/?product=thunderbird-128.1.0esr&os=linux${LIBDIRSUFFIX}&lang=en-US" 2>&1 | sed -n '/Location: /{s|.*/thunderbird-\(.*\)\.tar.*|\1|p;q;}')} #pkgver=${pkgver:-$(wget --spider -S --max-redirect 0 "https://download.mozilla.org/?product=thunderbird-latest&os=linux${LIBDIRSUFFIX}&lang=en-US" 2>&1 | sed -n '/Location: /{s|.*/thunderbird-\(.*\)\.tar.*|\1|p;q;}')} #_majorver=`echo $pkgver | sed "s/\(.*\)\.\(.*\)\.\(.*\)esr/\1esr/"` #_majorver=$pkgver pkgrel=2dj arch=${arch:-x86_64} source=("https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-$arch/en-US/thunderbird-$pkgver.tar.bz2" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/ar.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/bg.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/cs.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/da.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/de.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/en-US.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/en-GB.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/el.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/es-AR.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/es-ES.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/et.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/fi.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/fr.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/hr.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/hu.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/id.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/it.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/ja.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/ko.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/lt.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/nb-NO.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/nn-NO.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/nl.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/pl.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/pt-BR.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/pt-PT.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/ro.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/ru.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/sk.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/sl.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/sr.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/sv-SE.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/tr.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/uk.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/vi.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/zh-CN.xpi" "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi/zh-TW.xpi" "mozilla-thunderbird.desktop" "langpacks.js") docs=("readme.txt" "install" "copying" "changelog" "authors" "news" "todo") options=('noextract') doinst() { # update the mime desktop database if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q fi # update the mime database if [ -x /usr/bin/update-mime-database ]; then /usr/bin/update-mime-database usr/share/mime > /dev/null 2>&1 fi } slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "mozilla-thunderbird (Mozilla Thunderbird mail application)" "" "Mozilla Thunderbird is a redesign of the Mozilla mail component" "written using the XUL user interface language. Thunderbird makes" "emailing safer, faster, and easier than ever before with the" "industry's best implementations of features such as intelligent spam" "filters, built-in RSS reader, quick search, and much more." "" "Visit the Mozilla Thunderbird project online:" " https://www.mozilla.org/projects/thunderbird/" ) build() { MOZ_ALLOW_DOWNGRADE=${MOZ_ALLOW_DOWNGRADE:-YES} # extract the thunderbird tarball cd $startdir/src tar xf thunderbird-$pkgver.tar.bz2 cd $startdir/src/thunderbird mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/thunderbird cp -R ./* $startdir/pkg/usr/lib${LIBDIRSUFFIX}/thunderbird/ mkdir -p $startdir/pkg/usr/bin mkdir -p $startdir/pkg/usr/share/applications # fix mozilla-thunderbird.desktop sed "/Encoding/d;s:/usr/share/pixmaps/thunderbird.png:thunderbird:" $startdir/src/mozilla-thunderbird.desktop > $startdir/src/thunderbird.desktop mv $startdir/src/thunderbird.desktop $startdir/pkg/usr/share/applications/mozilla-thunderbird.desktop mkdir -p $startdir/pkg/usr/share/icons/hicolor/{16x16,22x22,24x24,32x32,48x48,128x128}/apps cp $startdir/src/thunderbird/chrome/icons/default/default16.png $startdir/pkg/usr/share/icons/hicolor/16x16/apps/thunderbird.png cp $startdir/src/thunderbird/chrome/icons/default/default22.png $startdir/pkg/usr/share/icons/hicolor/22x22/apps/thunderbird.png cp $startdir/src/thunderbird/chrome/icons/default/default24.png $startdir/pkg/usr/share/icons/hicolor/24x24/apps/thunderbird.png cp $startdir/src/thunderbird/chrome/icons/default/default32.png $startdir/pkg/usr/share/icons/hicolor/32x32/apps/thunderbird.png cp $startdir/src/thunderbird/chrome/icons/default/default48.png $startdir/pkg/usr/share/icons/hicolor/48x48/apps/thunderbird.png cp $startdir/src/thunderbird/chrome/icons/default/default128.png $startdir/pkg/usr/share/icons/hicolor/128x128/apps/thunderbird.png cp $startdir/src/langpacks.js $startdir/pkg/usr/lib${LIBDIRSUFFIX}/thunderbird/defaults/pref/ # locales for locale in `basename -a -s ".xpi" $startdir/src/*.xpi`; do mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/thunderbird/distribution/extensions/ cp $startdir/src/${locale}.xpi $startdir/pkg/usr/lib${LIBDIRSUFFIX}/thunderbird/distribution/extensions/langpack-${locale}\@thunderbird.mozilla.org.xpi done # If MOZ_ALLOW_DOWNGRADE=YES, replace the /usr/bin/thunderbird symlink with a # shell script that sets the MOZ_ALLOW_DOWNGRADE=1 environment variable so # that a detected downgrade does not reset the user profile: if [ "$MOZ_ALLOW_DOWNGRADE" = "YES" ]; then rm -f $startdir/pkg/usr/bin/thunderbird cat << EOF > $startdir/pkg/usr/bin/thunderbird #!/bin/sh # # Shell script to start Mozilla Thunderbird. # # Don't reset the user profile on a detected downgrade: export MOZ_ALLOW_DOWNGRADE=1 # Start Thunderbird: exec /usr/lib${LIBDIRSUFFIX}/thunderbird/thunderbird "\$@" EOF chown root:root $startdir/pkg/usr/bin/thunderbird chmod 755 $startdir/pkg/usr/bin/thunderbird fi # Fix duplicate binary, httpss://bugzilla.mozilla.org/show_bug.cgi?id=658850 ( cd $startdir/pkg/usr/lib$LIBDIRSUFFIX/thunderbird if cmp thunderbird thunderbird-bin ; then ln -sf thunderbird-bin thunderbird fi ) mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/mozilla/plugins ( cd $startdir/pkg/usr/lib${LIBDIRSUFFIX}/thunderbird ln -s ../mozilla/plugins plugins ) }