# Maintainer: Sergej Pupykin <arch+pub@sergej.pp.ru>

pkgname=psi-plugins
pkgver=1.6
_psiver=1.6_b1
pkgrel=1
pkgdesc="Additional features for Psi"
arch=('x86_64')
url="https://psi-im.org"
license=('GPL2')
depends=('psi' 'qca-qt6')
makedepends=('libotr' 'tidy' 'cmake' 'git')
optdepends=('libotr: OTR plugin'
            'tidy: OTR plugin')
source=("git+https://github.com/psi-im/plugins.git#tag=$pkgver"
	"git+https://github.com/psi-im/psi.git#tag=${_psiver}")
sha256sums=('70a9ccf8b8057fc76e9476957f0029f10e70c12ff30a86fa403368434e42d04c'
            'eb25695f5e1d30b36f97bdcb6f6facc07358e0fadcc4649c1ddebdd8a54cccd7')

build() {
  cd plugins
  mkdir -p build
  cd build
  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
    -DQT_DEFAULT_MAJOR_VERSION=6 \
    -DBUILD_PLUGINS="-otrplugin"
  make
}

package() {
  cd plugins/build
  make install DESTDIR="$pkgdir"
}
