From 8ad56a6f77a6b42fa57d1d78ba7e05dd1c8f0b18 Mon Sep 17 00:00:00 2001 From: Maxim Karasev Date: Mon, 26 Apr 2021 18:32:22 +0300 Subject: [PATCH 1/2] New package: python3-telegram-0.14.0 --- srcpkgs/python3-telegram/files/LICENSE | 21 +++++++++++++++++ .../patches/use-system-tdlib.patch | 18 +++++++++++++++ srcpkgs/python3-telegram/template | 23 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 srcpkgs/python3-telegram/files/LICENSE create mode 100644 srcpkgs/python3-telegram/patches/use-system-tdlib.patch create mode 100644 srcpkgs/python3-telegram/template diff --git a/srcpkgs/python3-telegram/files/LICENSE b/srcpkgs/python3-telegram/files/LICENSE new file mode 100644 index 000000000000..cbde8b4bc2c9 --- /dev/null +++ b/srcpkgs/python3-telegram/files/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Alexander Akhmetov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/srcpkgs/python3-telegram/patches/use-system-tdlib.patch b/srcpkgs/python3-telegram/patches/use-system-tdlib.patch new file mode 100644 index 000000000000..f0fe73215288 --- /dev/null +++ b/srcpkgs/python3-telegram/patches/use-system-tdlib.patch @@ -0,0 +1,18 @@ +diff --git a/telegram/tdjson.py b/telegram/tdjson.py +index 091145e..142654e 100644 +--- telegram/tdjson.py ++++ telegram/tdjson.py +@@ -10,12 +10,7 @@ logger = logging.getLogger(__name__) + + + def _get_tdjson_lib_path() -> str: +- if platform.system().lower() == 'darwin': +- lib_name = 'darwin/libtdjson.dylib' +- else: +- lib_name = 'linux/libtdjson.so' +- +- return pkg_resources.resource_filename('telegram', f'lib/{lib_name}') ++ return '/usr/lib/libtdjson.so.1.7.0' + + + class TDJson: diff --git a/srcpkgs/python3-telegram/template b/srcpkgs/python3-telegram/template new file mode 100644 index 000000000000..2f32da3822e2 --- /dev/null +++ b/srcpkgs/python3-telegram/template @@ -0,0 +1,23 @@ +# Template file for 'python3-telegram' +pkgname=python3-telegram +version=0.14.0 +revision=1 +wrksrc=python-telegram-${version} +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="libtd" +short_desc="Python library for building Telegram clients" +maintainer="Maxim Karasev " +license="MIT" +homepage="https://github.com/alexander-akhmetov/python-telegram" +distfiles="${PYPI_SITE}/p/python-telegram/python-telegram-${version}.tar.gz" +checksum=d3b08469ed06f6599ac4acfe89c697f3c99b55dec476c475c237f6decf238376 +make_check=no + +do_configure() { + rm -r telegram/lib +} + +post_install() { + vlicense ${FILESDIR}/LICENSE +} From b9388f005016e5b7685f534ce6c65bb6fbbddec2 Mon Sep 17 00:00:00 2001 From: Maxim Karasev Date: Mon, 26 Apr 2021 18:32:44 +0300 Subject: [PATCH 2/2] New package: telegram-tg-0.15.0 --- srcpkgs/telegram-tg/template | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 srcpkgs/telegram-tg/template diff --git a/srcpkgs/telegram-tg/template b/srcpkgs/telegram-tg/template new file mode 100644 index 000000000000..5a1004cc9b8b --- /dev/null +++ b/srcpkgs/telegram-tg/template @@ -0,0 +1,15 @@ +# Template file for 'telegram-tg' +pkgname=telegram-tg +version=0.15.0 +revision=1 +wrksrc=tg-${version} +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-telegram" +short_desc="Terminal Telegram client" +maintainer="Maxim Karasev " +license="Unlicense" +homepage="https://github.com/paul-nameless/tg" +distfiles="${PYPI_SITE}/t/tg/tg-${version}.tar.gz" +checksum=062fc7e68376213f85a41457d82694c59dc55bd9027ef25816cd6167735ef42c +make_check=no