summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2014-11-24 10:51:03 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2014-11-24 10:51:51 +0000
commitf02ec53f150a19cd52e6ddb1600167d7d7564691 (patch)
treebb8c009e7558eaa4e3de987c71776ce467679a44 /main
parenteac4de6dd1ed522902da20170085e08dd910f0d8 (diff)
downloadaports-f02ec53f150a19cd52e6ddb1600167d7d7564691.tar.bz2
aports-f02ec53f150a19cd52e6ddb1600167d7d7564691.tar.xz
testing/telegram-cli: move to main. Take maintainership
Diffstat (limited to 'main')
-rw-r--r--main/telegram-cli/APKBUILD60
-rw-r--r--main/telegram-cli/musl-no-execinfo.patch31
2 files changed, 91 insertions, 0 deletions
diff --git a/main/telegram-cli/APKBUILD b/main/telegram-cli/APKBUILD
new file mode 100644
index 000000000..00ce72aa7
--- /dev/null
+++ b/main/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/main/telegram-cli/musl-no-execinfo.patch b/main/telegram-cli/musl-no-execinfo.patch
new file mode 100644
index 000000000..bf63892a2
--- /dev/null
+++ b/main/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>