From b814f31bf9fd9c95d468456de921cfce3e73d834 Mon Sep 17 00:00:00 2001 From: Andreas Cord-Landwehr Date: Thu, 19 Aug 2021 17:24:45 +0200 Subject: [PATCH] Add "add-tarball" option to release script --- scripts/application-release.sh | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/scripts/application-release.sh b/scripts/application-release.sh index 5e69b32..07b4569 100755 --- a/scripts/application-release.sh +++ b/scripts/application-release.sh @@ -1,14 +1,15 @@ #!/bin/bash # -# add/remove Plasma release recipes +# add/remove KDE Gear release recipes # # SPDX-FileCopyrightText: 2019 Volker Krause +# SPDX-FileCopyrightText: 2021 Andreas Cord-Landwehr # # SPDX-License-Identifier: MIT function usage() { - echo "$1 [add|remove|update] []" + echo "$1 [add|add-tarball|remove|update] []" exit 1 } @@ -24,16 +25,41 @@ case $command in add) for recipe in `find $base -name "*.inc" | grep -v /staging/`; do name=`echo $recipe | sed -e "s,\.inc,_${version}.bb,"` + module=$(echo $recipe | grep -P -o '[0-9a-zA-Z\-]+(?=/[0-9a-zA-Z\-]+\.inc)') + app=$(echo $recipe | grep -P -o '[0-9a-zA-Z\-]+(?=\.inc)') cat < $name # SPDX-FileCopyrightText: none # SPDX-License-Identifier: CC0-1.0 require \${PN}.inc +SRC_URI = "git://invent.kde.org/${module}/${app};nobranch=1;protocol=https" SRCREV = "v\${PV}" +S = "\${WORKDIR}/git" EOM git add $name done ;; +add-tarball) + # search for all non-staging inc files without underlines + for recipe in $(find $base -regex ".*/[0-9a-zA-Z\-]+\.inc" | grep -v /staging/); do + name=$(echo $recipe | sed -e "s,\.inc,_${version}.bb,") + app=$(echo $recipe | grep -P -o '[0-9a-zA-Z\-]+(?=\.inc)') + url="https://download.kde.org/stable/release-service/${version}/src/${app}-${version}.tar.xz" + sha256=$(curl -s "${url}.sha256" | cut -d" " -f1) + echo "${url} : ${sha256}" +# examples: +#https://download.kde.org/stable/release-service/21.08.0/src/akonadi-21.08.0.tar.xz +cat < $name +# SPDX-FileCopyrightText: none +# SPDX-License-Identifier: CC0-1.0 + +require \${PN}.inc +SRC_URI = "${url}" +SRC_URI[sha256sum] = "${sha256}" +EOM + git add $name + done + ;; remove) for recipe in `find $base -name "*_$version.bb"`; do git rm -f $recipe