[arch-commits] Commit in nextcloud-app-deck/repos (2 files)
David Runge
dvzrv at gemini.archlinux.org
Thu May 5 22:05:38 UTC 2022
Date: Thursday, May 5, 2022 @ 22:05:38
Author: dvzrv
Revision: 1195548
archrelease: copy trunk to community-staging-any
Added:
nextcloud-app-deck/repos/community-staging-any/
nextcloud-app-deck/repos/community-staging-any/PKGBUILD
(from rev 1195547, nextcloud-app-deck/trunk/PKGBUILD)
----------+
PKGBUILD | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
Copied: nextcloud-app-deck/repos/community-staging-any/PKGBUILD (from rev 1195547, nextcloud-app-deck/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2022-05-05 22:05:38 UTC (rev 1195548)
@@ -0,0 +1,81 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# Contributor: Jonas Heinrich <onny at project-insanity.org>
+
+pkgname=nextcloud-app-deck
+_name=deck
+pkgver=1.7.0
+pkgrel=1
+# upstream doesn't adhere to semver:
+# https://github.com/nextcloud/deck/issues/1197
+epoch=1
+pkgdesc="Kanban style organization tool aimed at personal planning and project organization"
+arch=(any)
+url="https://github.com/nextcloud/deck"
+license=(AGPL3)
+groups=(nextcloud-apps)
+makedepends=(nextcloud ripgrep yq)
+source=($_name-$pkgver.tar.gz::https://github.com/nextcloud/$_name/releases/download/v$pkgver/$_name.tar.gz)
+sha512sums=('cf8a74e6469be2bf143ce4a3e4065384c014080b996f9e4877333a308ce7c29af43502399e88be824ca37aeb85b208d149c3425dda7ea7445f7f1a2f660bff54')
+b2sums=('586dbaf964fd9b14115b0042f79347fd527e15c7faaf01b2e90e0bc40136e42598a8dc3b701fe09aecdf8047de9ab7c0e229ddc0246610768612d5b99400d89b')
+
+_get_nextcloud_versions() {
+ _app_min_major_version="$(xq '.info.dependencies.nextcloud["@min-version"]' "${_name}/appinfo/info.xml"| sed 's/"//g')"
+ _app_max_major_version="$(xq '.info.dependencies.nextcloud["@max-version"]' "${_name}/appinfo/info.xml"| sed 's/"//g')"
+ _app_max_major_version=$(expr ${_app_max_major_version} + 1)
+}
+
+_get_php_versions() {
+ _app_min_php="$(xq '.info.dependencies.php["@min-version"]' "$_name/appinfo/info.xml"| sed 's/"//g')"
+ _app_max_php="$(xq '.info.dependencies.php["@max-version"]' "$_name/appinfo/info.xml"| sed 's/"//g')"
+}
+
+check() {
+ local _app_min_major_version
+ local _app_max_major_version
+ _get_nextcloud_versions
+ _get_php_versions
+
+ local _nextcloud_major_version="$(rg "OC_Version = " /usr/share/webapps/nextcloud/version.php |cut -d'(' -f2| cut -d ',' -f1)"
+ if [[ "$(vercmp "${_nextcloud_major_version}" "${_app_min_major_version}")" -lt 0 ]] || [[ "$(vercmp "${_nextcloud_major_version}" "${_app_max_major_version}")" -gt 0 ]] ; then
+ printf "%s requires nextcloud >= %s/ nextcloud <= %s, but nextcloud %s is provided.\n" "$pkgname" "${_app_min_major_version}" "${_app_max_major_version}" "${_nextcloud_major_version}"
+ exit 1
+ fi
+
+ local _php_version="$(php --version |head -n1 |cut -d ' ' -f2 |sed 's/.[0-9]*$//g')"
+ if [[ "$(vercmp "$_php_version" "$_app_min_php" )" -lt 0 ]]; then
+ printf "%s requires php >= %s, but %s is provided\n" $pkgname $_app_min_php $_php_version
+ exit 1
+ fi
+ if [[ $_app_max_php != 'null' ]]; then
+ if [[ "$(vercmp "$_php_version" "$_app_min_php" )" -lt 0 ]]; then
+ printf "%s requires php <= %s, but %s is provided\n" $pkgname $_app_min_php $_php_version
+ exit 1
+ fi
+ fi
+}
+
+package() {
+ _get_nextcloud_versions
+ _get_php_versions
+
+ depends=(
+ "nextcloud>=$_app_min_major_version"
+ "nextcloud<$_app_max_major_version"
+ )
+ if [[ "$_app_min_php" != 'null' ]]; then
+ depends+=(
+ "php>=$_app_min_php"
+ )
+ fi
+ if [[ "$_app_max_php" != 'null' ]]; then
+ depends+=(
+ "php<=$_app_max_php"
+ )
+ fi
+ if [[ "$_app_min_php" == 'null' ]] && [[ "$_app_max_php" == 'null' ]]; then
+ depends+=(php)
+ fi
+
+ install -vdm 755 "${pkgdir}/usr/share/webapps/nextcloud/apps/"
+ cp -av "${_name}" "${pkgdir}/usr/share/webapps/nextcloud/apps/"
+}
More information about the arch-commits
mailing list