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