aboutsummaryrefslogtreecommitdiff
path: root/srcpkgs/nextcloud-client/template
blob: bb8618c754ec25b22f6580c2599271f1692724f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Template file for 'nextcloud-client'
pkgname=nextcloud-client
version=3.12.3
revision=1
build_style=cmake
configure_args="-DBUILD_UPDATER=NO -DBUILD_WITH_WEBENGINE=OFF -Wno-dev"
hostmakedepends="pkg-config inkscape"
makedepends="qt5-tools-devel qt5-declarative-devel qt5-webchannel-devel
 qt5-location-devel qtkeychain-qt5-devel sqlite-devel libcloudproviders-devel
 qt5-quickcontrols2-devel qt5-websockets-devel qt5-svg-devel karchive-devel
 qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
 $(vopt_if dolphin 'extra-cmake-modules kio-devel')
 $(vopt_if webengine 'qt5-webengine-devel')"
depends="qt5-graphicaleffects"
checkdepends="cmocka-devel"
conf_files="/etc/Nextcloud/sync-exclude.lst"
short_desc="NextCloud Desktop client"
maintainer="Rodrigo Oliveira <mdkcore@qtrnn.io>"
license="GPL-2.0-or-later"
homepage="https://nextcloud.com/clients/"
changelog="https://github.com/nextcloud/desktop/releases"
distfiles="https://github.com/nextcloud/desktop/archive/v${version}.tar.gz"
checksum=9466abfc663dd12bd9fc8e6812fd9c3ef9a685c773a473532294c638c460c00b
# https://github.com/void-linux/void-packages/pull/33358#discussion_r724518549
make_check=ci-skip

build_options="dolphin webengine"
desc_option_dolphin="Build KDE dolphin support"
desc_option_webengine="Build Qt5 WebEngine support"
build_options_default="dolphin"

if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then
	if [ "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ]; then
		build_options_default+=" webengine"
	fi
fi

if [ "$CROSS_BUILD" ]; then
	hostmakedepends+=" qt5-qmake qt5-host-tools qt5-tools"
	# provides desktoptojson
	hostmakedepends+=" $(vopt_if dolphin 'kcoreaddons')"
fi

subpackages="nextcloud-client-kwallet nextcloud-client-devel"
subpackages+=" $(vopt_if dolphin 'nextcloud-client-dolphin')"

if [ "$XBPS_CHECK_PKGS" ]; then
	configure_args+=" -DUNIT_TESTING=1"
	# argp.h is used only by testing and is not a requirement.
	# since unusable (linking fails), let's disable it instead
	case "$XBPS_TARGET_MACHINE" in
		#*-musl) export LDFLAGS=-largp;;
		*-musl) configure_args+=" -DHAVE_ARGP_H=0";;
	esac
fi

nextcloud-client-kwallet_package() {
	short_desc+=" - kwallet credential backend"
	depends="nextcloud-client>=${version}_${revision} kwallet"
	pkg_install() {
		vbin ${FILESDIR}/kwallet/nextcloud.kwallet
		vmkdir usr/share/applications
		cp build/src/gui/com.nextcloud.desktopclient.nextcloud.desktop \
		   ${DESTDIR}/usr/share/applications/nextcloud-kwallet.desktop
		vsed -i -e 's,^Exec=.*,Exec=/usr/bin/nextcloud.kwallet,' \
		     -e 's,\(^Name=.*\),\1 - use kwallet,' \
		     -e 's,\(^Comment=.*\),\1 - use kwallet credential storage,' \
		     -e '/^# Translations/,$d' \
		     ${DESTDIR}/usr/share/applications/nextcloud-kwallet.desktop
		vdoc ${FILESDIR}/kwallet/README.voidlinux
	}
}

nextcloud-client-dolphin_package() {
	short_desc+=" - KDE dolphin integration"
	depends="nextcloud-client>=${version}_${revision}"
	pkg_install() {
		vmove usr/lib/libnextclouddolphinpluginhelper.so
		vmove usr/lib/qt5
	}
}

nextcloud-client-devel_package() {
	depends="nextcloud-client>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/libnextcloudsync.so
	}
}