Date: Saturday, May 7, 2022 @ 09:06:43 Author: dvzrv Revision: 1196138
upgpkg: nextcloud-app-bookmarks 1:10.3.1-2: Rebuild to add versioned dependency constraint on php. Modified: nextcloud-app-bookmarks/trunk/PKGBUILD ----------+ PKGBUILD | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-05-07 09:06:20 UTC (rev 1196137) +++ PKGBUILD 2022-05-07 09:06:43 UTC (rev 1196138) @@ -4,7 +4,7 @@ _name=bookmarks epoch=1 pkgver=10.3.1 -pkgrel=1 +pkgrel=2 pkgdesc="Bookmarks app for nextcloud" arch=(any) url="https://github.com/nextcloud/bookmarks" @@ -23,6 +23,12 @@ _app_max_major_version=$(expr ${_app_max_major_version} + 1) } +_get_php_versions() { + _app_min_php="$(xq '.info.dependencies.php["@min-version"]' "$_name/appinfo/info.xml"| sed 's/"//g')" + _app_max_php="$(xq '.info.dependencies.php["@max-version"]' "$_name/appinfo/info.xml"| sed 's/"//g')" +} + + check() { local _app_min_major_version local _app_max_major_version @@ -37,8 +43,22 @@ package() { _get_nextcloud_versions + _get_php_versions depends=("nextcloud>=${_app_min_major_version}" "nextcloud<${_app_max_major_version}") + if [[ "$_app_min_php" != 'null' ]]; then + depends+=( + "php>=$_app_min_php" + ) + fi + if [[ "$_app_max_php" != 'null' ]]; then + depends+=( + "php<=$_app_max_php" + ) + fi + if [[ "$_app_min_php" == 'null' ]] && [[ "$_app_max_php" == 'null' ]]; then + depends+=(php) + fi install -d "$pkgdir"/usr/share/webapps/nextcloud/apps cp -a "$srcdir"/bookmarks "$pkgdir"/usr/share/webapps/nextcloud/apps/bookmarks
