summaryrefslogtreecommitdiffstats
path: root/main/telegram-cli/APKBUILD
blob: 00ce72aa72792021e02c309129c76e1a897058be (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=telegram-cli
pkgver=1.0.5.1
pkgrel=0
pkgdesc="Command line telegram client"
url="https://github.com/vysheng/tg"
arch="all"
license="GPL3"
depends=""
depends_dev="readline-dev openssl-dev libconfig-dev libevent-dev"
makedepends="$depends_dev"
subpackages=""
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
	0001-uclibc-does-not-provide-aio.h.patch
	0001-change-public-key-location.patch"
source="$pkgname-$pkgver.tar.gz::https://github.com/vysheng/tg/archive/1.0.5.1.tar.gz
	musl-no-execinfo.patch"

_builddir="$srcdir/tg-$pkgver"

prepare() {
        local i
        cd "$_builddir"
        for i in $source; do
                case $i in
                *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
                esac
        done
}

build() {
        cd "$_builddir"
	export LUA_INCLUDE="-I/usr/include/lua5.2"
	export LUA_LIBS="-Llua5.2"
	./configure --prefix=/usr \
                --sysconfdir=/etc \
                --mandir=/usr/share/man \
                --infodir=/usr/share/info \
                --localstatedir=/var \
		--enable-libconfig \
		--disable-liblua \
                || return 1
        make || return 1
}

package() {
        cd "$_builddir"
	install -D bin/telegram-cli \
		"$pkgdir"/usr/bin/telegram-cli || return 1
	install -D tg-server.pub \
		"$pkgdir"/etc/telegram-cli/tg.pub || return 1
}

md5sums="0a9ba9b2461c9898a88a4c0957be39c3  telegram-cli-1.0.5.1.tar.gz
55c83ab374b22146b95ad0e22a25ecc1  musl-no-execinfo.patch"
sha256sums="5a78fd46e978ff450eda6f4664499042dddf053f4fe233fe3157499869646fb8  telegram-cli-1.0.5.1.tar.gz
3ca117bc4ee7ce3e7ef161b56b0d833756ed4c60583f3fe420e50d7e8c5a0de4  musl-no-execinfo.patch"
sha512sums="2d3f9e246b3caf60348cd2d02c16e2f45ac127f2d28d58f77ae890214354bc9ed16229a43d6d335fdbce2ce4ac339da9fb3beecda5143c13d5a5cfae66578621  telegram-cli-1.0.5.1.tar.gz
50bf535dc420e53b20d385625247ea9d5df58c93b3d25cbd7757486df428f59831e71a9a377c71745c9332c5e30c49a85012520a9fabe3c06786aa41400c24ad  musl-no-execinfo.patch"