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

David Runge dvzrv at gemini.archlinux.org
Sun Aug 8 19:57:13 UTC 2021


    Date: Sunday, August 8, 2021 @ 19:57:13
  Author: dvzrv
Revision: 995716

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

Switch to a more generic way of detecting and setting the supported nextcloud version boundaries.

Modified:
  nextcloud-app-news/trunk/PKGBUILD

----------+
 PKGBUILD |   27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-08-08 19:56:10 UTC (rev 995715)
+++ PKGBUILD	2021-08-08 19:57:13 UTC (rev 995716)
@@ -3,21 +3,28 @@
 
 pkgname=nextcloud-app-news
 _name=news
-pkgver=16.0.0
-pkgrel=2
+pkgver=16.0.1
+pkgrel=1
 pkgdesc="An RSS/Atom feed aggregator"
 arch=('any')
 url="https://github.com/nextcloud/news"
 license=('AGPL3')
-depends=('nextcloud>21' 'nextcloud<23')
-makedepends=('ripgrep' 'yq')
+makedepends=('nextcloud' 'ripgrep' 'yq')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/${_name}/releases/download/${pkgver}/${_name}.tar.gz")
-sha512sums=('1f5ff1f1379e3bbce91d9144268eb199d902a9d2c06ce459239b76625e4d241a05d6c891632ee50da10f417dc328682526a13fe16726703339d3bb24f7eb80d1')
-b2sums=('046fb0595fcbbd3c4a7d12de211f0be04d3dc72262fca7b63123eef6bc5ea1eb65f997cb1a89f287db66d41a8e2e7969ab1f9711bc8079328cc67060cdb288d2')
+sha512sums=('83070b2186ec481a947ceae767f3fd53068fce95579b07f9c6e5f9077008524c65dfbdec0110b77f512b917eb4096f2b3e83dd5ebc06d10066667fa3d9bb1fd6')
+b2sums=('eff81548d44f55ef40905b218fdf5c8cd1a25ee083745d0a1f3d348823893270bdacba510becc4c5760a84496ceea258b1516f182a115e9caeb38c6d9a3e282e')
 
+_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)
+}
+
 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 _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}"
@@ -26,6 +33,10 @@
 }
 
 package() {
+  _get_nextcloud_versions
+
+  depends=("nextcloud>=${_app_min_major_version}" "nextcloud<${_app_max_major_version}")
+
   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