From 8952a06342a72da3fa1e2500b1b58246f06fdef7 Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Tue, 26 Oct 2021 23:55:38 +0800 Subject: feat(add-pkg): Add telegram-bot-api Signed-off-by: KunoiSayami --- repo/telegram-bot-api/PKGBUILD | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 repo/telegram-bot-api/PKGBUILD (limited to 'repo') diff --git a/repo/telegram-bot-api/PKGBUILD b/repo/telegram-bot-api/PKGBUILD new file mode 100644 index 0000000..a465bc8 --- /dev/null +++ b/repo/telegram-bot-api/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: KunoiSayami + +pkgname=telegram-bot-api +pkgver=5.3.3 +pkgrel=1 +pkgdesc='The Telegram Bot API provides an HTTP API for creating Telegram Bots.' +arch=('any') +url=https://github.com/tdlib/telegram-bot-api/ +source=(git://github.com/tdlib/telegram-bot-api.git#commit=36b0c4426a0e88aa88300b56c08f35442c15dded) +license=('BSL-1.0') +md5sums=('SKIP') +makedepends=('gperf' 'cmake' 'gcc' 'git') +depends=('openssl' 'zlib') + +prepare() { + cd "$srcdir/$pkgname/" + git submodule update --init +} + +build() { + cd "$srcdir/$pkgname" + + if [ ! -d build ]; then + mkdir build/ + fi + cd build/ + + cmake -DCMAKE_BUILD_TYPE=Release .. + + cmake --build . --parallel $(nproc) +} + +package() { + cd "$srcdir/$pkgname" + + install -dm755 "$pkgdir"/usr/share/"$pkgname"/ + install -dm755 "$pkgdir"/usr/share/license/"$pkgname" + install -dm755 "$pkgdir"/usr/bin + + install -m755 build/"$pkgname" "$pkgdir"/usr/share/"$pkgname"/ + + install -Dm644 LICENSE_1_0.txt "$pkgdir"/usr/share/license/"$pkgname"/ + + ln -s /usr/share/"$pkgname"/"$pkgname" "$pkgdir"/usr/bin/"$pkgname" +} \ No newline at end of file -- cgit v1.3.1