summaryrefslogtreecommitdiffstats
path: root/testing/telegram-cli
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2014-01-27 11:54:39 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2014-01-27 11:56:23 +0000
commita82d0452a37a732358c07ae5adefa839e6107967 (patch)
tree3c3801b25ba8c28c593222a941264d3b0c26bd93 /testing/telegram-cli
parent4e3cf4c89609dd58154fcef6b3ba8091a67b2b31 (diff)
downloadaports-a82d0452a37a732358c07ae5adefa839e6107967.tar.bz2
aports-a82d0452a37a732358c07ae5adefa839e6107967.tar.xz
testing/telegram-cli: new aport
experimental telegram cli messenger. currently build without lua support. more info: telegram.org
Diffstat (limited to 'testing/telegram-cli')
-rw-r--r--testing/telegram-cli/0001-uclibc-does-not-provide-aio.h.patch41
-rw-r--r--testing/telegram-cli/APKBUILD57
2 files changed, 98 insertions, 0 deletions
diff --git a/testing/telegram-cli/0001-uclibc-does-not-provide-aio.h.patch b/testing/telegram-cli/0001-uclibc-does-not-provide-aio.h.patch
new file mode 100644
index 000000000..c3abba9e2
--- /dev/null
+++ b/testing/telegram-cli/0001-uclibc-does-not-provide-aio.h.patch
@@ -0,0 +1,41 @@
+From 33d358d83dd882d1e4eebd34dc4e6cf622f0c854 Mon Sep 17 00:00:00 2001
+From: Carlo Landmeter <clandmeter@gmail.com>
+Date: Mon, 27 Jan 2014 11:42:33 +0000
+Subject: [PATCH] uclibc does not provide aio.h
+
+---
+ mtproto-client.c | 2 ++
+ mtproto-common.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/mtproto-client.c b/mtproto-client.c
+index 5f1a997..06ddfdc 100644
+--- a/mtproto-client.c
++++ b/mtproto-client.c
+@@ -35,7 +35,9 @@
+ #include <sys/endian.h>
+ #endif
+ #include <sys/types.h>
++#ifndef __UCLIBC__
+ #include <aio.h>
++#endif
+ #include <netdb.h>
+ #include <openssl/rand.h>
+ #include <openssl/rsa.h>
+diff --git a/mtproto-common.c b/mtproto-common.c
+index ceeb5c5..1c34550 100644
+--- a/mtproto-common.c
++++ b/mtproto-common.c
+@@ -31,7 +31,9 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/types.h>
++#ifndef __UCLIBC__
+ #include <aio.h>
++#endif
+ #include <netdb.h>
+ #include <openssl/bn.h>
+ #include <openssl/rand.h>
+--
+1.8.5.3
+
diff --git a/testing/telegram-cli/APKBUILD b/testing/telegram-cli/APKBUILD
new file mode 100644
index 000000000..93f6d85c7
--- /dev/null
+++ b/testing/telegram-cli/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+pkgname=telegram-cli
+pkgver=0.01_git20140127
+verbase=0.01
+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"
+makedepends="$depends_dev"
+subpackages=""
+source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
+ 0001-uclibc-does-not-provide-aio.h.patch"
+giturl="git://github.com/vysheng/tg.git"
+disturl="dev.alpinelinux.org:/archive/$pkgname/"
+
+_builddir="$srcdir/$pkgname-$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"
+ mkdir -p "$pkgdir"/usr/bin || return 1
+ cp telegram "$pkgdir"/usr/bin
+}
+
+md5sums="4753891325f51690d9fabab8e009b6ff telegram-cli-0.01_git20140127.tar.gz
+ed21dd0f9056fe3a8132894ccf943844 0001-uclibc-does-not-provide-aio.h.patch"
+sha256sums="e06b0f09d2dcaaefde83abeb67aae3d16bee044eb93a6a725c04bf6d04570d2c telegram-cli-0.01_git20140127.tar.gz
+5a92614b40c50fcd5b5601c33d87edba421086eb777663bc6c43d18734b4cfea 0001-uclibc-does-not-provide-aio.h.patch"
+sha512sums="e10112884e458eb123f65ffec8267c5f02f5ab6e78ee05024b2c5923c8e6ddb702ba8be9993d92af6a55c3e1ac957099af02fc6e1f8a157ea9fe1668b9036569 telegram-cli-0.01_git20140127.tar.gz
+46725ec1d6255ddb359e8e33a73510461264451689f7bcc14233e3730a6cae26073b0629af18443c1ad6e7140748e75293349b97ac8d8cec21b0c10541a62333 0001-uclibc-does-not-provide-aio.h.patch"