pkgname=thunderbird-kde pkgver=38.4.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') md5sums=('483373b1485cf2edea77c75a69602870' 'a99c6bf3dcb1d419bed0285187fe90f9' 'c883f4e5cafcd3cde8cf5cb417836737' '3423528b295675ea216282b3f4f919a6' 'e254c185fb9f637512321c8d35b1acb2' 'c3cfc76e2ba30a7244510f244b6b5748' '5b786bc0f2e998d201f53fd307bc573f' '5a53179d14ae9631b7afe5e4d0fc0b25' '75df0f88cc7a7fa7d522459e4ff82cc5') 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} }