PKGBUILD 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Maintainer (Arch): Caleb Maclennan <caleb@alerque.com>
  3. # Maintainer (Arch): Christian Heusel <gromit@archlinux.org>
  4. # Contributor: Chih-Hsuan Yen <yan12125@archlinux.org>
  5. # Contributor: Fabian Bornschein <fabiscafe@mailbox.org>
  6. # Contributor: Tyler Dence <tyzoid@archlinux32.org>
  7. # Contributor: Konstantin Shalygin <k0ste@k0ste.ru>
  8. # Contributor: bill-auger <bill-auger@programmer.net>
  9. # Upstream does not provide signed tarballs (yet), see:
  10. # https://github.com/nextcloud/desktop/issues/1510
  11. #
  12. # Updates to signed Git tags requires refreshing repo once first before
  13. # integrity checks will work:
  14. #
  15. # makepkg -o --nodeps --skippgpcheck
  16. # parabola changes and rationale:
  17. # - build without qt5-webengine (BUILD_WITH_WEBENGINE=OFF)
  18. # - disable tests which require networking
  19. pkgname=nextcloud-client
  20. pkgdesc='Nextcloud desktop client'
  21. epoch=2
  22. pkgver=3.15.3
  23. pkgrel=1
  24. pkgrel+=.parabola1
  25. arch=(x86_64)
  26. arch+=(i686 armv7h)
  27. url='https://nextcloud.com/'
  28. _url=https://github.com/nextcloud/desktop
  29. license=(GPL-2.0-or-later)
  30. depends=(hicolor-icon-theme
  31. karchive
  32. kguiaddons
  33. libcloudproviders
  34. openssl
  35. qt6-declarative
  36. qt6-svg
  37. qt6-websockets
  38. qt6-5compat
  39. qtkeychain-qt6
  40. sqlite
  41. xdg-utils)
  42. replaces=(nextcloud-client-cloudproviders)
  43. conflicts=(nextcloud-client-cloudproviders)
  44. provides=(nextcloud-client-cloudproviders)
  45. optdepends=('kio: integration with Dolphin'
  46. 'nemo-python: integration with Nemo'
  47. 'nautilus-python: integration with Nautilus'
  48. 'python-caja: integration with Caja')
  49. backup=('etc/Nextcloud/sync-exclude.lst')
  50. makedepends=(cmocka
  51. doxygen
  52. extra-cmake-modules
  53. git
  54. kio
  55. librsvg
  56. python-sphinx
  57. qt6-tools)
  58. source=("$pkgname::git+$_url.git?signed#tag=v$pkgver")
  59. validpgpkeys=(A26B951528EA1BA1678C7AE5D406C75CEE1A36D6 # https://github.com/camilasan
  60. 42E775EAA3E47F9E0D5CDB0E00819E3BF4177B28 # https://github.com/misch7
  61. 17166A5275C5FA6F1A48FD78074BBBCB8DECC9E2 # https://github.com/er-vin
  62. 0739B11EDA696A3616666F6AE04221E85C5BB816 # https://github.com/allexzander
  63. 267BF70F7905C2723B0243267D0F74F05C22F553 # https://github.com/mgallien
  64. 3A877D9A896A057948059DEDAD2C27357B2CB11D) # https://github.com/FlexW
  65. sha256sums=('2fcaf3d419d4e4a237be0440dd7beb22c7d1f63db8b205cc61b6ab3be678d578')
  66. prepare() {
  67. # tmpdir for check()
  68. mkdir -p tmpdir
  69. cd $pkgname
  70. # Monkey patch that disables bulk upload capability which causes infinite
  71. # loops for many server/client combos. Feature is also disabled by default on
  72. # server end in v23.0.3 because it was so problematic. This can abe re-enabled
  73. # when underlying bug squashed:
  74. # https://github.com/nextcloud/desktop/issues/5726
  75. sed -i \
  76. -e '/bulkupload/s/return _.*;$/return false;/' \
  77. src/libsync/capabilities.cpp
  78. # Disable tests that touch on disabled feature
  79. sed -i \
  80. -e '/SyncEngine/s/^/#/' \
  81. -e '/Capabilities/s/^/#/' \
  82. -e '/SecureFileDrop/s/^/#/' \
  83. test/CMakeLists.txt
  84. # Disable tests that require networking
  85. sed -i \
  86. -e '/RemoteDiscovery/s/^/#/' \
  87. -e '/PushNotifications/s/^/#/' \
  88. test/CMakeLists.txt
  89. }
  90. build() {
  91. cd $pkgname
  92. # bundled breakpad in libcrashreporter-qt submodule is too old and does not build with glibc >= 2.26
  93. # Upstream fix: https://github.com/google/breakpad/commit/bddcc58860f522a0d4cbaa7e9d04058caee0db9d
  94. cmake -B build -S . \
  95. -D CMAKE_BUILD_TYPE=None \
  96. -D CMAKE_INSTALL_PREFIX=/usr \
  97. -D WITH_CRASHREPORTER=OFF \
  98. -D BUILD_UPDATER=OFF \
  99. -D UNIT_TESTING=ON \
  100. -D PLUGINDIR=lib/qt6/plugins \
  101. -D BUILD_WITH_WEBENGINE=OFF
  102. # TODO: fix installation of PDF and HTML documents
  103. # WIP at https://github.com/yan12125/desktop/tree/doc-install-path
  104. make -C build all doc-man
  105. }
  106. check() {
  107. cd $pkgname/build
  108. # Tests fail if $TMPDIR is too small; specify an alternative for machines
  109. # with a small /tmp partition.
  110. # Use UTC as TestCookies is sensitive to the timezone
  111. # https://github.com/nextcloud/desktop/blob/v3.2.2/test/testcookies.cpp#L24
  112. env \
  113. QT_QPA_PLATFORM=offscreen \
  114. TMPDIR="$srcdir/tmpdir" \
  115. TZ=UTC \
  116. ARGS="--rerun-failed --output-on-failure" \
  117. make test
  118. }
  119. package() {
  120. cd $pkgname/build
  121. make DESTDIR="$pkgdir" install
  122. }