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

David Runge dvzrv at gemini.archlinux.org
Tue Aug 24 10:33:29 UTC 2021


    Date: Tuesday, August 24, 2021 @ 10:33:29
  Author: dvzrv
Revision: 1004499

upgpkg: nextcloud-app-spreed 1:12.1.0-1: Upgrade to 12.1.0.

Use unified approach to track the required nextcloud major version dependency.

Modified:
  nextcloud-app-spreed/trunk/PKGBUILD

----------+
 PKGBUILD |   27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-08-24 10:31:19 UTC (rev 1004498)
+++ PKGBUILD	2021-08-24 10:33:29 UTC (rev 1004499)
@@ -2,10 +2,8 @@
 
 _name=spreed
 pkgname=nextcloud-app-spreed
-pkgver=12.0.1
+pkgver=12.1.0
 pkgrel=1
-# epoch needed, because of fake semver:
-# https://github.com/nextcloud/spreed/issues/1685
 epoch=1
 pkgdesc="Video & audio-conferencing using WebRTC"
 arch=('any')
@@ -12,12 +10,18 @@
 url="https://apps.nextcloud.com/apps/spreed"
 license=('AGPL3')
 groups=('nextcloud-apps')
-depends=('nextcloud>=22' 'nextcloud<23')
+makedepends=('nextcloud')
 checkdepends=('ripgrep' 'yq')
 source=("https://github.com/nextcloud-releases/${_name}/releases/download/v${pkgver}/${_name}-${pkgver}.tar.gz")
-sha512sums=('1ac55d42f8a69568e9a0ae117a0f251e60b941cf0e74afdbbb5412660e4b1e6781c3086454aa007bcae24c5ee89a6cb3fb2cafdc40ac611f6c8c3959c6d2eda2')
-b2sums=('eafe68833316bde3d33749c4e320375dfd911832cec3368b71b2002692d73577212951b63ad8472df1250a8b41757d91a530603125dee2f9377796e1e608427d')
+sha512sums=('e8107700a1dc49d72826191eb8d3dca9170264733d4263dca66e94ee52b5e15d5f20275f50f4d8acb751a1ba0ffdfede61577e8293a8344c0b1ae622bc149ce2')
+b2sums=('049deda0d8dcaa228acb6d0b6b5115f352fefebc488d3b918a0dfac61899115e2e53d798dfc3db251c90dc63c1aad6616e192c4a716e167da0c9fa2df89e5bf8')
 
+_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)
+}
+
 prepare() {
   find ${_name} -type f -exec chmod 644 {} +
   find ${_name} -type d -exec chmod 755 {} +
@@ -24,10 +28,12 @@
 }
 
 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
+
+  if (("$(vercmp "${_nextcloud_major_version}" "${_app_min_major_version}")"<0)) || (("$(vercmp "${_nextcloud_major_version}" "${_app_max_major_version}")">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
@@ -34,6 +40,9 @@
 }
 
 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