123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- # Maintainer (arch:thunderbird): 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>
- # Maintainer: Andreas Grapentin <andreas@grapentin.org>
- # Contributor: André Silva <emulatorman@hyperbola.info>
- # Contributor: Márcio Silva <coadde@hyperbola.info>
- # Contributor: Luke R. <g4jc@openmailbox.org>
- # Contributor: Isaac David <isacdaavid@isacdaavid.info>
- # Contributor: bill-auger <bill-auger@programmer.net>
- # parabola changes and rationale:
- # libre:
- # - rebranded to icedove
- # technical:
- # - added i686 and armv7h arches (TODO)
- # - added makedepends required for rebranding
- # - added rebranding sources
- # - use system python packages
- # privacy:
- # - removed google api keys
- # - disabled geo-location
- # nonprism:
- # - removed nonfree search engines
- # - removed support for insecure chat protocols
- _pkgbase=thunderbird
- pkgbase=icedove
- pkgname=(icedove)
- epoch=1
- pkgver=115.11.0
- pkgrel=4
- pkgrel+=.parabola1.nonprism1
- _brandingver=115
- _brandingrel=1
- pkgdesc='Standalone mail and news reader from mozilla.org'
- pkgdesc+=', without support for unsafe for privacy protocols'
- url=https://wiki.parabola.nu/${pkgname}
- replaces=(${_pkgbase})
- arch=(x86_64)
- arch+=(i686 armv7h)
- license=('MPL-2.0' 'GPL-2.0-only' 'LGPL-2.1-only')
- depends=(
- glibc
- gtk3 libgdk-3.so libgtk-3.so
- mime-types
- dbus libdbus-1.so
- dbus-glib
- alsa-lib
- nss
- hunspell
- sqlite
- ttf-font
- libvpx libvpx.so
- zlib
- bzip2 libbz2.so
- botan2
- libwebp libwebp.so libwebpdemux.so
- libevent
- libjpeg-turbo
- libffi libffi.so
- nspr
- gcc-libs
- libx11
- libxrender
- libxfixes
- libxext
- libxcomposite
- libxdamage
- pango libpango-1.0.so
- cairo
- gdk-pixbuf2
- freetype2 libfreetype.so
- fontconfig libfontconfig.so
- glib2 libglib-2.0.so
- pixman libpixman-1.so
- gnupg
- json-c
- libcanberra
- ffmpeg
- icu libicui18n.so libicuuc.so
- )
- makedepends=(
- unzip zip diffutils python nasm mesa libpulse libice libsm
- rust clang llvm cbindgen nodejs lld
- gawk perl findutils libotr wasi-compiler-rt wasi-libc wasi-libc++ wasi-libc++abi
- )
- makedepends+=(quilt imagemagick)
- options=(!emptydirs !makeflags !lto)
- source=(https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc}
- vendor-prefs.js
- distribution.ini
- mozconfig.cfg
- metainfo.patch
- $pkgname.desktop
- thunderbird-system-icu-74.patch) # https://bugzilla.mozilla.org/show_bug.cgi?id=1862601
- source+=(https://repo.parabola.nu/other/icedove/${pkgname}_$_brandingver-$_brandingrel.branding.tar.xz{,.sig})
- validpgpkeys=(
- 14F26682D0916CDD81E37B6D61B7B526D98F0353 # Mozilla Software Releases <release@mozilla.com>
- 4360FE2109C49763186F8E21EBE41E90F6F12F6D # Mozilla Software Releases <release@mozilla.com>
- )
- validpgpkeys+=(
- BFA8008A8265677063B11BF47171986E4B745536 # Andreas Grapentin
- 3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40 # bill-auger
- )
- prepare() {
- # parabola change: installed rust-1.77.2 in the chroot instead of using rustup
- # packed_simd no longer builds with 1.78.0
- #rustup toolchain update --profile minimal 1.77.2
- #rustup default 1.77.2
- cd $_pkgbase-$pkgver
- echo "${noextract[@]}"
- local src
- for src in "${source[@]}"; do
- src="${src%%::*}"
- src="${src##*/}"
- [[ $src = *.patch ]] || continue
- echo "Applying patch $src..."
- patch -Np1 < "../$src"
- done
- sed -e 's|73114a5c28472e77082ad259113ffafb418ed602c1741f26da3e10278b0bf93e|a88d6cc10ec1322b53a8f4c782b5133135ace0fdfcf03d1624b768788e17be0f|' \
- -i third_party/rust/mp4parse/.cargo-checksum.json
- # Make icon transparent
- sed -i '/^<rect/d' comm/mail/branding/thunderbird/TB-symbolic.svg
- cp ../mozconfig.cfg .mozconfig
- sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig
- ## [CARCH-SPECIFIC CONFIG] ##
- case ${CARCH} in
- aarch64|armv7h)
- # TODO
- true
- ;;
- i686)
- # TODO
- true
- ;;
- esac
- ## branding ##
- local branding_srcdir="${srcdir}"/${pkgname}-${_brandingver}
- local branding_destdir="${srcdir}"/${_pkgbase}-${pkgver}/comm/mail/branding/${pkgname}
- local blank_svg='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"></svg>' # TODO: branding package
- # apply branding
- msg "applying parabola branding"
- export QUILT_PATCHES="${branding_srcdir}"/patches
- export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
- export QUILT_DIFF_ARGS='--no-timestamps'
- export QUILT_PC="${srcdir}"/.pc
- rm -rf -- ${branding_destdir}
- cp -aT -- "${branding_srcdir}"/${pkgname}-branding ${branding_destdir}
- quilt push -av
- # customize distribution.ini
- local branding_gui_ver="(${_brandingver}-${_brandingrel} branding)"
- sed -i "s|version=.*|version=${branding_gui_ver}|" "${srcdir}"/distribution.ini
- # customize .mozconfig
- cat >> .mozconfig <<EOF
- ac_add_options --disable-crashreporter
- ac_add_options --disable-updater
- EOF
- # stage "appdata" file
- cp "${branding_srcdir}"/${pkgname}.appdata.xml ${branding_destdir}/
- # generate icons, logos, banners
- for i in 16 22 24 32; do
- rsvg-convert -w ${i} -h ${i} "${branding_srcdir}"/app-icons/${pkgname}_small.svg \
- -o "${branding_destdir}/default${i}.png"
- done
- for i in 48 64 128 256; do
- rsvg-convert -w ${i} -h ${i} "${branding_srcdir}"/app-icons/${pkgname}_big.svg \
- -o "${branding_destdir}/default${i}.png"
- done
- echo "${blank_svg}" > ${branding_destdir}/${pkgname}-symbolic.svg # TODO: branding package
- cp "${branding_srcdir}"/preview.png comm/mail/themes/linux/mail/preview.png
- ## search-engines ##
- pushd comm/mail/components/search/extensions > /dev/null
- # Patch search-engines config
- sed -i 's|https://duckduckgo.com/|https://html.duckduckgo.com/html/|' ddg/manifest.json
- # Delete unused search engine configs
- find -mindepth 1 -maxdepth 1 \
- -not -name ddg \
- -not -name wikipedia \
- -exec rm -frv {} \;
- popd > /dev/null
- ## libre patching ##
- sed -i '\|Phishing Protection|d
- \|UrlClassifier|d
- \|URLClassifier|d
- \|url-classifier|d
- ' comm/mail/installer/package-manifest.in
- sed -i '\|extensions[.]getAddons[.]get[.]url| s|https://services[.]addons[.]mozilla[.]org.\+["][)][;]|https://directory.fsf.org/wiki/Icedove");|g;
- \|extensions[.]getAddons[.]search[.]browseURL| s|https://addons[.]mozilla[.]org.\+["][)][;]|https://directory.fsf.org/wiki/Icedove");|g;
- \|extensions[.]getAddons[.]search[.]url| s|https://services[.]addons[.]mozilla[.]org.\+["][)][;]|https://directory.fsf.org/wiki/Icedove");|g;
- \|extensions[.]webservice[.]discoverURL| s|https://services[.]addons[.]mozilla[.]org.\+["][)][;]|https://directory.fsf.org/wiki/Icedove");|g;
- ' comm/mail/app/profile/all-thunderbird.js
- sed -i '\|facebook|d
- \|gtalk|d
- \|odnoklassniki|d
- \|skype|d
- \|twitter|d
- \|yahoo|d
- ' comm/chat/moz.build
- sed -i '\|facebook[.]js|d
- \|facebook[.]manifest|d
- \|gtalk[.]js|d
- \|gtalk[.]manifest|d
- \|odnoklassniki[.]js|d
- \|odnoklassniki[.]manifest|d
- \|skype[.]js|d
- \|skype[.]manifest|d
- \|twitter[.]js|d
- \|twitter[.]manifest|d
- \|yahoo[.]js|d
- \|yahoo[.]manifest|d
- ' comm/mail/installer/package-manifest.in
- rm -rfv comm/chat/protocols/{facebook,gtalk,odnoklassniki,skype,twitter,yahoo}
- }
- build() {
- cd $_pkgbase-$pkgver
- if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then
- export MOZ_BUILD_DATE=$(date --date "@${SOURCE_DATE_EPOCH}" "+%Y%m%d%H%M%S")
- fi
- export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system # parabola policy
- export MOZBUILD_STATE_PATH="${srcdir}/mozbuild"
- # malloc_usable_size is used in various parts of the codebase
- CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
- CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
- ./mach configure
- ./mach build
- ./mach buildsymbols
- }
- package_icedove() {
- optdepends=(
- 'hunspell-en_us: Spell checking, American English'
- 'libotr: OTR support for active one-to-one chats'
- 'libnotify: Notification integration'
- )
- cd $_pkgbase-$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 ../$pkgname.desktop -t "$pkgdir/usr/share/applications"
- install -Dm 644 comm/mail/branding/${pkgname}/${pkgname}.appdata.xml \
- "${pkgdir}/usr/share/metainfo/${pkgname}.appdata.xml"
- # NOTE: comm/mail/branding/${pkgname} is $branding_destdir in prepare()
- for i in 16 22 24 32 48 64 128 256; do
- install -Dm644 comm/mail/branding/${pkgname}/default${i}.png \
- "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png"
- done
- install -Dm644 comm/mail/branding/${pkgname}/${pkgname}-symbolic.svg \
- "$pkgdir/usr/share/icons/hicolor/symbolic/apps/$pkgname-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/$pkgname "\$@"
- 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/$pkgname-bin"
- }
- sha512sums=('002f783cff7f2b50d9a29f20061fe55a1f64487b38a18dcb49217c3d7b99c2852af842decbd0347939aaf4c4c73ae66a8b04527ccd1b6db7f87aab402cb84ca1'
- 'SKIP'
- 'e21d30a8b79724eda3488ac2bf9dfeb0c7f6bf39e59c37f17574b529d33043765eb54408a55fcbf6f3afa7a58ca99124992d443cdff23ac5c9bdbff33c75f60f'
- '81c88dd67b9e21e563e6fdfc332ead8ab210c50ec00a43664be5cd4d75c169d6d3e9d19ca631397b39f6ddd6c4d9a9ca132757a8f8bfcc5c018d1cfdbfce7860'
- '27b8dd4edc7ca9e96a2238c16b11b2fdd4982e143fb2a9875dd5c98480cce4182794feb9ef51fee79c6db6fed7a803d3535cf4a135fda2178f0b192c8eee0863'
- '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290'
- 'cc727665dbb4e0adfaf798575c3c8e2be424ae2f92367afeb9fa269c90e6a56f68bfb08d203be0fd5458bd8962e818977dc04cd50feafd2a460a26480f571cf4'
- '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65'
- '4be9eeff631645cb1b0a3a10b90f4c650d6e9d84a1a053a55d9fa40cd6e8f82084b3a311005db6143aeb8fc9dc6d3bd43fc8b3f38585dcbc6ddcb9f955b77f6f'
- 'SKIP')
- # vim:set sw=2 et:
|