PKGBUILDs/extra/thunderbird/PKGBUILD
2016-03-20 18:40:30 +00:00

93 lines
3.3 KiB
Bash

# $Id$
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
# Contributor: Dale Blount <dale@archlinux.org>
# Contributor: Anders Bostrom <anders.bostrom@home.se>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - mozconfig changes for ARM
# - patch to remove NEON/SIMD checks from configure
# - memory saving LDFLAGS
# - enable calendar in mozconfig
# - disable jemalloc on aarch64
buildarch=28
highmem=1
pkgname=thunderbird
pkgver=38.7.0
pkgrel=1.1
pkgdesc="Standalone Mail/News reader"
arch=('i686' 'x86_64')
license=('MPL' 'GPL')
url="http://www.mozilla.org/thunderbird/"
depends=('gtk2' 'mozilla-common' 'libxt' 'startup-notification' 'mime-types'
'dbus-glib' 'alsa-lib' 'desktop-file-utils' 'hicolor-icon-theme'
'libvpx' 'icu' 'libevent' 'nss' 'hunspell' 'sqlite')
makedepends=('unzip' 'zip' 'python2' 'wireless_tools' 'yasm' 'mesa' 'libpulse')
optdepends=('libcanberra: for sound support')
install=thunderbird.install
source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.bz2
mozconfig
thunderbird.desktop
thunderbird-install-dir.patch
vendor.js
no-neon.patch)
options=('!emptydirs' '!makeflags')
sha256sums=('1bb4b24269d8ac5b76c48c09872a2e26f6507afede234cfb6255980b149273f1'
'1f5ce57ba5531d533f34407010cfa5bb0fe09f9f1d3ed859cafbc5283b3a63d9'
'3fba13d88aeb003ab0811ef739463858172ce0662a1c7d62835df3d83ddbb8fb'
'24599eab8862476744fe1619a9a53a5b8cdcab30b3fc5767512f31d3529bd05d'
'e4ea8e6788163d9f8db8f1f40023db3ea0a1358f9a4510169f2d4c4fe6a887ed'
'd46ac749f8be3250fa70a13cd67b5f9204bedf8ff8955d3a71e1b8b2f4f48382')
prepare() {
cd comm-esr${pkgver%%.*}
patch -Np1 -i ../thunderbird-install-dir.patch
patch -Np0 -i ../no-neon.patch
cp "$srcdir/mozconfig" .mozconfig
[[ $CARCH == "aarch64" ]] && echo "ac_add_options --disable-jemalloc" >> .mozconfig
# configure script misdetects the preprocessor without an optimization level
# https://bugs.archlinux.org/task/34644
sed -i '/ac_cpp=/s/$CPPFLAGS/& -O2/' mozilla/configure
}
build() {
cd comm-esr${pkgver%%.*}
export LDFLAGS="$LDFLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
export PYTHON="/usr/bin/python2"
make -f client.mk build
}
package() {
cd comm-esr${pkgver%%.*}
make -f client.mk DESTDIR="$pkgdir" install
install -Dm644 ../vendor.js "$pkgdir/usr/lib/thunderbird/defaults/preferences/vendor.js"
for i in 16 22 24 32 48 256; do
install -Dm644 other-licenses/branding/thunderbird/mailicon$i.png \
"$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/thunderbird.png"
done
install -Dm644 ../thunderbird.desktop \
"$pkgdir/usr/share/applications/thunderbird.desktop"
# Use system-provided dictionaries
rm -rf "$pkgdir"/usr/lib/thunderbird/{dictionaries,hyphenation}
ln -sf /usr/share/hunspell "$pkgdir/usr/lib/thunderbird/dictionaries"
ln -sf /usr/share/hyphen "$pkgdir/usr/lib/thunderbird/hyphenation"
# Replace duplicate binary with symlink
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
ln -sf thunderbird "$pkgdir/usr/lib/thunderbird/thunderbird-bin"
# Remove development stuff
rm -r "$pkgdir"/usr/{include,lib/thunderbird-devel-*,share/idl}
}