[arch-commits] Commit in nextcloud-app-news/repos (2 files)

David Runge dvzrv at gemini.archlinux.org
Thu Dec 9 18:50:05 UTC 2021


    Date: Thursday, December 9, 2021 @ 18:50:05
  Author: dvzrv
Revision: 1065868

archrelease: copy trunk to community-testing-any

Added:
  nextcloud-app-news/repos/community-testing-any/
  nextcloud-app-news/repos/community-testing-any/PKGBUILD
    (from rev 1065867, nextcloud-app-news/trunk/PKGBUILD)

----------+
 PKGBUILD |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Copied: nextcloud-app-news/repos/community-testing-any/PKGBUILD (from rev 1065867, nextcloud-app-news/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2021-12-09 18:50:05 UTC (rev 1065868)
@@ -0,0 +1,42 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# Contributor: Jonas Heinrich <onny at project-insanity.org>
+
+pkgname=nextcloud-app-news
+_name=news
+pkgver=17.0.1
+pkgrel=1
+pkgdesc="An RSS/Atom feed aggregator"
+arch=(any)
+url="https://github.com/nextcloud/news"
+license=(AGPL3)
+makedepends=(nextcloud ripgrep yq)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/${_name}/releases/download/${pkgver}/${_name}.tar.gz")
+sha512sums=('17e5404196a22b2ee932c24cbffd9315b735005d6dcd27304bd9ac9d14afc821c072881403598b3fb50117080e22f8bb5a6d61b1d5494fe161c204978efd8496')
+b2sums=('ae15022de9bc5190296efffeb8e62b7a31fd664401854414464a253873db6587745f8b5c68ff37cfae36a850374b05f768b10c59f494fb3dfc82b1dc0c5580fc')
+
+_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
+  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 -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