PKGBUILD 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. # Maintainer (Arch): Caleb Maclennan <caleb@alerque.com>
  2. # Maintainer (Arch): Chih-Hsuan Yen <yan12125@archlinux.org>
  3. # Contributor (Arch): Tyler Dence <tyzoid@archlinux32.org>
  4. # Contributor (Arch): Konstantin Shalygin <k0ste@k0ste.ru>
  5. # Maintainer: David P. <megver83@parabola.nu>
  6. # Contributor: bill-auger <bill-auger@programmer.net>
  7. # parabola changes and rationale:
  8. # - build without qt5-webengine
  9. # - disable tests which require networking
  10. pkgbase=nextcloud-client
  11. # Put config files for libcloudproviders integration in a separate package as
  12. # there is no simple way yet to disable it.
  13. # See: https://gitlab.gnome.org/World/libcloudproviders/-/issues/17
  14. pkgname=(nextcloud-client nextcloud-client-cloudproviders)
  15. epoch=2
  16. # Upstream does not provide signed tarballs (yet)
  17. # https://github.com/nextcloud/desktop/issues/1510
  18. pkgver=3.10.0
  19. _tag=19a02ad0b0146167949a9a06d4cb4a1137df8153
  20. pkgrel=2
  21. pkgrel+=.parabola1
  22. arch=(x86_64)
  23. arch+=(i686 armv7h)
  24. url='https://nextcloud.com/'
  25. _url=https://github.com/nextcloud/desktop
  26. license=(GPL)
  27. makedepends=(cmocka
  28. doxygen
  29. extra-cmake-modules
  30. git
  31. inkscape
  32. kio5
  33. libcloudproviders
  34. openssl
  35. python-sphinx
  36. qt5-quickcontrols2
  37. qt5-svg
  38. qt5-tools
  39. qt5-websockets
  40. qtkeychain-qt5
  41. sqlite)
  42. source=("$pkgbase::git+$_url.git?signed#tag=$_tag")
  43. source+=(no-webengine.patch)
  44. validpgpkeys=(
  45. A26B951528EA1BA1678C7AE5D406C75CEE1A36D6 # https://github.com/camilasan
  46. 42E775EAA3E47F9E0D5CDB0E00819E3BF4177B28 # https://github.com/misch7
  47. 17166A5275C5FA6F1A48FD78074BBBCB8DECC9E2 # https://github.com/er-vin.gpg
  48. 0739B11EDA696A3616666F6AE04221E85C5BB816 # https://github.com/allexzander
  49. 267BF70F7905C2723B0243267D0F74F05C22F553 # https://github.com/mgallien
  50. 3A877D9A896A057948059DEDAD2C27357B2CB11D # https://github.com/FlexW
  51. )
  52. sha256sums=('SKIP'
  53. '1e6d35210a15b8dfa94582d7db875e6ede2cd6b4e70f12cda02ff0be5a6badfb')
  54. pkgver() {
  55. cd $pkgbase
  56. git describe --tags | sed 's/^v//;s/-/+/g'
  57. }
  58. _pkgver() {
  59. curl -fs https://api.github.com/repos/nextcloud/desktop/git/ref/tags/v$pkgver |
  60. jq -r .object.sha
  61. }
  62. prepare() {
  63. # tmpdir for check()
  64. mkdir -p tmpdir
  65. cd $pkgbase
  66. # Monkey patch that disables bulk upload capability which causes infinite
  67. # loops for many server/client combos. Feature is also disabled by default on
  68. # server end in v23.0.3 because it was so problematic. This can abe re-enabled
  69. # when underlying bug squashed:
  70. # https://github.com/nextcloud/desktop/issues/5726
  71. sed -i -e '/bulkupload/s/return _.*;$/return false;/' src/libsync/capabilities.cpp
  72. # Disable tests that touch on disabled feature
  73. sed -i -e '/SyncEngine/s/^/#/' -e '/Capabilities/s/^/#/' -e '/SecureFileDrop/s/^/#/' test/CMakeLists.txt
  74. # disable tests which require networking
  75. sed -i -e '/OAuth/s/^/#/' test/CMakeLists.txt
  76. sed -i -e '/PushNotifications/s/^/#/' test/CMakeLists.txt
  77. echo "applying no-webengine.patch"
  78. patch -Np1 -i "${srcdir}"/no-webengine.patch
  79. }
  80. build() {
  81. cd $pkgbase
  82. # bundled breakpad in libcrashreporter-qt submodule is too old and does not build with glibc >= 2.26
  83. # Upstream fix: https://github.com/google/breakpad/commit/bddcc58860f522a0d4cbaa7e9d04058caee0db9d
  84. cmake -B build -S . \
  85. -DCMAKE_BUILD_TYPE=None \
  86. -DCMAKE_INSTALL_PREFIX=/usr \
  87. -DWITH_CRASHREPORTER=OFF \
  88. -DBUILD_UPDATER=OFF \
  89. -DUNIT_TESTING=ON \
  90. -DPLUGINDIR=lib/qt/plugins # Fix vfs plugin install dir https://github.com/nextcloud/desktop/issues/3781#issuecomment-918918320
  91. # TODO: fix installation of PDF and HTML documents
  92. # WIP at https://github.com/yan12125/desktop/tree/doc-install-path
  93. make -C build all doc-man
  94. }
  95. check() {
  96. cd $pkgbase/build
  97. # Tests fail if $TMPDIR is too small; specify an alternative for machines
  98. # with a small /tmp partition.
  99. # Use UTC as TestCookies is sensitive to the timezone
  100. # https://github.com/nextcloud/desktop/blob/v3.2.2/test/testcookies.cpp#L24
  101. QT_QPA_PLATFORM=offscreen TMPDIR="$srcdir/tmpdir" TZ=UTC ARGS="--rerun-failed --output-on-failure" make test
  102. }
  103. package_nextcloud-client() {
  104. pkgdesc='Nextcloud desktop client'
  105. depends=(hicolor-icon-theme
  106. karchive5
  107. libcloudproviders
  108. openssl
  109. qt5-graphicaleffects
  110. qt5-quickcontrols
  111. qt5-quickcontrols2
  112. qt5-svg
  113. qt5-websockets
  114. qtkeychain-qt5
  115. sqlite
  116. xdg-utils)
  117. optdepends=('kio5: integration with Dolphin'
  118. 'nemo-python: integration with Nemo'
  119. 'python-nautilus: integration with Nautilus'
  120. 'python-caja: integration with Caja'
  121. 'nextcloud-client-cloudproviders: cloudproviders support')
  122. backup=('etc/Nextcloud/sync-exclude.lst')
  123. cd $pkgbase/build
  124. make DESTDIR="$pkgdir" install
  125. rm -v "$pkgdir"/usr/share/cloud-providers/com.nextcloudgmbh.Nextcloud.ini
  126. rm -v "$pkgdir"/usr/share/dbus-1/services/com.nextcloudgmbh.Nextcloud.service
  127. cd "$pkgdir"/usr/share && rmdir -p cloud-providers dbus-1/services
  128. }
  129. package_nextcloud-client-cloudproviders() {
  130. pkgdesc='cloudproviders support for the Nextcloud desktop client'
  131. depends=(nextcloud-client)
  132. cd $pkgbase/build
  133. make -C shell_integration/libcloudproviders DESTDIR="$pkgdir" install
  134. }