blob: 02ae04f0a72f3d60e7e56ae8f2702b9c6b5ec759 (
plain)
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
|
# Maintainer: Darkfish Tech <arch at darkfish dot com dot au>
_appname=user_usage_report
pkgname=nextcloud-app-user-usage-report
pkgver=1.14.0
pkgrel=1
pkgdesc="Provides a command which generates a report about all the users and their usage."
arch=('any')
url="https://github.com/nextcloud/user_usage_report"
license=('AGPL-3.0-or-later')
makedepends=('yq' 'rsync')
source=("${_appname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha512sums=('0e2e233a23525f185fd5fcd5130e739d47ce2e85fb96a7f52dcc8c16435890d71b9242d8bf3077a4861dc299508b938ab35887133b8814f7fcc27a5e2a5816ca')
# Boilerplate nextcloud version calculation adopted from other packages
_get_nextcloud_versions() {
_app_min_major_version="$(xq '.info.dependencies.nextcloud["@min-version"] | tonumber' "${_appname}/appinfo/info.xml")"
_app_max_major_version="$(xq '.info.dependencies.nextcloud["@max-version"] | tonumber | .+1 | floor' "${_appname}/appinfo/info.xml")"
#echo "Min: ${_app_min_major_version}; Max: ${_app_max_major_version}"
}
_nextcloud_app_package() {
_get_nextcloud_versions
depends=("nextcloud>=${_app_min_major_version:-0}" "nextcloud<${_app_max_major_version:-999}")
}
# END Boilerplate nextcloud app version clamping
prepare() {
mv "${srcdir}/${_appname}-${pkgver}" "${srcdir}/${_appname}"
}
build() {
cd "${srcdir}/${_appname}"
make -j1
}
package() {
_install_dir="usr/share/webapps/nextcloud/apps"
install -d "${pkgdir}/${_install_dir}"
tar -x --no-same-owner -C "${pkgdir}/${_install_dir}" \
-f "${srcdir}/${_appname}/build/artifacts/${_appname}.tar.gz"
_nextcloud_app_package
}
|