git » nextcloud-client.git » commit bc9ea82

split cloudproviders support to another package

author Chih-Hsuan Yen
2020-11-08 14:33:16 UTC
committer Chih-Hsuan Yen
2020-11-08 14:33:16 UTC
parent 31012316dcc004f0374273864c4d9bc28fc1c67e

split cloudproviders support to another package

With cloudproviders support, nextcloud-client is invoked by systemd automatically
when a file dialog of a GTK+ application is created. It is considered annoying
by many users [1][2], hence the split.

[1] https://bbs.archlinux.org/viewtopic.php?id=259764
[2] https://bbs.archlinux.org/viewtopic.php?id=260533

PKGBUILD +36 -19

diff --git a/PKGBUILD b/PKGBUILD
index a3c6ee1..b9aaf16 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,32 +2,26 @@
 # Contributor: Tyler Dence <tyzoid@archlinux32.org>
 # Contributor: Konstantin Shalygin <k0ste@k0ste.ru>
 
-pkgname=nextcloud-client
+pkgbase=nextcloud-client
+pkgname=(nextcloud-client nextcloud-client-cloudproviders)
 # Upstream does not provide signed tarballs (yet)
 # https://github.com/nextcloud/desktop/issues/1510
 pkgver=3.0.3
-pkgrel=1
-pkgdesc='Nextcloud desktop client'
+pkgrel=2
 arch=(x86_64)
 url='https://nextcloud.com/'
 license=(GPL)
-depends=(openssl sqlite qtkeychain qt5-svg qt5-webengine xdg-utils libcloudproviders
-         qt5-graphicaleffects qt5-quickcontrols2)
-makedepends=(doxygen extra-cmake-modules kio python-sphinx qt5-tools git cmocka)
-optdepends=(
-  'kio: integration with Dolphin'
-  'nemo-python: integration with Nemo'
-  'python-nautilus: integration with Nautilus'
-  'python-caja: integration with Caja'
-)
-source=("$pkgname::git+https://github.com/nextcloud/desktop.git?signed#tag=v$pkgver")
+makedepends=(libcloudproviders openssl sqlite
+             qt5-quickcontrols2 qt5-svg qt5-tools qt5-webengine qtkeychain
+             extra-cmake-modules kio
+             cmocka doxygen git python-sphinx)
+source=("$pkgbase::git+https://github.com/nextcloud/desktop.git?signed#tag=v$pkgver")
 validpgpkeys=(
   A26B951528EA1BA1678C7AE5D406C75CEE1A36D6  # one of keys controlled by github.com/camilasan
   42E775EAA3E47F9E0D5CDB0E00819E3BF4177B28  # controlled by github.com/misch7
   17166A5275C5FA6F1A48FD78074BBBCB8DECC9E2  # https://github.com/er-vin.gpg
 )
 sha256sums=('SKIP')
-backup=('etc/Nextcloud/sync-exclude.lst')
 
 prepare() {
   # tmpdir for check()
@@ -35,11 +29,11 @@ prepare() {
 
   # Use system GNUInstallDirs.cmake so that we can benefit from
   # https://gitlab.kitware.com/cmake/cmake/merge_requests/3735
-  rm -v $pkgname/cmake/modules/GNUInstallDirs.cmake
+  rm -v $pkgbase/cmake/modules/GNUInstallDirs.cmake
 }
 
 build() {
-  cd $pkgname
+  cd $pkgbase
 
   # bundled breakpad in libcrashreporter-qt submodule is too old and does not build with glibc >= 2.26
   # Upstream fix: https://github.com/google/breakpad/commit/bddcc58860f522a0d4cbaa7e9d04058caee0db9d
@@ -56,15 +50,38 @@ build() {
 }
 
 check() {
-  cd $pkgname/build
+  cd $pkgbase/build
 
   # Tests fail if $TMPDIR is too small; specify an alternative for machines
   # with a small /tmp partition.
   TMPDIR="$srcdir/tmpdir" make test
 }
 
-package() {
-  cd $pkgname/build
+package_nextcloud-client() {
+  pkgdesc='Nextcloud desktop client'
+  depends=(openssl sqlite qtkeychain qt5-svg qt5-webengine xdg-utils libcloudproviders
+           qt5-graphicaleffects qt5-quickcontrols2)
+  optdepends=(
+    'kio: integration with Dolphin'
+    'nemo-python: integration with Nemo'
+    'python-nautilus: integration with Nautilus'
+    'python-caja: integration with Caja'
+    'nextcloud-client-cloudproviders: cloudproviders support'
+  )
+  backup=('etc/Nextcloud/sync-exclude.lst')
+
+  cd $pkgbase/build
 
   make DESTDIR="$pkgdir" install
+
+  rm -v "$pkgdir"/usr/share/cloud-providers/com.nextcloudgmbh.Nextcloud.ini
+  rm -v "$pkgdir"/usr/share/dbus-1/services/com.nextcloudgmbh.Nextcloud.service
+}
+
+package_nextcloud-client-cloudproviders() {
+  pkgdesc='cloudproviders support for the Nextcloud desktop client'
+  depends=(nextcloud-client)
+
+  cd $pkgbase/build
+  make -C shell_integration/libcloudproviders DESTDIR="$pkgdir" install
 }