mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
145 lines
6.2 KiB
Bash
145 lines
6.2 KiB
Bash
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
|
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
|
# Contributor: Ionut Biru <ibiru@archlinux.org>
|
|
# Contributor: Alexander Baldeck <alexander@archlinux.org>
|
|
# Contributor: Dale Blount <dale@archlinux.org>
|
|
# Contributor: Anders Bostrom <anders.bostrom@home.se>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - mozconfig changes for ARM
|
|
# - revert change for clang that breaks gcc build on ARM
|
|
|
|
buildarch=12
|
|
highmem=1
|
|
|
|
pkgname=thunderbird
|
|
pkgver=78.4.3
|
|
pkgrel=1
|
|
pkgdesc='Standalone mail and news reader from mozilla.org'
|
|
url='https://www.mozilla.org/thunderbird/'
|
|
arch=(x86_64)
|
|
license=(MPL GPL LGPL)
|
|
depends=(
|
|
glibc gtk3 libgdk-3.so mime-types dbus libdbus-1.so dbus-glib alsa-lib nss
|
|
hunspell sqlite ttf-font libvpx libvpx.so zlib bzip2 botan libwebp libevent
|
|
libjpeg-turbo libffi nspr gcc-libs libx11 libxrender libxfixes libxext
|
|
libxcomposite libxdamage pango libpango-1.0.so cairo gdk-pixbuf2 icu
|
|
libicui18n.so libicuuc.so freetype2 libfreetype.so fontconfig
|
|
libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg
|
|
)
|
|
makedepends=(
|
|
unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse
|
|
inetutils xorg-server-xvfb autoconf2.13 rust clang llvm gtk2 cbindgen nodejs
|
|
gawk perl findutils
|
|
)
|
|
optdepends=('libcanberra: sound support')
|
|
options=(!emptydirs !makeflags)
|
|
source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc}
|
|
thunderbird.desktop
|
|
vendor-prefs.js
|
|
distribution.ini
|
|
mozconfig.cfg
|
|
configure-fix-passing-system-bzip2-ldflags.patch
|
|
thunderbird-rust-1.47.patch::https://src.fedoraproject.org/rpms/thunderbird/raw/86967ddc206310ba7bb9eb57a933031909288ce2/f/rust-1.47.patch
|
|
thunderbird-78.4.3-gpgme-double-armored-fix.patch
|
|
arm.patch
|
|
Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch)
|
|
sha512sums=('0c441f5a55301f4d012caff111d6a882205048e4adf301ff3cfa553e1665e47a1fd835a926bd97c61e543a79465c5ada73ae699fc56425dec3dbc40f17b75620'
|
|
'SKIP'
|
|
'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012'
|
|
'6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734'
|
|
'5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f'
|
|
'71032d834e3e764b8aa44d0af5caab3a343adf6439e522a024d147fef9ea260ffbe28cfcc465b432601df3527074631c9458e1ca67316e7922c362fd54a85a8e'
|
|
'e3ed2708b8354015cb3d2c81048d1ce4932d1effbe2b40efa7cf9b45c1b923b9fd708645e2f8aa0136a485a3f7ce6b396b85721aaf535a4a764fd5005fb7e222'
|
|
'd337a77104d411df219f3ae1c7d136ae92f944a18969cc92e6257b4f909204677a58df43187d41f53d4c36c29f57f53bdbad90d8263e6a9b0781640944895cad'
|
|
'92f4c5946f288b30728382830b99b91980ecd845d1606ab251bbdde5cf53387e966727a23f35a3bf7756ee77e72e478f3fb468668e8c412f552547eeb3408299'
|
|
'c25883c4860e511a99d9fbfba5b824145c0862729101721605725f609ca2a41848b741dd100eff390f57031dc5f14af3ea30133de30f75cb20197c420ae20972'
|
|
'8ca4f72f1fc0a7fc128f05112d8f77be5350826010069ee3b787989131f02b82d014a4781e97ebe5694852c4bb5e87bb5313e562cfb7cb2afb6f904124027e13')
|
|
validpgpkeys=(14F26682D0916CDD81E37B6D61B7B526D98F0353) # Mozilla Software Releases <release@mozilla.com>
|
|
|
|
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
|
|
# Note: These are for Arch Linux use ONLY. For your own distribution, please
|
|
# get your own set of keys. Feel free to contact foutrelis@archlinux.org for
|
|
# more information.
|
|
_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
|
|
|
|
# Mozilla API keys (see https://location.services.mozilla.com/api)
|
|
# Note: These are for Arch Linux use ONLY. For your own distribution, please
|
|
# get your own set of keys. Feel free to contact heftig@archlinux.org for
|
|
# more information.
|
|
_mozilla_api_key=16674381-f021-49de-8622-3021c5942aff
|
|
|
|
prepare() {
|
|
cd $pkgname-$pkgver
|
|
|
|
local src
|
|
for src in "${source[@]}"; do
|
|
src="${src%%::*}"
|
|
src="${src##*/}"
|
|
[[ $src = *.patch ]] || continue
|
|
echo "Applying patch $src..."
|
|
patch -Np1 < "../$src"
|
|
done
|
|
|
|
printf "%s" "$_google_api_key" >google-api-key
|
|
printf "%s" "$_mozilla_api_key" >mozilla-api-key
|
|
cp ../mozconfig.cfg .mozconfig
|
|
sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig
|
|
|
|
if [[ $CARCH == "armv7h" ]]; then
|
|
echo "ac_add_options --disable-elf-hack" >> .mozconfig
|
|
MAKEFLAGS="-j2"
|
|
fi
|
|
|
|
echo 'ac_add_options --enable-optimize="-g0 -O2"' >> .mozconfig
|
|
echo "mk_add_options MOZ_MAKE_FLAGS=\"${MAKEFLAGS}\"" >> .mozconfig
|
|
|
|
export MOZ_DEBUG_FLAGS=" "
|
|
export CFLAGS+=" -g0"
|
|
export CXXFLAGS+=" -g0"
|
|
export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
|
|
export RUSTFLAGS="-Cdebuginfo=0"
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then
|
|
export MOZ_BUILD_DATE=$(date --date "@${SOURCE_DATE_EPOCH}" "%Y%m%d%H%M%S")
|
|
fi
|
|
./mach configure
|
|
./mach build
|
|
./mach buildsymbols
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver
|
|
DESTDIR="$pkgdir" ./mach install
|
|
|
|
install -Dm 644 ../vendor-prefs.js -t "$pkgdir/usr/lib/$pkgname/defaults/pref"
|
|
install -Dm 644 ../distribution.ini -t "$pkgdir/usr/lib/$pkgname/distribution"
|
|
install -Dm 644 ../thunderbird.desktop -t "$pkgdir/usr/share/applications"
|
|
|
|
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/$pkgname.png"
|
|
done
|
|
install -Dm644 comm/mail/branding/thunderbird/TB-symbolic.svg \
|
|
"$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg"
|
|
|
|
# Use system-provided dictionaries
|
|
ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries"
|
|
ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation"
|
|
|
|
# Install a wrapper to avoid confusion about binary path
|
|
install -Dm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <<END
|
|
#!/bin/sh
|
|
exec /usr/lib/$pkgname/thunderbird "\$@"
|
|
END
|
|
|
|
# Replace duplicate binary with wrapper
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
|
|
ln -srf "$pkgdir/usr/bin/$pkgname" \
|
|
"$pkgdir/usr/lib/$pkgname/thunderbird-bin"
|
|
}
|
|
|
|
# vim:set sw=2 et:
|