aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-12-31 19:15:38 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-12-31 20:27:13 +0100
commite550ebe21bac10ef10d1466e148d779aae5ba727 (patch)
tree8de398b660bdee3991beb9b1cbd8599f0481bed6
parent4718ece0724ea2525ccd100fe5568faa65585b75 (diff)
downloadaports-e550ebe21bac10ef10d1466e148d779aae5ba727.tar.bz2
aports-e550ebe21bac10ef10d1466e148d779aae5ba727.tar.xz
community/tg: improve and fix abuild
-rw-r--r--community/tg/APKBUILD55
1 files changed, 17 insertions, 38 deletions
diff --git a/community/tg/APKBUILD b/community/tg/APKBUILD
index 4a3c6fb4fc..c61b4e952e 100644
--- a/community/tg/APKBUILD
+++ b/community/tg/APKBUILD
@@ -3,47 +3,38 @@
pkgname=tg
pkgver=1.3.1
pkgrel=7
-tglver=2.0.1
-tlparserver=0_git20151118
+_tglver=2.0.1
+_tlparserver=0_git20151118
pkgdesc="Command line Telegram client"
url="https://github.com/vysheng/tg"
arch="all !s390x"
license="GPL-3.0"
-depends=""
depends_dev="readline-dev libressl-dev libconfig-dev libevent-dev jansson-dev lua5.2-dev"
makedepends="$depends_dev zlib-dev grep"
-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
- http://dev.alpinelinux.org/archive/tl-parser/tl-parser-${tlparserver}.tar.gz
+ tgl-$_tglver.tar.gz::https://github.com/vysheng/tgl/archive/$_tglver.tar.gz
+ http://dev.alpinelinux.org/archive/tl-parser/tl-parser-$_tlparserver.tar.gz
makefile-tl-parser-nocrc32.patch
musl-include-fix.patch
makefile-remove-werror.patch
"
-giturl="https://github.com/vysheng/tl-parser.git"
-disturl="http://dev.alpinelinux.org:/archive/tl-parser"
pkgusers="telegram"
pkggroups="telegram"
-
-_builddir="$srcdir/tg-$pkgver"
+builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- cd "$_builddir"
- mv "$srcdir"/tg-$tlparserver/* "$srcdir/tgl-$tglver/tl-parser" || return 1
- mv "$srcdir"/tgl-$tglver/* "$srcdir/tg-$pkgver/tgl" || return 1
+ cd "$builddir"
+ mv "$srcdir"/tg-$_tlparserver/* "$srcdir/tgl-$_tglver/tl-parser"
+ mv "$srcdir"/tgl-$_tglver/* "$srcdir/tg-$pkgver/tgl"
- local i
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
+ default_prepare
}
build() {
- cd "$_builddir"
+ cd "$builddir"
+
export LUA=/usr/bin/lua5.2
export LUA_INCLUDE=-I/usr/include/lua5.2
export LUA_LIB=$(pkg-config --libs lua5.2)
@@ -54,31 +45,19 @@ build() {
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-libconfig \
- --enable-liblua \
- || return 1
- make || return 1
+ --enable-liblua
+ make
}
package() {
- cd "$_builddir"
+ cd "$builddir"
+
install -D bin/telegram-cli \
- "$pkgdir"/usr/bin/telegram-cli || return 1
+ "$pkgdir"/usr/bin/telegram-cli
install -D tg-server.pub \
- "$pkgdir"/etc/telegram-cli/tg.pub || return 1
+ "$pkgdir"/etc/telegram-cli/tg.pub
}
-md5sums="42ce2a35dd124102885c81d70528ee0b tg-1.3.1.tar.gz
-50c87ee147041ed51685965ab0affeb0 tgl-2.0.1.tar.gz
-c0452adb8ae3f1a84484515eb806710a tl-parser-0_git20151118.tar.gz
-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
-e4ab6130b542c199b23cf6e082c6fa84fee99f32efadba0ca16e6f7e76d0461d tl-parser-0_git20151118.tar.gz
-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
a7f16bd2cdedf62a1dbd180fcf957850d3b1c1c08b99f4f389ef5a83e228eb773e5da84e3127455880f4ebb526787bdae097200b337ae6df74b50bebec7c92fe tl-parser-0_git20151118.tar.gz