mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Update build scripts
This commit is contained in:
parent
195f493558
commit
ecb32f8c03
14 changed files with 237 additions and 187 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -2,6 +2,9 @@
|
|||
*.zip
|
||||
*.tar.gz
|
||||
*.tgz
|
||||
*.txz
|
||||
*.deb
|
||||
*.rpm
|
||||
|
||||
# backups
|
||||
*~
|
||||
|
|
@ -42,6 +45,13 @@ mkstream
|
|||
*.gcda
|
||||
*.gcno
|
||||
*.gcov
|
||||
makeslackware.sh
|
||||
pkg/snapraid.SlackBuild
|
||||
pkg/snapraid.info
|
||||
makedeb.sh
|
||||
pkg/control
|
||||
makerpm.sh
|
||||
pkg/snapraid.spec
|
||||
|
||||
# projects
|
||||
*.dst
|
||||
|
|
|
|||
12
Makefile.am
12
Makefile.am
|
|
@ -158,7 +158,15 @@ EXTRA_DIST = \
|
|||
raid/test/fulltest.c \
|
||||
raid/test/selftest.c \
|
||||
raid/test/speedtest.c \
|
||||
raid/test/invtest.c
|
||||
raid/test/invtest.c \
|
||||
makeslackware.sh.in \
|
||||
pkg/snapraid.SlackBuild.in \
|
||||
pkg/snapraid.info.in \
|
||||
pkg/slack-desc \
|
||||
makedeb.sh.in \
|
||||
pkg/control \
|
||||
makerpm.sh.in \
|
||||
pkg/snapraid.spec.in
|
||||
|
||||
man1_MANS = doc/snapraid.1 doc/snapraid_log.1
|
||||
|
||||
|
|
@ -171,6 +179,8 @@ 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/snapraid.control makerpm.sh pkg/snapraid-rpm.spec
|
||||
rm -f pkg/snapraid-*.txz pkg/snapraid_*.deb pkg/snapraid-*.rpm
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f $(LIST_MAN)
|
||||
|
|
|
|||
14
configure.ac
14
configure.ac
|
|
@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
|||
AC_PREREQ([2.65])
|
||||
dnl Get version number from git
|
||||
m4_define([git_revision], m4_esyscmd_s([./autover.sh]))
|
||||
AC_INIT([snapraid], [git_revision], [], [], [https://www.snapraid.it])
|
||||
AC_INIT([SnapRAID CLI], [git_revision], [], [snapraid], [https://www.snapraid.it])
|
||||
AM_INIT_AUTOMAKE([foreign no-dependencies subdir-objects])
|
||||
AC_CONFIG_SRCDIR([cmdline/snapraid.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
|
@ -391,6 +391,14 @@ AC_ARG_VAR([TESTENV_SSSE3], [Test environment for SSSE3])
|
|||
AC_ARG_VAR([TESTENV_SSE42], [Test environment for SSE42])
|
||||
AC_ARG_VAR([TESTENV_AVX2], [Test environment for AVX2])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
PACKAGE_VERSION_UNDERSCORE=`echo "$PACKAGE_VERSION" | sed 's/-/_/g'`
|
||||
AC_SUBST([PACKAGE_VERSION_UNDERSCORE])
|
||||
|
||||
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([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])
|
||||
|
||||
AC_OUTPUT
|
||||
|
|
|
|||
44
makedeb.sh → makedeb.sh.in
Executable file → Normal file
44
makedeb.sh → makedeb.sh.in
Executable file → Normal file
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script to manually build a Debian .deb package for snapraid on Slackware
|
||||
# Script to manually build a Debian .deb package for @PACKAGE_NAME@ on Slackware
|
||||
# (using only dpkg-deb; no dpkg-buildpackage or debhelper needed)
|
||||
#
|
||||
# This avoids the /var/lib/dpkg/status issue entirely by:
|
||||
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
VERSION="14.0"
|
||||
TARBALL="snapraid-${VERSION}.tar.gz"
|
||||
SOURCE_URL="https://github.com/amadvance/snapraid/releases/download/v${VERSION}/${TARBALL}"
|
||||
PKG_NAME="snapraid"
|
||||
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"
|
||||
|
||||
|
|
@ -28,54 +28,40 @@ else
|
|||
fi
|
||||
|
||||
# Clean previous builds
|
||||
rm -rf "${PKG_ROOT}" snapraid-${VERSION}
|
||||
rm -rf "${PKG_ROOT}" @PACKAGE@-${VERSION}
|
||||
|
||||
# Extract source
|
||||
echo "Extracting source..."
|
||||
tar -xzf "${TARBALL}"
|
||||
|
||||
# Build the software
|
||||
echo "Configuring and building snapraid..."
|
||||
cd snapraid-${VERSION}
|
||||
./configure --prefix=/usr --mandir=/usr/share/man
|
||||
echo "Configuring and building @PACKAGE@..."
|
||||
cd @PACKAGE@-${VERSION}
|
||||
./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
|
||||
make
|
||||
|
||||
# Install into package root
|
||||
echo "Installing into temporary package root..."
|
||||
mkdir -p "../${PKG_ROOT}/usr"
|
||||
make install DESTDIR="../${PKG_ROOT}"
|
||||
make -j4 install DESTDIR="../${PKG_ROOT}"
|
||||
|
||||
# Add example config and docs
|
||||
mkdir -p "../${PKG_ROOT}/usr/share/doc/snapraid"
|
||||
cp snapraid.conf.example COPYING AUTHORS HISTORY README "../${PKG_ROOT}/usr/share/doc/snapraid/"
|
||||
mkdir -p "../${PKG_ROOT}/usr/share/doc/@PACKAGE@"
|
||||
cp @PACKAGE@.conf.example COPYING AUTHORS HISTORY README "../${PKG_ROOT}/usr/share/doc/@PACKAGE@/"
|
||||
|
||||
cd ..
|
||||
|
||||
# Create DEBIAN directory and control file
|
||||
echo "Creating DEBIAN/control..."
|
||||
echo "Copying DEBIAN/control..."
|
||||
mkdir -p "${PKG_ROOT}/DEBIAN"
|
||||
cat > "$CONTROL_FILE" <<EOF
|
||||
Package: snapraid
|
||||
Version: ${VERSION}-1
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Maintainer: Andrea Mazzoleni <amadvance@gmail.com>
|
||||
Description: Disk array backup for many large rarely-changed files
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it's able to recover from up to six disk
|
||||
failures. SnapRAID is mainly targeted for a home media center, with a
|
||||
lot of big files that rarely change.
|
||||
Homepage: https://www.snapraid.it/
|
||||
License: GPL-3.0-or-later
|
||||
EOF
|
||||
cp pkg/control "${PKG_ROOT}/DEBIAN/control"
|
||||
|
||||
# Build the .deb package
|
||||
echo "Building .deb package with dpkg-deb..."
|
||||
dpkg-deb --root-owner-group --build "${PKG_ROOT}" "${PKG_NAME}_${VERSION}-1_amd64.deb"
|
||||
|
||||
# Cleanup
|
||||
rm -rf "${PKG_ROOT}" snapraid-${VERSION}
|
||||
rm -rf "${PKG_ROOT}" @PACKAGE@-${VERSION}
|
||||
|
||||
echo ""
|
||||
echo "Build complete!"
|
||||
|
|
@ -48,3 +48,7 @@ fi
|
|||
if ! make dist; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo sh makeslackware.sh
|
||||
sudo sh makedeb.sh
|
||||
sudo sh makerpm.sh
|
||||
|
|
|
|||
80
makerpm.sh
80
makerpm.sh
|
|
@ -1,80 +0,0 @@
|
|||
#!/bin/bash
|
||||
# build-snapraid-rpm.sh
|
||||
#
|
||||
# Script to build both binary and source RPMs for snapraid
|
||||
# using the snapraid-rpm.spec file in the current directory.
|
||||
#
|
||||
# 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
|
||||
# - gcc and make installed (for building snapraid)
|
||||
#
|
||||
# Usage:
|
||||
# 1. Place this script and your snapraid-rpm.spec (and optionally the tarball) in the same directory.
|
||||
# 2. Make it executable: chmod +x build-snapraid-rpm.sh
|
||||
# 3. Run it: ./build-snapraid-rpm.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SPEC_FILE="snapraid-rpm.spec"
|
||||
|
||||
if [[ ! -f "$SPEC_FILE" ]]; then
|
||||
echo "Error: $SPEC_FILE not found in the current directory."
|
||||
echo "Please run this script from the directory containing your $SPEC_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Reading Version from $SPEC_FILE..."
|
||||
VERSION=$(grep '^Version:' "$SPEC_FILE" | awk '{print $2}' | tr -d ' ')
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
echo "Error: Could not determine Version from $SPEC_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "SnapRAID version: $VERSION"
|
||||
|
||||
TARBALL="snapraid-${VERSION}.tar.gz"
|
||||
SOURCE_URL="https://github.com/amadvance/snapraid/releases/download/v${VERSION}/${TARBALL}"
|
||||
|
||||
# Set up rpmbuild tree manually in ~/rpmbuild if it doesn't exist
|
||||
RPMBUILD_DIR="$HOME/rpmbuild"
|
||||
if [[ ! -d "$RPMBUILD_DIR/SPECS" ]]; then
|
||||
echo "Setting up rpmbuild directory structure in $RPMBUILD_DIR..."
|
||||
mkdir -p "$RPMBUILD_DIR"/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
else
|
||||
echo "rpmbuild directory structure already exists in $RPMBUILD_DIR"
|
||||
fi
|
||||
|
||||
# Look for the tarball first in the current directory, then in ~/rpmbuild/SOURCES
|
||||
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"
|
||||
fi
|
||||
|
||||
# Copy spec file to SPECS directory (preserving the original filename)
|
||||
cp "$SPEC_FILE" "$RPMBUILD_DIR/SPECS/"
|
||||
|
||||
echo "Building RPMs using rpmbuild -ba..."
|
||||
rpmbuild -ba --nodeps --nocheck "$RPMBUILD_DIR/SPECS/$SPEC_FILE"
|
||||
|
||||
echo ""
|
||||
echo "Build complete!"
|
||||
echo "Binary RPM(s) can be found in:"
|
||||
find "$RPMBUILD_DIR/RPMS" -name "snapraid-${VERSION}*.rpm" -exec echo " {}" \;
|
||||
echo ""
|
||||
echo "Source RPM can be found in:"
|
||||
find "$RPMBUILD_DIR/SRPMS" -name "snapraid-${VERSION}*.src.rpm" -exec echo " {}" \;
|
||||
|
||||
echo ""
|
||||
echo "You can install the binary RPM with:"
|
||||
echo " sudo dnf install $RPMBUILD_DIR/RPMS/*/snapraid-${VERSION}*.rpm # Fedora"
|
||||
echo " sudo rpm -ivh $RPMBUILD_DIR/RPMS/*/snapraid-${VERSION}*.rpm # Others"
|
||||
95
makerpm.sh.in
Normal file
95
makerpm.sh.in
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
#!/bin/bash
|
||||
# build-@PACKAGE@-rpm.sh
|
||||
#
|
||||
# Script to build both binary and source RPMs for @PACKAGE_NAME@
|
||||
# using the @PACKAGE@-rpm.spec file in the current directory.
|
||||
#
|
||||
# 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
|
||||
# - gcc and make installed (for building @PACKAGE@)
|
||||
#
|
||||
# Usage:
|
||||
# 1. Place this script and your @PACKAGE@-rpm.spec (and optionally the tarball) in the same directory.
|
||||
# 2. Make it executable: chmod +x build-@PACKAGE@-rpm.sh
|
||||
# 3. Run it: ./build-@PACKAGE@-rpm.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
VERSION=@PACKAGE_VERSION@
|
||||
VERSION_UNDERSCORE=@PACKAGE_VERSION_UNDERSCORE@
|
||||
SPEC_FILE="@PACKAGE@.spec"
|
||||
|
||||
if [[ ! -f "pkg/$SPEC_FILE" ]]; then
|
||||
echo "Error: $SPEC_FILE not found in the current directory."
|
||||
echo "Please run this script from the directory containing your $SPEC_FILE"
|
||||
exit 1
|
||||
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"
|
||||
if [[ ! -d "$RPMBUILD_DIR/SPECS" ]]; then
|
||||
echo "Setting up rpmbuild directory structure in $RPMBUILD_DIR..."
|
||||
mkdir -p "$RPMBUILD_DIR"/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
else
|
||||
echo "rpmbuild directory structure already exists in $RPMBUILD_DIR"
|
||||
fi
|
||||
|
||||
# Look for the tarball first in the current directory, then in ~/rpmbuild/SOURCES
|
||||
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"
|
||||
fi
|
||||
|
||||
ORIGINAL_TARBALL="$RPMBUILD_DIR/SOURCES/@PACKAGE@-${VERSION}.tar.gz"
|
||||
UNDERSCORE_TARBALL="$RPMBUILD_DIR/SOURCES/@PACKAGE@-${VERSION_UNDERSCORE}.tar.gz"
|
||||
|
||||
if [[ "$VERSION" == "$VERSION_UNDERSCORE" ]]; then
|
||||
echo "Version does not contain '-', no repack needed."
|
||||
else
|
||||
if [[ ! -f "$UNDERSCORE_TARBALL" ]]; then
|
||||
echo "Repacking tarball with underscore version..."
|
||||
|
||||
WORKDIR=$(mktemp -d)
|
||||
|
||||
tar -xzf "$ORIGINAL_TARBALL" -C "$WORKDIR"
|
||||
|
||||
mv "$WORKDIR/@PACKAGE@-${VERSION}" \
|
||||
"$WORKDIR/@PACKAGE@-${VERSION_UNDERSCORE}"
|
||||
|
||||
tar -czf "$UNDERSCORE_TARBALL" -C "$WORKDIR" \
|
||||
"@PACKAGE@-${VERSION_UNDERSCORE}"
|
||||
|
||||
rm -rf "$WORKDIR"
|
||||
else
|
||||
echo "Underscore tarball already exists."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Copy spec file to SPECS directory (preserving the original filename)
|
||||
cp "pkg/$SPEC_FILE" "$RPMBUILD_DIR/SPECS/"
|
||||
|
||||
echo "Building RPMs using rpmbuild -ba..."
|
||||
rpmbuild -ba --nodeps --nocheck "$RPMBUILD_DIR/SPECS/$SPEC_FILE"
|
||||
|
||||
cp $RPMBUILD_DIR/RPMS/*/@PACKAGE@-${VERSION_UNDERSCORE}*.rpm .
|
||||
|
||||
echo "Package created: $RPMBUILD_DIR/RPMS/@PACKAGE@-${VERSION_UNDERSCORE}*.rpm"
|
||||
echo ""
|
||||
echo "You can install the RPM with:"
|
||||
echo " sudo dnf install @PACKAGE@-${VERSION_UNDERSCORE}*.rpm # Fedora"
|
||||
echo " sudo rpm -ivh @PACKAGE@-${VERSION_UNDERSCORE}*.rpm # Others"
|
||||
28
makeslackware.sh → makeslackware.sh.in
Executable file → Normal file
28
makeslackware.sh → makeslackware.sh.in
Executable file → Normal file
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script to build a Slackware .txz package for snapraid
|
||||
# using the snapraid.SlackBuild and related files in the current directory.
|
||||
# Script to build a Slackware .txz package for @PACKAGE_NAME@
|
||||
# using the @PACKAGE@.SlackBuild and related files in the current directory.
|
||||
#
|
||||
# This version:
|
||||
# - Prefers a source tarball already present in the current directory
|
||||
|
|
@ -13,16 +13,16 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
VERSION="14.0"
|
||||
TARBALL="snapraid-${VERSION}.tar.gz"
|
||||
SOURCE_URL="https://github.com/amadvance/snapraid/releases/download/v${VERSION}/${TARBALL}"
|
||||
VERSION="@PACKAGE_VERSION@"
|
||||
TARBALL="@PACKAGE@-${VERSION}.tar.gz"
|
||||
SOURCE_URL="https://github.com/amadvance/@PACKAGE@/releases/download/v${VERSION}/${TARBALL}"
|
||||
|
||||
if [[ ! -f "snapraid.SlackBuild" ]]; then
|
||||
echo "Error: snapraid.SlackBuild not found in the current directory."
|
||||
if [[ ! -f "pkg/@PACKAGE@.SlackBuild" ]]; then
|
||||
echo "Error: @PACKAGE@.SlackBuild not found in the current directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "slack-desc" ]]; then
|
||||
if [[ ! -f "pkg/slack-desc" ]]; then
|
||||
echo "Error: slack-desc not found in the current directory."
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -30,23 +30,27 @@ fi
|
|||
# Prefer local tarball
|
||||
if [[ -f "./${TARBALL}" ]]; then
|
||||
echo "Found ${TARBALL} locally."
|
||||
cp ${TARBALL} pkg/
|
||||
else
|
||||
echo "Downloading ${TARBALL}..."
|
||||
curl -L -O "$SOURCE_URL"
|
||||
fi
|
||||
|
||||
# Set environment variables for SlackBuild
|
||||
export VERSION BUILD=1 TAG=_AM OUTPUT=$(pwd) # Package output in current dir
|
||||
export VERSION BUILD=1 TAG=_am OUTPUT=$(pwd) # Package output in current dir
|
||||
|
||||
echo "Running SlackBuild..."
|
||||
bash snapraid.SlackBuild
|
||||
bash pkg/@PACKAGE@.SlackBuild
|
||||
|
||||
echo "Cleanup..."
|
||||
rm -f pkg/${TARBALL}
|
||||
|
||||
echo ""
|
||||
echo "Build complete!"
|
||||
echo "The .txz package should be in the current directory:"
|
||||
ls snapraid-${VERSION}-*-*.txz
|
||||
ls @PACKAGE@-${VERSION}-*-*.txz
|
||||
|
||||
echo ""
|
||||
echo "You can install it with:"
|
||||
echo " installpkg snapraid-${VERSION}-*-*.txz"
|
||||
echo " installpkg @PACKAGE@-${VERSION}-*-*.txz"
|
||||
echo " or upgradepkg if replacing an older version."
|
||||
13
pkg/control.in
Normal file
13
pkg/control.in
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Package: @PACKAGE@
|
||||
Version: @PACKAGE_VERSION@-1
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Maintainer: Andrea Mazzoleni <amadvance@gmail.com>
|
||||
Description: Disk array backup for many large rarely-changed files
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it's able to recover from up to six disk
|
||||
failures. SnapRAID is mainly targeted for a home media center, with a
|
||||
lot of big files that rarely change.
|
||||
Homepage: https://www.snapraid.it/
|
||||
License: GPL-3.0-or-later
|
||||
12
snapraid.SlackBuild → pkg/snapraid.SlackBuild.in
Executable file → Normal file
12
snapraid.SlackBuild → pkg/snapraid.SlackBuild.in
Executable file → Normal file
|
|
@ -1,13 +1,13 @@
|
|||
#!/bin/bash
|
||||
# SlackBuild script for snapraid
|
||||
# SlackBuild script for @PACKAGE_NAME@
|
||||
# Written for personal use / inspired by SlackBuilds.org templates
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=snapraid
|
||||
VERSION=${VERSION:-13.0}
|
||||
PRGNAM=@PACKAGE@
|
||||
VERSION=@PACKAGE_VERSION@
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_AM}
|
||||
TAG=${TAG:-_am}
|
||||
PKGNAM=${PRGNAM}-${VERSION}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
|
@ -42,7 +42,7 @@ rm -rf $PKG
|
|||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/snapraid-$VERSION.tar.gz
|
||||
tar xvf $CWD/@PACKAGE@-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
|
|
@ -62,7 +62,7 @@ CXXFLAGS="$SLKCFLAGS" \
|
|||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||
--build=$ARCH-slackware-linux
|
||||
|
||||
make
|
||||
make -j4
|
||||
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
PRGNAM="snapraid"
|
||||
VERSION="13.0"
|
||||
PRGNAM="@PACKAGE@"
|
||||
VERSION="@PACKAGE_VERSION@"
|
||||
HOMEPAGE="https://www.snapraid.it/"
|
||||
DOWNLOAD="https://github.com/amadvance/snapraid/releases/download/v${VERSION}/snapraid-${VERSION}.tar.gz"
|
||||
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=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="Andrea Mazzoleni"
|
||||
EMAIL="amadnvace@gmail.com"
|
||||
EMAIL="amadvance@gmail.com"
|
||||
52
pkg/snapraid.spec.in
Normal file
52
pkg/snapraid.spec.in
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
Name: @PACKAGE@
|
||||
Summary: Disk array backup for many large rarely-changed files
|
||||
Version: @PACKAGE_VERSION_UNDERSCORE@
|
||||
Release: 1%{?dist}
|
||||
License: GPL-3.0-or-later
|
||||
Group: Applications/System
|
||||
URL: https://www.snapraid.it/
|
||||
Source0: https://github.com/amadvance/@PACKAGE@/releases/download/v%{version}/@PACKAGE@-%{version}.tar.gz
|
||||
BuildRequires: gcc
|
||||
|
||||
%description
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it's able to recover from up to six disk
|
||||
failures. SnapRAID is mainly targeted for a home media center, with a
|
||||
lot of big files that rarely change.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc AUTHORS HISTORY README @PACKAGE@.conf.example
|
||||
%{_bindir}/@PACKAGE@
|
||||
%{_mandir}/man1/@PACKAGE@.1*
|
||||
%{_mandir}/man1/snapraid_log.1*
|
||||
%lang(de) %{_mandir}/de/man1/@PACKAGE@.1*
|
||||
%lang(es) %{_mandir}/es/man1/@PACKAGE@.1*
|
||||
%lang(fr) %{_mandir}/fr/man1/@PACKAGE@.1*
|
||||
%lang(it) %{_mandir}/it/man1/@PACKAGE@.1*
|
||||
%lang(ja) %{_mandir}/ja/man1/@PACKAGE@.1*
|
||||
%lang(ko) %{_mandir}/ko/man1/@PACKAGE@.1*
|
||||
%lang(pl) %{_mandir}/pl/man1/@PACKAGE@.1*
|
||||
%lang(pt) %{_mandir}/pt/man1/@PACKAGE@.1*
|
||||
%lang(ro) %{_mandir}/ro/man1/@PACKAGE@.1*
|
||||
%lang(ru) %{_mandir}/ru/man1/@PACKAGE@.1*
|
||||
%lang(sv) %{_mandir}/sv/man1/@PACKAGE@.1*
|
||||
%lang(uk) %{_mandir}/uk/man1/@PACKAGE@.1*
|
||||
%lang(zh) %{_mandir}/zh/man1/@PACKAGE@.1*
|
||||
|
||||
%changelog
|
||||
# Add your changelog entries here
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
Name: snapraid
|
||||
Summary: Disk array backup for many large rarely-changed files
|
||||
Version: 14.0
|
||||
Release: 3%{?dist}
|
||||
License: GPL-3.0-or-later
|
||||
Group: Applications/System
|
||||
URL: https://www.snapraid.it/
|
||||
Source0: https://github.com/amadvance/snapraid/releases/download/v%{version}/snapraid-%{version}.tar.gz
|
||||
BuildRequires: gcc
|
||||
|
||||
%description
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it's able to recover from up to six disk
|
||||
failures. SnapRAID is mainly targeted for a home media center, with a
|
||||
lot of big files that rarely change.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc AUTHORS HISTORY README snapraid.conf.example
|
||||
%{_bindir}/snapraid
|
||||
%{_mandir}/man1/snapraid.1*
|
||||
%{_mandir}/man1/snapraid_log.1*
|
||||
%lang(de) %{_mandir}/de/man1/snapraid.1*
|
||||
%lang(es) %{_mandir}/es/man1/snapraid.1*
|
||||
%lang(fr) %{_mandir}/fr/man1/snapraid.1*
|
||||
%lang(it) %{_mandir}/it/man1/snapraid.1*
|
||||
%lang(ja) %{_mandir}/ja/man1/snapraid.1*
|
||||
%lang(ko) %{_mandir}/ko/man1/snapraid.1*
|
||||
%lang(pl) %{_mandir}/pl/man1/snapraid.1*
|
||||
%lang(pt) %{_mandir}/pt/man1/snapraid.1*
|
||||
%lang(ro) %{_mandir}/ro/man1/snapraid.1*
|
||||
%lang(ru) %{_mandir}/ru/man1/snapraid.1*
|
||||
%lang(sv) %{_mandir}/sv/man1/snapraid.1*
|
||||
%lang(uk) %{_mandir}/uk/man1/snapraid.1*
|
||||
%lang(zh) %{_mandir}/zh/man1/snapraid.1*
|
||||
|
||||
%changelog
|
||||
# Add your changelog entries here
|
||||
Loading…
Add table
Add a link
Reference in a new issue