diff --git a/makearch.sh.in b/makearch.sh.in index 703ab027..8c4315b9 100644 --- a/makearch.sh.in +++ b/makearch.sh.in @@ -2,10 +2,6 @@ # # Script to build a Arch .pkg package for @PACKAGE_NAME@ # -# This version: -# - Prefers a source tarball already present in the current directory -# - Only downloads it if not found locally -# # Requirements: # - Run as root (or with sudo) for proper ownership/permissions in package @@ -13,7 +9,6 @@ set -euo pipefail VERSION="@PACKAGE_VERSION@" TARBALL="@PACKAGE@-${VERSION}.tar.gz" -SOURCE_URL="https://github.com/amadvance/@PACKAGE@/releases/download/v${VERSION}/${TARBALL}" PKG_NAME="@PACKAGE@" PKG_ROOT="${PKG_NAME}-arch-root" @@ -22,12 +17,9 @@ if [[ ! -f "pkg/.PKGINFO" ]]; then exit 1 fi -# Prefer local tarball -if [[ -f "./${TARBALL}" ]]; then - echo "Found ${TARBALL} locally." -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 # Clean previous builds diff --git a/makedeb.sh.in b/makedeb.sh.in index 82760a01..e3df8470 100644 --- a/makedeb.sh.in +++ b/makedeb.sh.in @@ -14,17 +14,12 @@ set -euo pipefail VERSION="@PACKAGE_VERSION@" TARBALL="@PACKAGE@-${VERSION}.tar.gz" -SOURCE_URL="https://github.com/amadvance/@PACKAGE@/releases/download/v${VERSION}/${TARBALL}" PKG_NAME="@PACKAGE@" PKG_ROOT="${PKG_NAME}-deb-root" -CONTROL_FILE="${PKG_ROOT}/DEBIAN/control" -# Prefer local tarball -if [[ -f "./${TARBALL}" ]]; then - echo "Using local ${TARBALL}" -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 # Clean previous builds diff --git a/makerpm.sh.in b/makerpm.sh.in index 42001131..3721e822 100644 --- a/makerpm.sh.in +++ b/makerpm.sh.in @@ -6,8 +6,6 @@ # # This version: # - Works without rpmdevtools -# - Prefers a source tarball already present in the current directory -# - Only downloads it if not found locally # # Requirements: # - rpmbuild available @@ -32,7 +30,6 @@ fi echo "SnapRAID version: $VERSION" TARBALL="@PACKAGE@-${VERSION}.tar.gz" -SOURCE_URL="https://github.com/amadvance/@PACKAGE@/releases/download/v${VERSION}/${TARBALL}" # Set up rpmbuild tree manually in ~/rpmbuild if it doesn't exist RPMBUILD_DIR="$HOME/rpmbuild" @@ -43,15 +40,13 @@ else echo "rpmbuild directory structure already exists in $RPMBUILD_DIR" fi -# Look for the tarball first in the current directory, then in ~/rpmbuild/SOURCES +# Look for the tarball in the current directory if [[ -f "./$TARBALL" ]]; then echo "Found $TARBALL in the current directory. Copying to ~/rpmbuild/SOURCES..." cp "./$TARBALL" "$RPMBUILD_DIR/SOURCES/" -elif [[ ! -f "$RPMBUILD_DIR/SOURCES/$TARBALL" ]]; then - echo "Downloading $TARBALL (not found locally or in ~/rpmbuild/SOURCES)..." - curl -L -o "$RPMBUILD_DIR/SOURCES/$TARBALL" "$SOURCE_URL" else - echo "$TARBALL already present in ~/rpmbuild/SOURCES" + echo "Error: $TARBALL not found in the current directory." + exit 1 fi # Copy spec file to SPECS directory (preserving the original filename) diff --git a/makeslackware.sh.in b/makeslackware.sh.in index 71200c97..ee5b3ec9 100644 --- a/makeslackware.sh.in +++ b/makeslackware.sh.in @@ -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