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

pkgname=psi-plugins
pkgver=1.6.2
_psiver=1.6_b2
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=('9d751e4a935a25c2bd0343f6034021d169d73a8e84e653fa1ebf55b59202901e'
            '50d7ce70ec0c0bd4ae06ea2ce23346dee62474969f55b324a7b416f8a009eba7')

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"
}
