Remove curl fallback from packaging scripts and require local tarball

This commit is contained in:
Andrea Mazzoleni 2026-08-12 12:54:25 +02:00
parent 8630da5ade
commit 950d4a0b10
4 changed files with 14 additions and 37 deletions

View file

@ -4,8 +4,6 @@
# using the @PACKAGE@.SlackBuild and related files in the current directory.
#
# This version:
# - Prefers a source tarball already present in the current directory
# - Only downloads it if not found locally
# - Runs the SlackBuild (as root recommended for makepkg)
#
# Requirements:
@ -15,7 +13,6 @@ set -euo pipefail
VERSION="@PACKAGE_VERSION@"
TARBALL="@PACKAGE@-${VERSION}.tar.gz"
SOURCE_URL="https://github.com/amadvance/@PACKAGE@/releases/download/v${VERSION}/${TARBALL}"
if [[ ! -f "pkg/@PACKAGE@.SlackBuild" ]]; then
echo "Error: @PACKAGE@.SlackBuild not found in the current directory."
@ -27,15 +24,13 @@ if [[ ! -f "pkg/slack-desc" ]]; then
exit 1
fi
# Prefer local tarball
if [[ -f "./${TARBALL}" ]]; then
echo "Found ${TARBALL} locally."
cp ${TARBALL} pkg/
else
echo "Downloading ${TARBALL}..."
curl -L -O "$SOURCE_URL"
if [[ ! -f "${TARBALL}" ]]; then
echo "Error: ${TARBALL} not found in the current directory."
exit 1
fi
cp ${TARBALL} pkg/
# Set environment variables for SlackBuild
export VERSION BUILD=1 TAG=_am OUTPUT=$(pwd) # Package output in current dir