# $Id: PKGBUILD 145649 2015-11-02 14:40:05Z fyan $
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=libcontentaction
pkgver=0.2.6
pkgrel=1
pkgdesc="Library for associating content with actions"
arch=('i686' 'x86_64')
url="https://git.merproject.org/mer-core/libcontentaction"
license=('LGPL')
depends=('qt5-systems' 'mlite')
makedepends=('git' 'qt5-tools' 'python2')
source=("git+https://git.merproject.org/mer-core/libcontentaction.git#tag=$pkgver")
sha256sums=('SKIP')

prepare() {
  cd libcontentaction
  find . -name '*.py' -o -name 'gen-regexps' -type f -exec sed -i 's@^#!.*python$@#!/usr/bin/python2@' {} +
}

build() {
  cd libcontentaction

  qmake-qt5
  make
}

package() {
  cd libcontentaction

  make INSTALL_ROOT="${pkgdir}" install

  # Remove tests
  rm -r "$pkgdir/opt"
}
