desktop/cutegram/PKGBUILD
2016-09-11 15:00:48 +01:00

42 lines
1.4 KiB
Bash

pkgname=cutegram
_pkgname=Cutegram
pkgver=2.9.5
pkgrel=6
pkgdesc="A different telegram client from Aseman team"
arch=('x86_64')
url="http://aseman.co/en/products/cutegram/"
license=('GPL')
depends=('libqtelegram-ae' 'telegramqml' 'aseman-qt-tools' 'qt5-declarative')
optdepends=('gst-plugins-good: for audio and notification support'
'gst-plugins-bad: for audio support')
source=("https://github.com/Aseman-Land/Cutegram/archive/v$pkgver-dev.tar.gz"
'binarymode.patch')
sha1sums=('792c0ac9075638657f1939550508281a8400fde6'
'8a26a19d8742ad024209ad447aa0b7d82c9760f9')
prepare() {
cd "${srcdir}/${_pkgname}-$pkgver-dev"
# patch for binary mode, we didn't do this build way yet
patch -Np1 -i ${srcdir}/binarymode.patch
# change the heading application
sed 's,qmlscene,qmlscene-qt5,g' -i share/Cutegram.desktop
mkdir -p build
# modify desktop file for binaryMode
sed -i "s|qmlscene /usr/share/cutegram/3.0/main.qml|/usr/bin/cutegram|" share/Cutegram.desktop
}
build() {
cd "${srcdir}/${_pkgname}-$pkgver-dev/build"
qmake-qt5 QMAKE_CFLAGS_ISYSTEM= PREFIX=/usr DEFINES+=WEBENGINE_ASEMAN_WEBGRABBER CONFIG+=binaryMode ..
make
}
package() {
cd "${srcdir}/${_pkgname}-$pkgver-dev/build"
install -Dm755 cutegram "${pkgdir}/usr/bin/cutegram"
install -Dm644 ../share/Cutegram.desktop "${pkgdir}/usr/share/applications/Cutegram.desktop"
}