[arch-commits] Commit in nextcloud-app-news/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Fri Apr 30 08:04:47 UTC 2021


    Date: Friday, April 30, 2021 @ 08:04:47
  Author: dvzrv
Revision: 925327

upgpkg: nextcloud-app-news 15.4.0-1: Upgrade to 15.4.0.

Implement check against nextcloud major version in check().

Modified:
  nextcloud-app-news/trunk/PKGBUILD

----------+
 PKGBUILD |   19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-04-30 08:04:07 UTC (rev 925326)
+++ PKGBUILD	2021-04-30 08:04:47 UTC (rev 925327)
@@ -3,17 +3,28 @@
 
 pkgname=nextcloud-app-news
 _name=news
-pkgver=15.3.2
+pkgver=15.4.0
 pkgrel=1
 pkgdesc="An RSS/Atom feed aggregator"
 arch=('any')
 url="https://github.com/nextcloud/news"
 license=('AGPL3')
-depends=('nextcloud')
+depends=('nextcloud>21' 'nextcloud<22')
+makedepends=('ripgrep' 'yq')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/${_name}/releases/download/${pkgver}/${_name}.tar.gz")
-sha512sums=('40dca13bb4006e250ec55d3bb7e9bb7d6539cf607e8fa7b69c58aee37316af1a440cd185c2f319bfeb4268480f76e7e4b27580eadaa1943381527d00a9bd13f7')
-b2sums=('d0dba3784323b15c18f10046c3a90b99acbb8d620075117767e468378659a90fc8866d53b3a5d9a95ca5bb18fae5997d459bfaf87f147c1a46598ad20076f9bc')
+sha512sums=('4f5a85a312fa10ee7e9345a89a81055a3e7c584ba9775c148531492f9538cd7a7f4e597ed3b7154f661fbaad6249c28d5f6e91070c8fe8fc3b1278cef850d3ea')
+b2sums=('f4b6ed210471ccc3087c67cdba95fda46046617d2316af2e4f3657881de2ae083b02585c9686bd959e55340238be723115c9ff949537bca711ae9aac773043a2')
 
+check() {
+  local _app_min_major_version="$(xq '.info.dependencies.nextcloud["@min-version"]' "${_name}/appinfo/info.xml"| sed 's/"//g')"
+  local _app_max_major_version="$(xq '.info.dependencies.nextcloud["@max-version"]' "${_name}/appinfo/info.xml"| sed 's/"//g')"
+  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() {
   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