[arch-commits] Commit in nextcloud-app-contacts/repos/community-testing-any (2 files)

Sergej Pupykin spupykin at archlinux.org
Wed Jul 7 12:15:53 UTC 2021


    Date: Wednesday, July 7, 2021 @ 12:15:53
  Author: spupykin
Revision: 975160

archrelease: copy trunk to community-testing-any

Added:
  nextcloud-app-contacts/repos/community-testing-any/PKGBUILD
    (from rev 975159, nextcloud-app-contacts/trunk/PKGBUILD)
Deleted:
  nextcloud-app-contacts/repos/community-testing-any/PKGBUILD

----------+
 PKGBUILD |   57 +++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 39 insertions(+), 18 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-07-07 12:15:45 UTC (rev 975159)
+++ PKGBUILD	2021-07-07 12:15:53 UTC (rev 975160)
@@ -1,18 +0,0 @@
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-
-pkgname=nextcloud-app-contacts
-pkgver=4.0.0
-pkgrel=1
-pkgdesc="Contacts app for nextcloud"
-arch=('any')
-url="https://github.com/nextcloud/contacts/"
-license=('GPL')
-depends=('nextcloud')
-options=('!strip')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/contacts/releases/download/v$pkgver/contacts.tar.gz")
-sha256sums=('e2f030f001e9a448f229870bfc515c7cd2a6adc8de4b0db41a82b73fb64b6681')
-
-package() {
-  install -d "$pkgdir"/usr/share/webapps/nextcloud/apps
-  cp -a "$srcdir"/contacts "$pkgdir"/usr/share/webapps/nextcloud/apps/contacts
-}

Copied: nextcloud-app-contacts/repos/community-testing-any/PKGBUILD (from rev 975159, nextcloud-app-contacts/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-07-07 12:15:53 UTC (rev 975160)
@@ -0,0 +1,39 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+
+pkgname=nextcloud-app-contacts
+_name=contacts
+pkgver=4.0.0
+pkgrel=2
+pkgdesc="Contacts app for nextcloud"
+arch=('any')
+url="https://github.com/nextcloud/contacts/"
+license=('GPL')
+depends=('nextcloud')
+makedepends=('ripgrep' 'yq')
+options=('!strip')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/contacts/releases/download/v$pkgver/contacts.tar.gz")
+sha256sums=('e2f030f001e9a448f229870bfc515c7cd2a6adc8de4b0db41a82b73fb64b6681')
+
+_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"/contacts "$pkgdir"/usr/share/webapps/nextcloud/apps/contacts
+}




More information about the arch-commits mailing list