mirror of
https://gitdl.cn/https://github.com/chakralinux/gtk.git
synced 2025-01-24 01:42:13 +08:00
167 lines
5.7 KiB
Bash
167 lines
5.7 KiB
Bash
pkgname=thunderbird-kde
|
|
pkgver=60.3.1
|
|
pkgrel=1
|
|
provides=(thunderbird=${pkgver})
|
|
replaces=(thunderbird)
|
|
pkgdesc="Standalone Mail/News reader"
|
|
arch=('x86_64')
|
|
license=('MPL' 'GPL')
|
|
url="https://www.thunderbird.net/"
|
|
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' 'rust' 'clang' 'llvm')
|
|
optdepends=('thunderbird-i18n: for multilanguage support'
|
|
'libcanberra: for sound support')
|
|
options=(!emptydirs !makeflags)
|
|
source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz
|
|
thunderbird.desktop
|
|
mozilla-kde.patch
|
|
mozilla-nongnome-proxies.patch)
|
|
sha512sums=('d52a8acee19b0acaee3c23dd76aa966c7eb4b04ebefd0bc81305b6af6a90c25c6d60d7b64f5b94c2b53eeb548d5d0d903899a468f6c80726fe0079ec7c926a8c'
|
|
'057513bc1b2573f31986916dc905f2e1a165e7500fea51ce7cba1f9f600c0a74396d0d39283ec5ee76fb401133bc614ebcf803b5d15fadac46728d55e30353ea'
|
|
'ff742c82350bbb9ff89bd342208efa9de7dfdcfee1b9e16d3f07cb65169827a42c06c413caa1f59ce5c4146b10ca5889fe558bb78f35d27e1a9e7b82dc657fc4'
|
|
'2b7b03697e3bf68681fd45eb06235c5f9145ad7f549a3291e0e62fa95e8b3de02a118b0562d50387ff174fbe23a9060f1c749a21cdd2ccb0f20680424f70587b')
|
|
|
|
# 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
|
|
|
|
|
|
# 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
|
|
|
|
prepare(){
|
|
cd thunderbird-${pkgver}
|
|
|
|
echo -n "$_google_api_key" >google-api-key
|
|
echo -n "$_mozilla_api_key" >mozilla-api-key
|
|
|
|
msg 'Generating kde.js'
|
|
cat >kde.js <<END
|
|
pref("browser.preferences.instantApply", false);
|
|
END
|
|
|
|
cat >.mozconfig <<END
|
|
ac_add_options --enable-application=comm/mail
|
|
|
|
ac_add_options --prefix=/usr
|
|
ac_add_options --libdir=/usr/lib
|
|
ac_add_options --enable-release
|
|
ac_add_options --enable-linker=gold
|
|
ac_add_options --enable-hardening
|
|
ac_add_options --enable-optimize
|
|
ac_add_options --enable-rust-simd
|
|
ac_add_options --enable-default-toolkit=cairo-gtk3
|
|
|
|
# Keys
|
|
ac_add_options --with-google-api-keyfile=${PWD@Q}/google-api-key
|
|
ac_add_options --with-mozilla-api-keyfile=${PWD@Q}/mozilla-api-key
|
|
|
|
# System libraries
|
|
ac_add_options --with-system-nspr
|
|
ac_add_options --with-system-nss
|
|
ac_add_options --with-system-jpeg
|
|
ac_add_options --with-system-zlib
|
|
ac_add_options --with-system-bz2
|
|
ac_add_options --with-system-png
|
|
ac_add_options --with-system-libevent
|
|
ac_add_options --with-system-libvpx
|
|
# our icu is too old
|
|
#ac_add_options --with-system-icu
|
|
ac_add_options --enable-system-hunspell
|
|
ac_add_options --enable-system-sqlite
|
|
ac_add_options --enable-system-ffi
|
|
|
|
# Features
|
|
ac_add_options --enable-official-branding
|
|
ac_add_options --enable-update-channel=release
|
|
ac_add_options --with-distribution-id=org.chakralinux
|
|
ac_add_options --enable-startup-notification
|
|
ac_add_options --enable-calendar
|
|
|
|
ac_add_options --disable-gconf
|
|
ac_add_options --disable-crashreporter
|
|
ac_add_options --disable-updater
|
|
ac_add_options --disable-tests
|
|
ac_add_options --disable-debug-symbols
|
|
|
|
export MOZILLA_OFFICIAL=1
|
|
mk_add_options MOZILLA_OFFICIAL=1
|
|
END
|
|
|
|
msg "Patching for KDE"
|
|
patch -Np1 -i "$srcdir/mozilla-nongnome-proxies.patch"
|
|
patch -Np1 -i "$srcdir/mozilla-kde.patch"
|
|
|
|
mkdir "$srcdir/path"
|
|
ln -s /usr/bin/python2 "$srcdir/path/python"
|
|
}
|
|
|
|
build() {
|
|
cd thunderbird-${pkgver}
|
|
|
|
export PYTHON="/usr/bin/python2"
|
|
export SHELL="/bin/bash"
|
|
|
|
./mach configure
|
|
./mach build
|
|
./mach buildsymbols
|
|
}
|
|
|
|
package() {
|
|
cd thunderbird-${pkgver}
|
|
DESTDIR="$pkgdir" ./mach install
|
|
|
|
_vendorjs="$pkgdir/usr/lib/thunderbird/defaults/preferences/vendor.js"
|
|
install -Dm644 /dev/stdin "$_vendorjs"<<END
|
|
// Use LANG environment variable to choose locale
|
|
pref("intl.locale.requested", "");
|
|
|
|
// Disable default mailer checking.
|
|
pref("mail.shell.checkDefaultMail", false);
|
|
|
|
// Don't disable our bundled extensions in the application directory
|
|
pref("extensions.autoDisableScopes", 11);
|
|
pref("extensions.shownSelectionUI", true);
|
|
END
|
|
|
|
install -Dm644 kde.js "$pkgdir/usr/lib/thunderbird/defaults/preferences/kde.js"
|
|
|
|
_distini="$pkgdir/usr/lib/thunderbird/distribution/distribution.ini"
|
|
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 64 128 256; do
|
|
install -Dm644 comm/mail/branding/thunderbird/default${i}.png \
|
|
"$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/thunderbird.png"
|
|
done
|
|
|
|
install -Dm644 comm/mail/branding/thunderbird/TB-symbolic.svg \
|
|
"$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg"
|
|
|
|
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"
|
|
}
|