summaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2014-10-02 08:59:02 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2014-10-02 08:59:02 +0000
commitb4c6cb0b4764a731a8204f3c8466df7218bc6a72 (patch)
tree36a5fd764d8e45ef0fd5c18f09895a5102624375 /net-im
parent- Add missing DEPENDS (diff)
- New port: net-im/tg -- a command-line client for the Telegram network
WWW: https://github.com/vysheng/tg
Notes
Notes: svn path=/head/; revision=369804
Diffstat (limited to 'net-im')
-rw-r--r--net-im/Makefile1
-rw-r--r--net-im/tg/Makefile32
-rw-r--r--net-im/tg/distinfo2
-rw-r--r--net-im/tg/files/patch-main.c19
-rw-r--r--net-im/tg/pkg-descr3
5 files changed, 57 insertions, 0 deletions
diff --git a/net-im/Makefile b/net-im/Makefile
index b78a80909ea0..8317749ee0ef 100644
--- a/net-im/Makefile
+++ b/net-im/Makefile
@@ -152,6 +152,7 @@
SUBDIR += telepathy-qt4
SUBDIR += telepathy-salut
SUBDIR += telepathy-sofiasip
+ SUBDIR += tg
SUBDIR += tkabber
SUBDIR += tkabber-plugins
SUBDIR += tkabbur
diff --git a/net-im/tg/Makefile b/net-im/tg/Makefile
new file mode 100644
index 000000000000..3d6ca3ee1765
--- /dev/null
+++ b/net-im/tg/Makefile
@@ -0,0 +1,32 @@
+# Created by: gahr
+# $FreeBSD$
+
+PORTNAME= tg
+PORTVERSION= 1.0.5.1
+CATEGORIES= net-im
+
+MAINTAINER= gahr@FreeBSD.org
+COMMENT= Command-line interface for Telegram
+
+LIB_DEPENDS= libconfig.so:${PORTSDIR}/devel/libconfig
+
+USE_GITHUB= yes
+GH_ACCOUNT= vysheng
+GH_TAGNAME= 1.0.5.1
+GH_COMMIT= 77bbb4c
+
+USES= execinfo gmake lua:52 readline
+GNU_CONFIGURE= yes
+CFLAGS+= -g -O0
+
+PLIST_FILES= bin/telegram-cli \
+ etc/tg-server.pub
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/main.c
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/telegram-cli ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/tg-server.pub ${STAGEDIR}${PREFIX}/etc
+
+.include <bsd.port.mk>
diff --git a/net-im/tg/distinfo b/net-im/tg/distinfo
new file mode 100644
index 000000000000..114bee0c4b3e
--- /dev/null
+++ b/net-im/tg/distinfo
@@ -0,0 +1,2 @@
+SHA256 (tg-1.0.5.1.tar.gz) = 42fcb2208a3534f15277fe466f9372db088910e7c5aa550b3e2269b84152aa31
+SIZE (tg-1.0.5.1.tar.gz) = 390920
diff --git a/net-im/tg/files/patch-main.c b/net-im/tg/files/patch-main.c
new file mode 100644
index 000000000000..8a244f95f659
--- /dev/null
+++ b/net-im/tg/files/patch-main.c
@@ -0,0 +1,19 @@
+--- main.c.orig 2014-09-24 12:35:27.000000000 +0200
++++ main.c 2014-10-02 10:22:46.000000000 +0200
+@@ -59,6 +59,7 @@
+
+ #include <grp.h>
+ #include <arpa/inet.h>
++#include <netinet/in.h>
+
+ #include "telegram.h"
+ #include "loop.h"
+@@ -803,7 +804,7 @@
+ running_for_first_time ();
+ parse_config ();
+
+- tgl_set_rsa_key ("/etc/" PROG_NAME "/server.pub");
++ tgl_set_rsa_key ("%%PREFIX%%/etc/tg-server.pub");
+ tgl_set_rsa_key ("tg-server.pub");
+
+
diff --git a/net-im/tg/pkg-descr b/net-im/tg/pkg-descr
new file mode 100644
index 000000000000..8ef7426e0c17
--- /dev/null
+++ b/net-im/tg/pkg-descr
@@ -0,0 +1,3 @@
+tg is a command-line interface for the Telegram instant-messaging network.
+
+WWW: https://github.com/vysheng/tg