aboutsummaryrefslogtreecommitdiffstats
path: root/community/tg
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2015-10-08 13:41:17 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2015-10-08 13:42:00 +0000
commit5aa88df1700263f3fdea5f039caff0c098d3d2ed (patch)
tree6587602a13127f6b86e4f159ba897c07873a6250 /community/tg
parente877b0d7b5fef37124665950fea43c4b0f80184e (diff)
downloadaports-5aa88df1700263f3fdea5f039caff0c098d3d2ed.tar.bz2
aports-5aa88df1700263f3fdea5f039caff0c098d3d2ed.tar.xz
community/telegram-cli: rename into tg
Diffstat (limited to 'community/tg')
-rw-r--r--community/tg/APKBUILD83
-rw-r--r--community/tg/makefile-remove-werror.patch11
-rw-r--r--community/tg/makefile-tl-parser-nocrc32.patch16
-rw-r--r--community/tg/musl-include-fix.patch14
4 files changed, 124 insertions, 0 deletions
diff --git a/community/tg/APKBUILD b/community/tg/APKBUILD
new file mode 100644
index 0000000000..248ce8a558
--- /dev/null
+++ b/community/tg/APKBUILD
@@ -0,0 +1,83 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=tg
+pkgver=1.3.1
+pkgrel=0
+tglver=2.0.1
+tlparserver=master
+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 jansson-dev"
+makedepends="$depends_dev zlib-dev"
+subpackages=""
+provides="telegram-cli"
+source="$pkgname-$pkgver.tar.gz::https://github.com/vysheng/tg/archive/$pkgver.tar.gz
+ tgl-$tglver.tar.gz::https://github.com/vysheng/tgl/archive/$tglver.tar.gz
+ tl-parser.zip::https://github.com/vysheng/tl-parser/archive/$tlparserver.zip
+
+ makefile-tl-parser-nocrc32.patch
+ musl-include-fix.patch
+ makefile-remove-werror.patch
+ "
+pkgusers="telegram"
+pkggroups="telegram"
+
+_builddir="$srcdir/tg-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ mv "$srcdir"/tl-parser-$tlparserver/* "$srcdir/tgl-$tglver/tl-parser" || return 1
+ mv "$srcdir"/tgl-$tglver/* "$srcdir/tg-$pkgver/tgl" || return 1
+
+ local i
+ 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="42ce2a35dd124102885c81d70528ee0b tg-1.3.1.tar.gz
+50c87ee147041ed51685965ab0affeb0 tgl-2.0.1.tar.gz
+0277d192fd8261f1c286fdb41e052ef5 tl-parser.zip
+a2408b394eac8b62e0720bce4eb43135 makefile-tl-parser-nocrc32.patch
+d9c455bc5c5fad592484154b2029a326 musl-include-fix.patch
+8139da32fa804ccb067f28e00daee6ca makefile-remove-werror.patch"
+sha256sums="b70b1d8b97b44086b64e467f81c6aceb8263092c26a8cf1a7d717eb1b5360415 tg-1.3.1.tar.gz
+549bbfc46715bae31b50a54cc21eefd61109cd28dcdddbe4e53726aec3d924f1 tgl-2.0.1.tar.gz
+25dbd43c6f8e3ad5380cfbd90e12240ab0e116b620769a3845694451bafbd4f7 tl-parser.zip
+8aa3dea75834261a64604d0937ecd40afa9ddc6f69a2f07a0311123abbf34534 makefile-tl-parser-nocrc32.patch
+8bcb0b1ca402f7b456022ac1a94e78f3bbc3fd7678a23c09d18eacbdf7338557 musl-include-fix.patch
+0023266966b1d4de099ec1d91b06dcb9aeb578ed6db894dca06bb0880af78e5e makefile-remove-werror.patch"
+sha512sums="ac8341e8f951922fa78a1db74d9b1a87b03c3339307bd9c46da71656d8d6e55bf0b546abba1638ae01843341a4d2134b6ab244e15547e8806d74b21ac1306114 tg-1.3.1.tar.gz
+5d16a0e9c6e63ce91238501520e7699164298d9e6e275d8b90da675cca6d0b09944888d95320482e8e232d1bd540dbe80cfe58ac7d70f3157a4372c7fd550366 tgl-2.0.1.tar.gz
+396b8bf55b517c9c051a83f8812c4c245f30de506ab1381f36a6c353f229681297d9ad1983f89fa15f1f92e4f5413d78d45b12602c8425447c6ef1c9cc43d060 tl-parser.zip
+b61e5907c6cf035ce067cfbc19995a04afa1f04cef00be52a02943e850d4a2754dba67732fa6ca958f2e48a741b2048fb38652c17b73e46359c550257e563f42 makefile-tl-parser-nocrc32.patch
+4e26e7421db48b7074197e4cea1c6a6fce33a2b259f0da0e378f9a83f115e961016586b63d960d491cb5c4866fffbf454a5e0eda47ad16b3b77d117c8508f1f2 musl-include-fix.patch
+1f8fab90948079abc94169751851347a6753dc13cf19973ba05a6f533ac173ba6ce70863988f2b167c27a347f4aeaa710c70cc960c0ba4090c43461386f8b217 makefile-remove-werror.patch"
diff --git a/community/tg/makefile-remove-werror.patch b/community/tg/makefile-remove-werror.patch
new file mode 100644
index 0000000000..19359d567d
--- /dev/null
+++ b/community/tg/makefile-remove-werror.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -4,7 +4,7 @@
+ LDFLAGS=@LDFLAGS@ @OPENSSL_LDFLAGS@
+ CPPFLAGS=@CPPFLAGS@ @OPENSSL_INCLUDES@
+ DEFS=@DEFS@
+-COMPILE_FLAGS=${CFLAGS} ${CPFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC
++COMPILE_FLAGS=${CFLAGS} ${CPFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC
+
+ EXTRA_LIBS=@LIBS@ @EXTRA_LIBS@ @OPENSSL_LIBS@
+ LOCAL_LDFLAGS=-rdynamic -ggdb -levent ${EXTRA_LIBS}
diff --git a/community/tg/makefile-tl-parser-nocrc32.patch b/community/tg/makefile-tl-parser-nocrc32.patch
new file mode 100644
index 0000000000..7e16ef61de
--- /dev/null
+++ b/community/tg/makefile-tl-parser-nocrc32.patch
@@ -0,0 +1,16 @@
+--- a/tgl/Makefile.tl-parser
++++ b/tgl/Makefile.tl-parser
+@@ -1,4 +1,4 @@
+-TL_PARSER_OBJECTS=${OBJ}/tl-parser.o ${OBJ}/tlc.o ${OBJ}/crc32.o
++TL_PARSER_OBJECTS=${OBJ}/tl-parser.o ${OBJ}/tlc.o
+
+ ${TL_PARSER_OBJECTS}: ${OBJ}/%.o: ${srcdir}/tl-parser/%.c | create_dirs
+ ${CC} ${INCLUDE} ${COMPILE_FLAGS} -iquote ${srcdir}/tl-parser -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
+--- a/Makefile.tl-parser
++++ b/Makefile.tl-parser
+@@ -1,4 +1,4 @@
+-TL_PARSER_OBJECTS=${OBJ}/tl-parser.o ${OBJ}/tlc.o ${OBJ}/crc32.o
++TL_PARSER_OBJECTS=${OBJ}/tl-parser.o ${OBJ}/tlc.o
+
+ ${TL_PARSER_OBJECTS}: ${OBJ}/%.o: ${srcdir}/tgl/tl-parser/%.c | create_dirs
+ ${CC} ${INCLUDE} ${COMPILE_FLAGS} -iquote ${srcdir}/tgl/tl-parser -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
diff --git a/community/tg/musl-include-fix.patch b/community/tg/musl-include-fix.patch
new file mode 100644
index 0000000000..a6cb63f2c7
--- /dev/null
+++ b/community/tg/musl-include-fix.patch
@@ -0,0 +1,14 @@
+--- a/tgl/generate.c
++++ b/tgl/generate.c
+@@ -25,7 +25,11 @@
+
+ #include <stdio.h>
+ #include <signal.h>
++
++#ifdef HAVE_EXECINFO_H
+ #include <execinfo.h>
++#endif
++
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <sys/types.h>