blob: 39ddadcfc4717836fc6650982acd2212b3babb57 (
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
|
# Maintainer: Carlos Galindo <arch -at- cgj.es>
# Maintainer: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Jonas Heinrich <onny@project-insanity.org>
pkgname=nextcloud-app-polls
_appname=polls
pkgver=7.2.5
pkgrel=1
pkgdesc="Poll app for Nextcloud"
arch=('any')
url="https://github.com/nextcloud/polls"
license=('AGPL-3.0-or-later')
makedepends=('npm' 'composer' 'yq' 'rsync')
groups=('nextcloud-apps')
source=("${_appname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha512sums=('53390368ca2266d8db9077c6074ae44a37c5dd6e870f575ee389cbe2947454e6dbf9584f71c3545c791cbde6b5ed8c3842bce1e5d62b37e891b33af232c8f121')
build() {
cd "${srcdir}/polls-${pkgver}"
make -j1
}
_get_nextcloud_versions() {
_app_min_major_version="$(xq '.info.dependencies.nextcloud["@min-version"]' "${_appname}-${pkgver}/appinfo/info.xml"| sed 's/"//g')"
_app_max_major_version="$(xq '.info.dependencies.nextcloud["@max-version"]' "${_appname}-${pkgver}/appinfo/info.xml"| sed 's/"//g')"
_app_max_major_version=$(expr ${_app_max_major_version} + 1)
}
package() {
local _app_min_major_version
local _app_max_major_version
_get_nextcloud_versions
depends=("nextcloud>=$_app_min_major_version" "nextcloud<$_app_max_major_version")
install -d "${pkgdir}/usr/share/webapps/nextcloud/apps"
cp -a "${srcdir}/polls-${pkgver}/build/source/polls" \
"${pkgdir}/usr/share/webapps/nextcloud/apps"
}
|