PKGBUILD 1.16 KB
Newer Older
1 2
pkgname=libqtelegram-ae
_pkgname=libqtelegram-aseman-edition
3 4
pkgver=10.0.0+72+gc8a34b0
pkgrel=2
5 6 7
pkgdesc="Telegram library written in Qt based on telegram-cli code"
arch=('x86_64')
license=('GPL3')
8
url="https://launchpad.net/libqtelegram"
9
depends=('qt5-base' 'qt5-multimedia')
10
makedepends=('cmake' 'git')
11 12 13 14
source=("$pkgname"::"git+https://github.com/Aseman-Land/libqtelegram-aseman-edition.git#commit=c8a34b0"
        libqtelegram-code-generator::git+https://github.com/Aseman-Land/libqtelegram-code-generator.git)
sha1sums=('SKIP'
          'SKIP')
15 16 17

pkgver() {
  cd $pkgname
18
  git describe --long | sed 's/\([^-]*-g\)/\1/;s/-/+/g' | sed 's/.stable//g' | sed 's/v//g'
19
}
20 21

prepare() {
22
  cd $pkgname
23 24 25 26 27 28 29 30 31
  mkdir -p build{,.init}
  mv ../libqtelegram-code-generator .
  cd build.init
  qmake-qt5 -r ../libqtelegram-code-generator
  make
  ./libqtelegram-generator 68 ../scheme/scheme-68.tl ..
  cd ../telegram
  chmod 644 */*.cpp
  chmod 644 */*.h
32 33 34
}

build() {
35
  cd $pkgname/build
36
  qmake-qt5 -r PREFIX=/usr INSTALL_LIBS_PREFIX=/usr/lib INSTALL_HEADERS_PREFIX=/usr/include QMAKE_CFLAGS_ISYSTEM= CONFIG+=typeobjects ..
37 38 39 40
  make
}

package() {
41
  cd $pkgname/build
42 43
  make INSTALL_ROOT="$pkgdir" install
}