Username: Password: Remember me
# Maintainer: Hans Wilke
# Contributor: Konstantin Shalygin <k0ste@k0ste.ru>
 
pkgname='nextcloud-client'
pkgver='2.3.3'
pkgrel='1'
pkgdesc='Nextcloud desktop client'
arch=('x86_64')
url='https://nextcloud.com/'
license=('GPL2')
depends=('qt5-webkit' 'hicolor-icon-theme' 'xdg-utils' 'qtkeychain')
makedepends=('git' 'extra-cmake-modules' 'python3-sphinx' 'qt5-tools' 'doxygen' 'qtkeychain')
optdepends=('kio: Resource and network access abstraction (KDE)')
conflicts=('owncloud-client')
source=("${pkgname}::git+https://github.com/nextcloud/client_theming.git")
sha256sums=('SKIP')
backup=('etc/Nextcloud/sync-exclude.lst')
 
prepare() {
  cd $pkgname
  git submodule update --init --recursive
  mkdir -p build-linux
}
 
build() {
  cd $pkgname/build-linux
 
  cmake -D OEM_THEME_DIR=$srcdir/$pkgname/nextcloudtheme ../client \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_SYSCONFDIR=/etc/$pkgname \
        -Wno-dev
 
  make
  make doc-man
}
 
check() {
  sed -Ei 's|Icon(\[.*\])?=nextcloud|Icon\1=Nextcloud|g' "${pkgname}/build-linux/src/gui/nextcloud.desktop"
}
 
package() {
  cd $pkgname/build-linux
  make DESTDIR=$pkgdir install
}