[arch-commits] Commit in nextcloud-app-bookmarks/trunk (PKGBUILD)
Sergej Pupykin
spupykin at archlinux.org
Fri May 14 14:23:58 UTC 2021
Date: Friday, May 14, 2021 @ 14:23:58
Author: spupykin
Revision: 934105
upgpkg: nextcloud-app-bookmarks 1:4.2.0-1
Modified:
nextcloud-app-bookmarks/trunk/PKGBUILD
----------+
PKGBUILD | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-05-14 14:23:06 UTC (rev 934104)
+++ PKGBUILD 2021-05-14 14:23:58 UTC (rev 934105)
@@ -1,8 +1,9 @@
# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
pkgname=nextcloud-app-bookmarks
+_name=bookmarks
epoch=1
-pkgver=4.1.0
+pkgver=4.2.0
pkgrel=1
pkgdesc="Bookmarks app for nextcloud"
arch=('any')
@@ -9,12 +10,31 @@
url="https://github.com/nextcloud/bookmarks"
license=('GPL')
depends=('nextcloud')
-makedepends=()
+makedepends=('ripgrep' 'yq')
options=('!strip')
source=("$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/bookmarks/releases/download/v$pkgver/bookmarks-$pkgver.tar.gz")
-sha256sums=('9e803eec7e4bdfe584cc3c58a4565c4126f2d982fdbff58c9fe82c3e8571e09c')
+sha256sums=('9c98eb894ecc4fd2ccc7c67aabab0f1d3f3672426f393d7bc202d298edc89167')
+_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')"
+}
+
+check() {
+ local _app_min_major_version
+ local _app_max_major_version
+ _get_nextcloud_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
+}
+
package() {
+ _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"/bookmarks "$pkgdir"/usr/share/webapps/nextcloud/apps/bookmarks
}
More information about the arch-commits
mailing list