RooTelegram — Third-party components and licenses
=================================================

RooTelegram is free software released under the GNU General Public License
version 3 (see the LICENSE file). It is a fork of Fernschreiber by Sebastian J.
Wolf, with contributions inspired by Yottagram by Michal Szczepaniak.

This file lists the third-party components distributed with, or linked into, the
RooTelegram package, together with their license and a pointer to the
corresponding upstream source, as required by the GPL/LGPL/MIT licenses.

Note on distribution: some of these components are not committed to this source
repository (they are excluded via .gitignore) but are downloaded and/or compiled
at build time and end up inside the distributed RPM. Their corresponding source
is identified below by upstream project and version/tag.

--------------------------------------------------------------------------------
COMPONENT     : RooTelegram (this application)
LICENSE       : GPL v3
SOURCE        : https://github.com/RootGPT-YouTube/RooTelegram-SailfishOS
BASED ON      : Fernschreiber (GPL v3) — https://github.com/Wunderfitz/harbour-fernschreiber
NOTES         : Full license text in ./LICENSE

--------------------------------------------------------------------------------
COMPONENT     : TDLib (Telegram Database Library, libtdjson)
VERSION       : 1.8.62
LICENSE       : Boost Software License 1.0
SOURCE        : https://github.com/tdlib/td
DISTRIBUTION  : prebuilt libtdjson bundled in the RPM (excluded from this repo
                via .gitignore: /tdlib/)

--------------------------------------------------------------------------------
COMPONENT     : tg_owt (Telegram's WebRTC build, used for voice/video calls)
LICENSE       : GPL v2 or later (BSD-style WebRTC components; overall GPL)
SOURCE        : https://github.com/desktop-app/tg_owt
DISTRIBUTION  : compiled and linked into the RPM (excluded from this repo via
                .gitignore: /vendor/)

--------------------------------------------------------------------------------
COMPONENT     : tgcalls (Telegram calls library, voice/video calls)
LICENSE       : GPL v2 or later
SOURCE        : https://github.com/TelegramMessenger/tgcalls
DISTRIBUTION  : compiled and linked into the RPM (excluded from this repo via
                .gitignore: /vendor/)

--------------------------------------------------------------------------------
COMPONENT     : rlottie (animated Lottie stickers)
LICENSE       : MIT License
COPYRIGHT     : Copyright (c) 2020 Samsung Electronics Co., Ltd. and other
                contributors
SOURCE        : https://github.com/Samsung/rlottie
DISTRIBUTION  : compiled into the RPM (excluded from this repo via .gitignore:
                /rlottie/)

--------------------------------------------------------------------------------
COMPONENT     : FFmpeg (minimal static build, video normalization for stories)
VERSION       : 7.0.2
LICENSE       : LGPL v2.1 or later — but this build is GPL v2 or later because
                it is configured with --enable-gpl and linked against libx264
SOURCE        : https://ffmpeg.org  —  https://ffmpeg.org/releases/ffmpeg-7.0.2.tar.xz
RECIPE        : scripts/build-ffmpeg.sh
LICENSE TEXT  : ffmpeg/LICENSE
DISTRIBUTION  : binary committed at ffmpeg/<arch>/bin/ffmpeg

--------------------------------------------------------------------------------
COMPONENT     : libx264 (H.264 encoder, linked into the bundled FFmpeg binary)
VERSION       : stable
LICENSE       : GPL v2 or later
SOURCE        : https://www.videolan.org/developers/x264.html
                https://code.videolan.org/videolan/x264
RECIPE        : scripts/build-ffmpeg.sh
LICENSE TEXT  : ffmpeg/LICENSE

--------------------------------------------------------------------------------
BUNDLED RUNTIME LIBRARIES (SailfishOS 5.0 + 5.1 compatibility)
--------------------------------------------------------------------------------
For a single RPM that installs on both SailfishOS 5.0 and 5.1, RooTelegram ships
its own copies of the multimedia shared libraries it links against, because some
of them have version-bumped SONAMEs across SFOS releases (e.g. libvpx.so.9 on 5.0
vs libvpx.so.12 on 5.1). The copies are taken from the SailfishOS 5.0 system,
installed under /usr/share/harbour-rootelegram/lib/ and loaded via the binary's
RPATH. They are dynamically linked (each is a separate .so and can be replaced),
which satisfies the LGPL relinking requirement. Full license texts are shipped in
/usr/share/harbour-rootelegram/licenses/bundled/ (source: bundledlibs/licenses/).

COMPONENT : FFmpeg shared libraries — libavcodec.so.59, libavutil.so.57,
            libswresample.so.4
LICENSE   : LGPL v2.1 or later (this system build does NOT link libx264, so it is
            LGPL, not GPL)
COPYRIGHT : The FFmpeg developers
SOURCE    : https://ffmpeg.org

COMPONENT : libvpx (VP8/VP9)        LICENSE: BSD-3-Clause
COPYRIGHT : Copyright (c) The WebM Project authors (Google)
SOURCE    : https://chromium.googlesource.com/webm/libvpx

COMPONENT : libopus               LICENSE: BSD-3-Clause
COPYRIGHT : Copyright (c) Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin et al.
SOURCE    : https://opus-codec.org

COMPONENT : libogg, libvorbis, libvorbisenc, libtheoradec, libtheoraenc, libspeex
LICENSE   : BSD-3-Clause
COPYRIGHT : Copyright (c) The Xiph.Org Foundation
SOURCE    : https://xiph.org

COMPONENT : libwebp, libwebpmux, libsharpyuv   LICENSE: BSD-3-Clause
COPYRIGHT : Copyright (c) Google Inc.
SOURCE    : https://chromium.googlesource.com/webm/libwebp

COMPONENT : libopenjp2 (OpenJPEG)   LICENSE: BSD-2-Clause
COPYRIGHT : Copyright (c) UCLouvain and the OpenJPEG contributors
SOURCE    : https://github.com/uclouvain/openjpeg

--------------------------------------------------------------------------------
COMPONENT     : Twemoji (emoji graphics, jdecked fork)
LICENSE       : MIT License (code) and CC-BY 4.0 (graphics)
COPYRIGHT     : Copyright the Twemoji contributors
SOURCE        : https://github.com/jdecked/twemoji

--------------------------------------------------------------------------------
COMPONENT     : OpenStreetMap Nominatim (reverse geocoding web service)
LICENSE       : ODbL (data) — used as a network service, not bundled
SOURCE        : https://wiki.openstreetmap.org/wiki/Nominatim
