[arch-commits] Commit in nextcloud-app-bookmarks/repos/community-any (2 files)
Sergej Pupykin
spupykin at archlinux.org
Fri May 14 14:24:07 UTC 2021
Date: Friday, May 14, 2021 @ 14:24:06
Author: spupykin
Revision: 934106
archrelease: copy trunk to community-any
Added:
nextcloud-app-bookmarks/repos/community-any/PKGBUILD
(from rev 934105, nextcloud-app-bookmarks/trunk/PKGBUILD)
Deleted:
nextcloud-app-bookmarks/repos/community-any/PKGBUILD
----------+
PKGBUILD | 60 ++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 40 insertions(+), 20 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-05-14 14:23:58 UTC (rev 934105)
+++ PKGBUILD 2021-05-14 14:24:06 UTC (rev 934106)
@@ -1,20 +0,0 @@
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-
-pkgname=nextcloud-app-bookmarks
-epoch=1
-pkgver=4.1.0
-pkgrel=1
-pkgdesc="Bookmarks app for nextcloud"
-arch=('any')
-url="https://github.com/nextcloud/bookmarks"
-license=('GPL')
-depends=('nextcloud')
-makedepends=()
-options=('!strip')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/bookmarks/releases/download/v$pkgver/bookmarks-$pkgver.tar.gz")
-sha256sums=('9e803eec7e4bdfe584cc3c58a4565c4126f2d982fdbff58c9fe82c3e8571e09c')
-
-package() {
- install -d "$pkgdir"/usr/share/webapps/nextcloud/apps
- cp -a "$srcdir"/bookmarks "$pkgdir"/usr/share/webapps/nextcloud/apps/bookmarks
-}
Copied: nextcloud-app-bookmarks/repos/community-any/PKGBUILD (from rev 934105, nextcloud-app-bookmarks/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-05-14 14:24:06 UTC (rev 934106)
@@ -0,0 +1,40 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+
+pkgname=nextcloud-app-bookmarks
+_name=bookmarks
+epoch=1
+pkgver=4.2.0
+pkgrel=1
+pkgdesc="Bookmarks app for nextcloud"
+arch=('any')
+url="https://github.com/nextcloud/bookmarks"
+license=('GPL')
+depends=('nextcloud')
+makedepends=('ripgrep' 'yq')
+options=('!strip')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/bookmarks/releases/download/v$pkgver/bookmarks-$pkgver.tar.gz")
+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