summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b07d604100b9772603eeaf20300ac549c2b37d2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer: Laura Hausmann <laura@hausmann.dev>
pkgname='tgcli-git'
pkgver=0.2a.r0.g3a4cb9e
pkgrel=1
pkgdesc='A Telegram console client based on tdlib.'
arch=('x86_64')
url="https://gitlab.com/lhausmann/tgcli"
license=('MIT')
makedepends=('dotnet-sdk')
install=
changelog=
options=('!strip')
source=("$pkgname"::'git+https://git.prod.zotan.network/zotan/tgcli.git#branch=master')
md5sums=('SKIP')

prepare() {
	cd "$srcdir/$pkgname"
	git submodule update --init --recursive
}

pkgver() {
	cd "$srcdir/$pkgname"
	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "$srcdir/$pkgname"
	curl -Lo warp-packer https://github.com/dgiagio/warp/releases/download/v0.3.0/linux-x64.warp-packer && chmod +x warp-packer
	dotnet publish -c Release -r linux-x64
	./warp-packer --arch linux-x64 --input_dir telegram/bin/Release/netcoreapp3.1/linux-x64/publish --exec telegram --output tgcli.linux.run
	chmod +x tgcli.linux.run
}

package() {
	cd "$srcdir/$pkgname"
	mkdir -p $pkgdir/usr/bin
	cp tgcli.linux.run $pkgdir/usr/bin/tgcli
}