aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2015-10-06 07:26:00 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2015-10-06 07:26:00 +0000
commitbc849d457d3d23962937258c2b29abe3505eb7ff (patch)
treea3f6de3ad1620950b905dab488ffd4f5c13683db /community
parentdf7f237af42a284db04d702a9ab9067a46d82a95 (diff)
downloadaports-bc849d457d3d23962937258c2b29abe3505eb7ff.tar.bz2
aports-bc849d457d3d23962937258c2b29abe3505eb7ff.tar.xz
community/telegram-cli: moved from main
Diffstat (limited to 'community')
-rw-r--r--community/telegram-cli/APKBUILD60
-rw-r--r--community/telegram-cli/musl-no-execinfo.patch31
2 files changed, 91 insertions, 0 deletions
diff --git a/community/telegram-cli/APKBUILD b/community/telegram-cli/APKBUILD
new file mode 100644
index 0000000000..00ce72aa72
--- /dev/null
+++ b/community/telegram-cli/APKBUILD
@@ -0,0 +1,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"
diff --git a/community/telegram-cli/musl-no-execinfo.patch b/community/telegram-cli/musl-no-execinfo.patch
new file mode 100644
index 0000000000..bf63892a2b
--- /dev/null
+++ b/community/telegram-cli/musl-no-execinfo.patch
@@ -0,0 +1,31 @@
+--- a/generate.c.orig
++++ b/generate.c
+@@ -25,7 +25,6 @@
+
+ #include <stdio.h>
+ #include <signal.h>
+-#include <execinfo.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+--- a/tlc.c.orig
++++ b/tlc.c
+@@ -35,7 +35,6 @@
+
+ #include <signal.h>
+ #include "config.h"
+-#include <execinfo.h>
+ #include <stdarg.h>
+
+ int verbosity;
+--- a/net.c.orig
++++ b/net.c
+@@ -29,7 +29,7 @@
+ #include <netdb.h>
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <errno.h>