mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-12 02:10:54 +00:00
52 lines
1.2 KiB
Bash
52 lines
1.2 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Script to build a Slackware .txz package for @PACKAGE_NAME@
|
|
# using the @[email protected] and related files in the current directory.
|
|
#
|
|
# This version:
|
|
# - Runs the SlackBuild (as root recommended for makepkg)
|
|
#
|
|
# Requirements:
|
|
# - Run as root (or with sudo) for proper ownership/permissions in package
|
|
|
|
set -euo pipefail
|
|
|
|
VERSION="@PACKAGE_VERSION@"
|
|
TARBALL="@PACKAGE@-${VERSION}.tar.gz"
|
|
|
|
if [[ ! -f "pkg/@[email protected]" ]]; then
|
|
echo "Error: @[email protected] not found in the current directory."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ! -f "pkg/slack-desc" ]]; then
|
|
echo "Error: slack-desc not found in the current directory."
|
|
exit 1
|
|
fi
|
|
|
|
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
|
|
|
|
echo "Running SlackBuild..."
|
|
bash pkg/@[email protected]
|
|
|
|
echo "Cleanup..."
|
|
rm -f pkg/${TARBALL}
|
|
|
|
echo ""
|
|
echo "Build complete!"
|
|
echo "The .txz package should be in the current directory:"
|
|
ls @PACKAGE@-${VERSION}-*-*.txz
|
|
|
|
echo ""
|
|
echo "You can install it with:"
|
|
echo " installpkg @PACKAGE@-${VERSION}-*-*.txz"
|
|
echo " or upgradepkg if replacing an older version."
|