PKGBUILDs/extra/thunderbird/PKGBUILD

134 lines
5.1 KiB
Bash
Raw Normal View History

2013-06-25 16:41:43 +00:00
# $Id$
2016-04-19 18:51:04 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
2013-06-25 16:41:43 +00:00
# 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
2014-02-17 03:33:58 +00:00
# - patch to remove NEON/SIMD checks from configure
# - memory saving LDFLAGS
2016-03-20 18:40:30 +00:00
# - disable jemalloc on aarch64
2013-06-25 16:41:43 +00:00
2015-08-09 00:02:50 +00:00
buildarch=28
2015-12-16 03:09:15 +00:00
highmem=1
2013-06-25 16:41:43 +00:00
pkgname=thunderbird
2016-05-15 01:30:35 +00:00
pkgver=45.1.0
2016-05-15 14:54:52 +00:00
pkgrel=2
2016-04-19 18:51:04 +00:00
pkgdesc="Standalone mail and news reader from mozilla.org"
2013-06-25 16:41:43 +00:00
arch=('i686' 'x86_64')
2016-05-15 01:30:35 +00:00
license=('MPL' 'GPL' 'LGPL')
2013-06-25 16:41:43 +00:00
url="http://www.mozilla.org/thunderbird/"
2015-06-12 00:36:35 +00:00
depends=('gtk2' 'mozilla-common' 'libxt' 'startup-notification' 'mime-types'
2016-05-15 01:30:35 +00:00
'dbus-glib' 'alsa-lib' 'libvpx' 'icu' 'libevent' 'nss' 'hunspell'
'sqlite' 'ttf-font')
2016-04-19 18:51:04 +00:00
makedepends=('unzip' 'zip' 'diffutils' 'python2' 'yasm' 'mesa' 'imake' 'gconf'
'libpulse' 'inetutils')
2013-06-25 16:41:43 +00:00
optdepends=('libcanberra: for sound support')
2016-04-19 18:51:04 +00:00
options=('!emptydirs' '!makeflags')
source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz
2013-06-25 16:41:43 +00:00
mozconfig
thunderbird.desktop
thunderbird-install-dir.patch
2016-05-15 01:30:35 +00:00
firefox-gcc-6.0.patch mozilla-1228540.patch mozilla-1228540-1.patch
2014-02-17 03:33:58 +00:00
vendor.js
no-neon.patch)
2015-06-12 00:36:35 +00:00
options=('!emptydirs' '!makeflags')
2016-05-15 01:30:35 +00:00
sha256sums=('8ae9ebe536895d69d99f412f2b3aba645b7dd839e520959330da13892d672309'
'e6ab613a6d15668ac6856b591d07efa4a338671dad4ce09e9254662848462ee5'
2015-04-04 14:54:35 +00:00
'3fba13d88aeb003ab0811ef739463858172ce0662a1c7d62835df3d83ddbb8fb'
2015-06-12 01:09:39 +00:00
'24599eab8862476744fe1619a9a53a5b8cdcab30b3fc5767512f31d3529bd05d'
2016-05-15 01:30:35 +00:00
'4d1e1ddabc9e975ed39f49e134559a29e01cd49439e358233f1ede43bf5a52bf'
'2588c567fec88b44b65f0cd111e8769361c138d4c964310684f7bb80066f8f9f'
'd1ccbaf0973615c57f7893355e5cd3a89efb4e91071d0ec376e429b50cf6ed19'
2016-05-15 14:54:52 +00:00
'8f9ee921896b939e36d089c8ff544bc2b0a8b56dd5a2b4f5e75a19a6e1849284'
2016-04-19 18:51:04 +00:00
'59f40d8b2480aa67bf76f4f119826b6828a6a59cc040caf1ab5a6e19eef44c6e')
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact foutrelis@archlinux.org for
# more information.
_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
_google_default_client_id=413772536636.apps.googleusercontent.com
_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
# Mozilla API keys (see https://location.services.mozilla.com/api)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact heftig@archlinux.org for
# more information.
_mozilla_api_key=16674381-f021-49de-8622-3021c5942aff
2013-06-25 16:41:43 +00:00
prepare() {
2016-04-19 18:51:04 +00:00
cd $pkgname-$pkgver
cp ../mozconfig .mozconfig
2015-04-21 12:07:18 +00:00
patch -Np1 -i ../thunderbird-install-dir.patch
2013-06-25 16:41:43 +00:00
2016-05-15 01:30:35 +00:00
# Required for GCC 6
patch -d mozilla -Np1 < ../firefox-gcc-6.0.patch
patch -d mozilla -Np1 < ../mozilla-1228540.patch
patch -d mozilla -Np1 < ../mozilla-1228540-1.patch
2014-02-17 03:33:58 +00:00
patch -Np0 -i ../no-neon.patch
2016-04-19 18:51:04 +00:00
echo -n "$_google_api_key" >google-api-key
echo "ac_add_options --with-google-api-keyfile=\"$PWD/google-api-key\"" >>.mozconfig
echo -n "$_google_default_client_id $_google_default_client_secret" >google-oauth-api-key
echo "ac_add_options --with-google-oauth-api-keyfile=\"$PWD/google-oauth-api-key\"" >>.mozconfig
echo -n "$_mozilla_api_key" >mozilla-api-key
echo "ac_add_options --with-mozilla-api-keyfile=\"$PWD/mozilla-api-key\"" >>.mozconfig
mkdir "$srcdir/path"
ln -s /usr/bin/python2 "$srcdir/path/python"
2013-06-25 16:41:43 +00:00
2016-05-15 02:10:06 +00:00
if [[ $CARCH == "aarch64" ]]; then
echo "ac_add_options --disable-jemalloc" >> .mozconfig
echo 'ac_add_options --enable-optimize="-O2"' >> .mozconfig
fi
2013-06-25 16:41:43 +00:00
}
build() {
2016-04-19 18:51:04 +00:00
cd $pkgname-$pkgver
2016-05-15 01:30:35 +00:00
# _FORTIFY_SOURCE causes configure failures
CPPFLAGS+=" -O2"
# GCC 6
CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse"
CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse"
2016-04-19 18:51:04 +00:00
export PATH="$srcdir/path:$PATH"
export LDFLAGS="$LDFLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
2013-06-25 16:41:43 +00:00
2015-06-12 00:36:35 +00:00
make -f client.mk build
2013-06-25 16:41:43 +00:00
}
package() {
2016-04-19 18:51:04 +00:00
cd $pkgname-$pkgver
make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install
2013-06-25 16:41:43 +00:00
2015-06-12 00:36:35 +00:00
install -Dm644 ../vendor.js "$pkgdir/usr/lib/thunderbird/defaults/preferences/vendor.js"
2013-06-25 16:41:43 +00:00
2015-06-12 00:36:35 +00:00
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"
2013-06-25 16:41:43 +00:00
done
2015-06-12 00:36:35 +00:00
install -Dm644 ../thunderbird.desktop \
2013-06-25 16:41:43 +00:00
"$pkgdir/usr/share/applications/thunderbird.desktop"
2015-06-12 00:36:35 +00:00
# Use system-provided dictionaries
2013-06-25 16:41:43 +00:00
rm -rf "$pkgdir"/usr/lib/thunderbird/{dictionaries,hyphenation}
2016-04-19 18:51:04 +00:00
ln -s /usr/share/hunspell "$pkgdir/usr/lib/thunderbird/dictionaries"
ln -s /usr/share/hyphen "$pkgdir/usr/lib/thunderbird/hyphenation"
2013-06-25 16:41:43 +00:00
2015-08-15 03:29:26 +00:00
# Replace duplicate binary with symlink
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
ln -sf thunderbird "$pkgdir/usr/lib/thunderbird/thunderbird-bin"
2013-06-25 16:41:43 +00:00
}