pkgname=thunderbird-kde pkgver=45.7.1 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' 'kio' 'knotifications' 'libvpx' 'icu' 'libevent' 'nss' 'hunspell' 'sqlite3' 'nspr' 'libnotify') makedepends=('unzip' 'zip' 'python2' 'wireless_tools' 'yasm' 'mesa' 'libpulse' 'pkg-config' 'gconf' 'xorg-server-xvfb') optdepends=('thunderbird-i18n: for multilanguage support' 'libcanberra: for sound support') install=thunderbird.install # For patch look here: https://github.com/manjaro/packages-community/tree/master/thunderbird-kde source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz mozconfig thunderbird.desktop thunderbird-install-dir.patch mozilla-kde.patch mozilla-language.patch mozilla-nongnome-proxies.patch vendor.js kde.js) sha512sums=('aa1231169cfe243a257e6b9088281b85d0cf75207e3b9ebeda7792567a86f6098fb5c74dc397e3eeeb1925d221d2fb1b17df8762afd115eff9ad4d1370a49e56' 'b1ce9468e0635686a60b0db920cbde784e1998d7a401c4f1ea97e0a5f10984d18f6d64def3cf86759706d3841e414b01d66f61b4a85df02edb753917d17e56a6' '057513bc1b2573f31986916dc905f2e1a165e7500fea51ce7cba1f9f600c0a74396d0d39283ec5ee76fb401133bc614ebcf803b5d15fadac46728d55e30353ea' '1eecdc7942ac189a67d4d57bca305937ae8d5986944738139bad4baa47e5a9c904797db6a26840d559740178fb6e1904a2d5377c86a7d0f8a6b721471ef37d75' 'cf381cb6bfd1eb1fc7ec1a919cec48070c1e3daf14923884e53fb704742275e73dde8a72fc67c56b1660a9e65e67cee9a71638df4cb80105f368c5fb840c0a7d' '61411fa057442fe532e671984e03c2be42b5bad9e0db7b8c1a6065750224707309d9fb944edd850ddd27d3f9f36474f62c734c3007c5e86c6822fa68aca75c55' '2b7b03697e3bf68681fd45eb06235c5f9145ad7f549a3291e0e62fa95e8b3de02a118b0562d50387ff174fbe23a9060f1c749a21cdd2ccb0f20680424f70587b' 'aeb444784732267f1b1e87e6084a776f82a1912c4c2637d2cf1de1c135dd9d41d2ef66d2bd3f9cbd3a79fad32d17ea6e2968ba644d5f887cb66ba6c09a2098f5' '06696c5b3216fd38d546d743f61a2ac0bb215a01192e53da75b069095565c602ec5730b3f317de08e4bd3318c4e5642560e9bc25153a69e4b5442772edef8cd8') # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) # Note: These are for Chakra Linux use ONLY. For your own distribution, please # get your own set of keys. _google_api_key=AIzaSyA33sdKPff0x3KBByOhpzc1i7RS2A1mEpY prepare(){ cd thunderbird-${pkgver} cp "$srcdir/mozconfig" .mozconfig patch -Np2 -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 .. # fix GTK3 sed -i 's|parent->group|gtk_window_get_group(const_cast(parent))|g' mozilla/toolkit/xre/nsKDEUtils.cpp echo -n "$_google_api_key" > google-api-key echo "ac_add_options --with-google-api-keyfile=\"$PWD/google-api-key\"" >>.mozconfig mkdir "$srcdir/path" ln -s /usr/bin/python2 "$srcdir/path/python" # 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 thunderbird-${pkgver} export PYTHON="/usr/bin/python2" export SHELL="/bin/bash" xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" \ make -f client.mk profiledbuild } package() { cd thunderbird-${pkgver} make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= 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 -s /usr/share/hunspell "$pkgdir/usr/lib/thunderbird/dictionaries" ln -s /usr/share/hyphen "$pkgdir/usr/lib/thunderbird/hyphenation" ln -sf thunderbird "$pkgdir/usr/lib/thunderbird/thunderbird-bin" }