mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-25 18:40:19 -04:00
Make slackware dist package
This commit is contained in:
parent
41e67f8beb
commit
c3531616ee
6 changed files with 42 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -46,6 +46,7 @@ mkstream
|
|||
*.gcno
|
||||
*.gcov
|
||||
makeslackware.sh
|
||||
makeslackdist.sh
|
||||
pkg/snapraid.SlackBuild
|
||||
pkg/snapraid.info
|
||||
makedeb.sh
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ EXTRA_DIST = \
|
|||
raid/test/speedtest.c \
|
||||
raid/test/invtest.c \
|
||||
makeslackware.sh.in \
|
||||
makeslackdist.sh.in \
|
||||
pkg/snapraid.SlackBuild.in \
|
||||
pkg/snapraid.info.in \
|
||||
pkg/slack-desc \
|
||||
|
|
@ -179,7 +180,7 @@ clean-local:
|
|||
rm -f tommyds/*.gcda tommyds/*.gcno tommyds/*.gcov
|
||||
rm -f lcov.info
|
||||
rm -f gmon.out
|
||||
rm -f makeslackware.sh pkg/snapraid.SlackBuild pkg/snapraid.info makedeb.sh pkg/control makerpm.sh pkg/snapraid.spec
|
||||
rm -f makeslackware.sh makeslackdist.sh pkg/snapraid.SlackBuild pkg/snapraid.info makedeb.sh pkg/control makerpm.sh pkg/snapraid.spec
|
||||
rm -f pkg/snapraid-*.txz pkg/snapraid_*.deb pkg/snapraid-*.rpm
|
||||
|
||||
maintainer-clean-local:
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ AC_ARG_VAR([TESTENV_AVX2], [Test environment for AVX2])
|
|||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([pkg/snapraid.info pkg/control pkg/snapraid.spec])
|
||||
AC_CONFIG_FILES([makeslackware.sh], [chmod a+x makeslackware.sh])
|
||||
AC_CONFIG_FILES([makeslackdist.sh], [chmod a+x makeslackdist.sh])
|
||||
AC_CONFIG_FILES([pkg/snapraid.SlackBuild], [chmod a+x pkg/snapraid.SlackBuild])
|
||||
AC_CONFIG_FILES([makedeb.sh], [chmod a+x makedeb.sh])
|
||||
AC_CONFIG_FILES([makerpm.sh], [chmod a+x makerpm.sh])
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ if ! make dist; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
sh makeslackdist.sh
|
||||
sudo sh makeslackware.sh
|
||||
sudo sh makedeb.sh
|
||||
sudo sh makerpm.sh
|
||||
|
|
|
|||
35
makeslackdist.sh.in
Normal file
35
makeslackdist.sh.in
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
# makeslackdist.sh - Creates the source distribution for SlackBuilds.org
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
PRGNAM="@PACKAGE@"
|
||||
VERSION="@PACKAGE_VERSION@"
|
||||
TARBALL="@PACKAGE@.tar.gz"
|
||||
SOURCE_TARBALL="@PACKAGE@-${VERSION}.tar.gz"
|
||||
|
||||
echo "Calculating MD5 sum..."
|
||||
MD5SUM=$(md5sum "$SOURCE_TARBALL" | cut -d' ' -f1)
|
||||
|
||||
# Create a temporary staging area
|
||||
# We use a unique name to avoid conflicts
|
||||
STAGING_DIR="tmp_build_dist"
|
||||
mkdir -p $STAGING_DIR/$PRGNAM
|
||||
|
||||
# Copy Build Files from the pkg directory
|
||||
cp pkg/$PRGNAM.SlackBuild $STAGING_DIR/$PRGNAM/
|
||||
cp pkg/slack-desc $STAGING_DIR/$PRGNAM/
|
||||
|
||||
# Process the .info file and replace placeholders
|
||||
sed -e "s/@MD5SUM@/$MD5SUM/g" pkg/$PRGNAM.info > $STAGING_DIR/$PRGNAM/$PRGNAM.info
|
||||
|
||||
# We create the tarball in the current root directory
|
||||
tar -czf "$TARBALL" -C $STAGING_DIR $PRGNAM
|
||||
|
||||
# Remove the entire staging directory
|
||||
echo "Removing staging artifacts..."
|
||||
rm -rf $STAGING_DIR
|
||||
|
||||
echo ""
|
||||
echo "Success! The tarball is: $TARBALL"
|
||||
echo "MD5SUM updated to: $MD5SUM"
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
PRGNAM="@PACKAGE@"
|
||||
VERSION="@PACKAGE_VERSION@"
|
||||
HOMEPAGE="https://www.snapraid.it/"
|
||||
DOWNLOAD="https://github.com/amadvance/snapraid/releases/download/v${VERSION}/@PACKAGE@-${VERSION}.tar.gz"
|
||||
MD5SUM="UNSUPPORTED" # Optional; compute manually if needed
|
||||
DOWNLOAD_x86_64="$DOWNLOAD"
|
||||
MD5SUM_x86_64=""
|
||||
DOWNLOAD="https://github.com/amadvance/@PACKAGE@/releases/download/v@PACKAGE_VERSION@/@PACKAGE@-@PACKAGE_VERSION@.tar.gz"
|
||||
MD5SUM="@MD5SUM@"
|
||||
REQUIRES=""
|
||||
MAINTAINER="Andrea Mazzoleni"
|
||||
EMAIL="amadvance@gmail.com"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue