# Maintainer: Tom Richards <tom@tomrichards.net>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
# Contributor: Florian Bruhin <archlinux.org@the-compiler.org>
pkgname=telegram-cli-git
pkgver=r1043.160231b
pkgrel=1
pkgdesc="Telegram messenger CLI"
arch=('i686' 'x86_64')
url="https://github.com/vysheng/tg"
license=('GPL2')
depends=('libconfig' 'libevent' 'lua' 'jansson')
makedepends=('git')
conflicts=('telegram-cli')
provides=('telegram-cli')
source=("$pkgname"::'git+https://github.com/vysheng/tg'
'https://patch-diff.githubusercontent.com/raw/vysheng/tg/pull/920.patch')
sha256sums=('SKIP'
'cc17c9e614945cb995f440a1b663e1124da1a4ce39f405dd18850d9b58df4406')
pkgver() {
cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "$srcdir/$pkgname"
patch -p1 -i "$srcdir/920.patch" # https://github.com/vysheng/tg/pull/920
}
build() {
cd "$srcdir/$pkgname"
git submodule update --init --recursive
./configure
make
}
package() {
cd "$srcdir/$pkgname"
install -Dm644 tg-server.pub ${pkgdir}/etc/telegram-cli/server.pub
install -Dm755 bin/telegram-cli ${pkgdir}/usr/bin/telegram-cli
}
Replies to telegram-cli-git PKGBUILD 
{"text":"text","html5":"html","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"lua","bash":"sh","erlang":"erlang","go":"golang","c":"c_cpp","cpp":"c_cpp","diff":"diff","latex":"latex","sql":"sql","xml":"xml","0":"text","abap":"abap","actionscript":"actionscript","actionscript3":"actionscript","ada":"ada","apache":"apache_conf","applescript":"applescript","asm":"assembly_x86","autohotkey":"autohotkey","closure":"closure","cobol":"cobol","coffeescript":"coffee","cpp-winapi":"c_cpp","c_loadrunner":"c_cpp","c_mac":"c_cpp","c_winapi":"c_cpp","csharp":"csharp","d":"d","dart":"dart","dot":"dot","eiffel":"eiffel","fortran":"fortran","groovy":"groovy","haskell":"haskell","haxe":"haxe","ini":"ini","io":"io","java":"java","java5":"java","make":"makefile","matlab":"matlab","mysql":"mysql","objc":"objectivec","ocaml":"ocaml","pascal":"pascal","perl":"perl","perl6":"perl","postgresql":"pgsql","powershell":"powershell","prolog":"prolog","properties":"properties","rails":"ruby","rust":"rust","scala":"scala","scheme":"scheme","smarty":"smarty","tcl":"tcl","vala":"vala","vb":"vbscript","verilog":"verilog","vhdl":"vhdl","yaml":"yaml"}