gtk/thunderbird-kde/PKGBUILD
2016-02-13 13:46:01 +00:00

90 lines
4.1 KiB
Bash

pkgname=thunderbird-kde
pkgver=38.6.0
pkgrel=1
provides=(thunderbird=${pkgver})
replaces=(thunderbird)
pkgdesc="Standalone Mail/News reader"
arch=('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' 'kdelibs'
'libvpx' 'icu' 'libevent' 'nss' 'hunspell' 'sqlite3' 'nspr' 'libnotify')
makedepends=('unzip' 'zip' 'python2' 'wireless_tools' 'yasm' 'mesa' 'libpulse'
'pkg-config' 'autoconf2.13' 'gst-plugins-base' 'xorg-server-xvfb')
optdepends=('thunderbird-i18n: for multilanguage support'
'libcanberra: for sound support')
install=thunderbird.install
# For patch look here: https://build.opensuse.org/package/show?project=openSUSE:Factory&package=MozillaThunderbird
source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.bz2
mozconfig
thunderbird.desktop
thunderbird-install-dir.patch
mozilla-kde.patch
mozilla-language.patch
mozilla-nongnome-proxies.patch
vendor.js
kde.js)
options=('!emptydirs' '!makeflags')
sha512sums=('9f6cb6b7c9b4935603333366a21cbb3e142fbdbded61adea44c39d45327207e1478d268fb721ee914ae1b0e762507f3665e40e1c315bd454fe1d019bd7972a08'
'5258d965d172411de04c47b8a230a9ced4905875066b26229dc03d56f5c691240e802b4cfaaf2e05e3a3ec8116122659b2c45a4128f6f2b948af206868b84b6a'
'057513bc1b2573f31986916dc905f2e1a165e7500fea51ce7cba1f9f600c0a74396d0d39283ec5ee76fb401133bc614ebcf803b5d15fadac46728d55e30353ea'
'c6f92f5cb0efeaa59a4c73cdd37543c91740cb74bf43d216c0ed8a7d6d759687af221fc9775247b00d9da7b754c9c9c9ad8c52b3b9d9f084619d7680d76ab4ec'
'63abe4802157a81f2c751c569f8c2d3edb71f121a792d39161c0002c47a5e1d4b0ede39b783dcea86074a944ddad55d3d29c85e2be33846dd3aac434f2c55d77'
'61411fa057442fe532e671984e03c2be42b5bad9e0db7b8c1a6065750224707309d9fb944edd850ddd27d3f9f36474f62c734c3007c5e86c6822fa68aca75c55'
'2b7b03697e3bf68681fd45eb06235c5f9145ad7f549a3291e0e62fa95e8b3de02a118b0562d50387ff174fbe23a9060f1c749a21cdd2ccb0f20680424f70587b'
'aeb444784732267f1b1e87e6084a776f82a1912c4c2637d2cf1de1c135dd9d41d2ef66d2bd3f9cbd3a79fad32d17ea6e2968ba644d5f887cb66ba6c09a2098f5'
'06696c5b3216fd38d546d743f61a2ac0bb215a01192e53da75b069095565c602ec5730b3f317de08e4bd3318c4e5642560e9bc25153a69e4b5442772edef8cd8')
prepare(){
cd comm-esr${pkgver%%.*}
patch -Np1 -i ../thunderbird-install-dir.patch
msg "Patching for KDE"
cd mozilla
patch -Np1 -i "$srcdir/mozilla-language.patch"
patch -Np1 -i "$srcdir/mozilla-nongnome-proxies.patch"
patch -Np1 -i "$srcdir/mozilla-kde.patch"
cd ..
cp "$srcdir/mozconfig" .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 PYTHON="/usr/bin/python2"
export SHELL="/bin/bash"
xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" \
make -f client.mk build MOZ_PGO=1
}
package() {
cd comm-esr${pkgver%%.*}
make -f client.mk DESTDIR="$pkgdir" install
install -Dm644 "$srcdir"/vendor.js "$pkgdir/usr/lib/thunderbird/defaults/preferences/vendor.js"
install -Dm644 "$srcdir"/kde.js "$pkgdir/usr/lib/thunderbird/defaults/preferences/kde.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 "$srcdir/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"
# Remove development stuff
rm -r "$pkgdir"/usr/{include,lib/thunderbird-devel-*,share/idl}
}