From 35130aac1136fe1d409835a11e4cd8fd9444ab80 Mon Sep 17 00:00:00 2001 From: s3lph Date: Mon, 4 Mar 2024 22:40:54 +0100 Subject: [PATCH] fix: no stable news release for nc28 --- nextcloud-28-app-news/package.sh | 56 +++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/nextcloud-28-app-news/package.sh b/nextcloud-28-app-news/package.sh index 0d23f02..82d7aa8 100755 --- a/nextcloud-28-app-news/package.sh +++ b/nextcloud-28-app-news/package.sh @@ -4,7 +4,61 @@ function pre_fetch() { # Filter from .skel/build-nextcloud-app, but with restriction to stable versions removed - export _NCAPPS_JQ='.[] | select(.id == $app) | .releases[] | select(.version | contains("-") == false) | "\(.version) \(.download) \(.rawPlatformVersionSpec)"' + export _NCAPPS_JQ='.[] | select(.id == $app) | .releases[] | "\(.version) \(.download) \(.rawPlatformVersionSpec)"' +} + +function _prepare() { + mkdir -p \ + "${PKGDIR}/DEBIAN" \ + "${PKGDIR}/usr/share/doc/${PKGNAME}" \ + "${PKGDIR}/usr/lib/nextcloud/nextcloud-apps" + VERSION=$(cat "${SRCDIR}/${APP}/appinfo/info.xml" | xq-python -r .info.version | sed -re 's/-/~/g') + SUMMARY=$(cat "${SRCDIR}/${APP}/appinfo/info.xml" | xq-python -r '.info.summary | if type == "array" then (.[] | select(.["@lang"]=="en") | .["#text"]) else (.) end') + DESCRIPTION=$(cat "${SRCDIR}/${APP}/appinfo/info.xml" | xq-python -r '.info.description | if type == "array" then (.[] | select(.["@lang"]=="en") | .["#text"]) else (.) end') + PHP_MIN=$(cat "${SRCDIR}/${APP}/appinfo/info.xml" | xq-python -r '.info.dependencies.php."@min-version"') + PHP_MAX=$(cat "${SRCDIR}/${APP}/appinfo/info.xml" | xq-python -r '.info.dependencies.php."@max-version"') + PHP_DEP="" +# #f [[ "${PHP_MIN}" != "null" ]]; then +# PHP_DEP="${PHP_DEP}, php (>= ${PHP_MIN})" +# fi +# if [[ "${PHP_MAX}" != "null" ]]; then +# # awk increments the last version component, from https://stackoverflow.com/a/69489163 +# PHP_MAX=$(echo "${PHP_MAX}" | awk -F. -v OFS=. '{$NF=$NF+1;print}') +# PHP_DEP="${PHP_DEP}, php (<< ${PHP_MAX})" +# fi + cp -r "${SRCDIR}/${APP}" "${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/${APP}" + cat > "${PKGDIR}/DEBIAN/control" < "${PKGDIR}/DEBIAN/postinst" <