gtk/thunderbird-kde/PKGBUILD

133 lines
5.5 KiB
Bash
Raw Normal View History

pkgname=thunderbird-kde
pkgver=52.0.1
pkgrel=1
provides=(thunderbird=${pkgver})
replaces=(thunderbird)
2013-04-28 16:58:07 +08:00
pkgdesc="Standalone Mail/News reader"
arch=('x86_64')
license=('MPL' 'GPL')
url="http://www.mozilla.org/thunderbird/"
depends=('gtk3' 'gtk2' 'mozilla-common' 'libxt' 'startup-notification' 'mime-types'
'dbus-glib' 'libpulse' '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' 'autoconf2.13' 'cargo')
2013-05-07 05:21:43 +08:00
optdepends=('thunderbird-i18n: for multilanguage support'
'libcanberra: for sound support')
2017-04-08 22:02:47 +08:00
options=(!emptydirs !makeflags)
2013-04-28 16:58:07 +08:00
install=thunderbird.install
2016-04-21 20:17:52 +08:00
# 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
2013-04-28 16:58:07 +08:00
mozconfig
thunderbird.desktop
thunderbird-install-dir.patch
mozilla-kde.patch
mozilla-language.patch
mozilla-nongnome-proxies.patch
fix-wifi-scanner.diff
vendor.js
kde.js)
sha512sums=('7b8324a230a10b738b9a28c31b195bfb149b1f47eec6662d93a7d0c424d56303dbc2bca6645b30323c6da86628d6e49de359e1067081a5d0bd66541174a8be48'
2017-04-08 22:02:47 +08:00
'e67c9bf97d73b95dbe31a2bba2dd8ae3d7413a8d3cd728f2b321cf222e4b1490d1ccf804634e4549911603e23850b0db52f524450b487a151c4ab2e992c7e350'
'057513bc1b2573f31986916dc905f2e1a165e7500fea51ce7cba1f9f600c0a74396d0d39283ec5ee76fb401133bc614ebcf803b5d15fadac46728d55e30353ea'
2016-04-22 00:41:47 +08:00
'1eecdc7942ac189a67d4d57bca305937ae8d5986944738139bad4baa47e5a9c904797db6a26840d559740178fb6e1904a2d5377c86a7d0f8a6b721471ef37d75'
'04bc673d5cd0c9b3b28ac7f5cb463a8da9d4f527df1518862dca61cfba76f1afc51946d21a8aafa0d1d7ad81a30819df0c949ac849bf09ae28dec17a44a353bd'
2017-04-08 22:02:47 +08:00
'001776b5b332c526adeee9ef338a0f589e3f2c1b3eb3c1ece5aaae91637a50f821b830e717ea646f136ccfb121d28d83d28abfe65b57f3aa5784d0e79f8dfaf4'
'2b7b03697e3bf68681fd45eb06235c5f9145ad7f549a3291e0e62fa95e8b3de02a118b0562d50387ff174fbe23a9060f1c749a21cdd2ccb0f20680424f70587b'
'1bd2804bea1fe8c85b602f8c5f8777f4ba470c9e767ad284cb3d0287c6d6e1b126e760738d7c671f38933ee3ec6b8931186df8e978995b5109797ae86dfdd85a'
'aeb444784732267f1b1e87e6084a776f82a1912c4c2637d2cf1de1c135dd9d41d2ef66d2bd3f9cbd3a79fad32d17ea6e2968ba644d5f887cb66ba6c09a2098f5'
'06696c5b3216fd38d546d743f61a2ac0bb215a01192e53da75b069095565c602ec5730b3f317de08e4bd3318c4e5642560e9bc25153a69e4b5442772edef8cd8')
2016-04-21 20:17:52 +08:00
# 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
2017-04-08 22:02:47 +08:00
# Mozilla API keys (see https://location.services.mozilla.com/api)
# Note: These are for Chakra Linux use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact totte@chakralinux.org for
# more information.
_mozilla_api_key=bf05f841-e0bd-4644-81f5-3c132755f2e9
2013-12-21 17:08:26 +08:00
prepare(){
2016-04-21 20:17:52 +08:00
cd thunderbird-${pkgver}
cp "$srcdir/mozconfig" .mozconfig
2016-04-22 00:41:47 +08:00
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 ..
2016-04-21 20:17:52 +08:00
# https://bugzilla.mozilla.org/show_bug.cgi?id=1314968
patch -d mozilla -Np1 < ../fix-wifi-scanner.diff
2016-04-21 20:17:52 +08:00
echo -n "$_google_api_key" > google-api-key
echo "ac_add_options --with-google-api-keyfile=\"$PWD/google-api-key\"" >>.mozconfig
2017-04-08 22:02:47 +08:00
echo -n "$_mozilla_api_key" > mozilla-api-key
echo "ac_add_options --with-mozilla-api-keyfile=\"$PWD/mozilla-api-key\"" >>.mozconfig
2016-04-21 20:17:52 +08:00
mkdir "$srcdir/path"
ln -s /usr/bin/python2 "$srcdir/path/python"
2013-12-21 17:08:26 +08:00
}
build() {
2016-04-21 20:17:52 +08:00
cd thunderbird-${pkgver}
2017-04-08 22:02:47 +08:00
# _FORTIFY_SOURCE causes configure failures
CPPFLAGS+=" -O2"
# Hardening
LDFLAGS+=" -Wl,-z,now"
# GCC 6
# CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
2013-04-28 16:58:07 +08:00
export PYTHON="/usr/bin/python2"
export SHELL="/bin/bash"
2013-12-21 17:08:26 +08:00
#xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" \
# make -f client.mk profiledbuild
2017-04-08 22:02:47 +08:00
make -f client.mk build
2013-04-28 16:58:07 +08:00
}
package() {
2016-04-21 20:17:52 +08:00
cd thunderbird-${pkgver}
2016-04-22 00:41:47 +08:00
make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install
2013-04-28 16:58:07 +08:00
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"
2013-04-28 16:58:07 +08:00
2017-04-09 08:43:09 +08:00
_distini="$pkgdir/usr/lib/thunderbird/distribution/distribution.ini"
2017-04-08 22:02:47 +08:00
install -Dm644 /dev/stdin "$_distini" <<END
[Global]
id=chakralinux
version=1.0
about=Mozilla Thunderbird for Chakra GNU/Linux
[Preferences]
app.distributor=chakralinux
app.distributor.channel=${pkgname%-kde}
app.partner.chakralinux=chakralinux
END
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-04-28 16:58:07 +08:00
done
install -Dm644 "$srcdir/thunderbird.desktop" \
"$pkgdir/usr/share/applications/thunderbird.desktop"
2013-04-29 06:28:45 +08:00
# Use system-provided dictionaries
rm -rf "$pkgdir"/usr/lib/thunderbird/{dictionaries,hyphenation}
2016-04-21 20:17:52 +08:00
ln -s /usr/share/hunspell "$pkgdir/usr/lib/thunderbird/dictionaries"
ln -s /usr/share/hyphen "$pkgdir/usr/lib/thunderbird/hyphenation"
2016-04-22 00:41:47 +08:00
ln -sf thunderbird "$pkgdir/usr/lib/thunderbird/thunderbird-bin"
2013-04-28 16:58:07 +08:00
}