# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Kuba Serafinowski <zizzfizzix(at)gmail(dot)com>

pkgname=owncloud-client
pkgver=6.0.1.17343
pkgrel=1
pkgdesc='ownCloud client based on mirall'
arch=(x86_64)
url='http://owncloud.org/'
license=(GPL2)
depends=(gcc-libs
         glibc
         kdsingleapplication
         libre-graph-api
         qt6-base
         qt6-declarative
         qt6-svg
         qtkeychain-qt6
         sqlite
         zlib)
makedepends=(doxygen
             extra-cmake-modules
             python-sphinx
             qt6-tools)
optdepends=('nemo-python: integration with Nemo'
            'python-caja: integration with Caja'
            'python-nautilus: integration with Nautilus')
backup=('etc/ownCloud/sync-exclude.lst')
source=(https://download.owncloud.com/desktop/ownCloud/stable/$pkgver/source/ownCloud-$pkgver.tar.xz) #{,.asc}
sha256sums=('e9596833674bca80b650bd8ae995613aca8e30ea1967e0b7c7b0ce54918490af')
validpgpkeys=(F05F7DD7953A07DF36579DAA498C45EBE94E7B37) # ownCloud Client Team (Signing Key) <info@owncloud.com>

build() {
  cmake -B build -S ownCloud-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_SKIP_INSTALL_RPATH=ON \
    -DBUILD_TESTING=OFF \
    -DKDE_INSTALL_SYSCONFDIR=/etc
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
