aboutsummaryrefslogtreecommitdiff
path: root/app/crypt/rsyncrypto
diff options
context:
space:
mode:
Diffstat (limited to 'app/crypt/rsyncrypto')
-rw-r--r--app/crypt/rsyncrypto/Manifest24
-rw-r--r--app/crypt/rsyncrypto/rsyncrypto.SlackBuild221
-rw-r--r--app/crypt/rsyncrypto/slack-required4
3 files changed, 249 insertions, 0 deletions
diff --git a/app/crypt/rsyncrypto/Manifest b/app/crypt/rsyncrypto/Manifest
new file mode 100644
index 00000000..029121e8
--- /dev/null
+++ b/app/crypt/rsyncrypto/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST rsyncrypto-1.12.tar.gz 420652 MD5 62367d5458ceaab58bbe73030880f538 RMD160 a0fdb00fc5bfe5fd0e526dfd0f469dadb7ee8851 SHA1 9379603c21e4a180e85e0411cc237fe8c7ca52ec SHA256 1fbe640af6db598e105d9e9554cddce05ed78849f0afa26d4cc8b1e1a2df9ace SHA512 64e4526a4d945ec6a91232ae85ca231151af7373d553aa395000e585c680a6a8884642770428215cdbb1fbc7c80df322198837f5dc51dbace7b13176e14b9c0b
+MKBUILD rsyncrypto.mkbuild 3181 MD5 b1dc0f32eb194aba3a774cd2d61a7b2a RMD160 4febbbffd7e61b14cc973e021f7a6aa8bd8e9c3b SHA1 e9a817c2f944c406e092cbda9a081ddbbba7cb94 SHA256 f6c817e704df0936fd7c354bf4653c4fc677359de4ec2dadbfad1e8111bca578 SHA512 8fb11e3de285162732eab9efe0b68181deb07a1725d0e861b5ba9b4eaf6663f875f15aa383e7a6591af4d2b3230ab5593d60a8cf0ba1d362a5ec2c723d4f124a
+SLACK-REQUIRED slack-required 83 MD5 66e4a13a725dd71ec880c802dd5a495d RMD160 00c7c948466db2ed2e69f8be21b507ebfc92bbd4 SHA1 8db0f3d39a71e3d2b2afb70c2084d426c39b9ceb SHA256 55afc3007e65b8d721e9e85de53b99e6c4f13d3685c9034784df4d55420fdf47 SHA512 6094221f4032e3c7e3c8893fa08e237ae7c2aff11364dc63a8ae2faa337bbb02444555071abaddead647e3fc23d3fee706f67249d09dda12cd2f42fdfe3845b1
+SLACKBUILD rsyncrypto.SlackBuild 7153 MD5 01766574fd05553a0a54eadc389ac2ee RMD160 9ebc2eafd75c06361e44ba6ae3af0c99a4a30610 SHA1 11ed53ca329e1d2dee0e35b5dabae11213d39a29 SHA256 d14a135693da6b4b57a7e3d3b42bbd04614d55ec32a4861e83f5e7e79d020feb SHA512 2dde1c935f7c3314a369619bf1690d00449ad21b7d9f1b01688cc654dc62d2c5bb666b7b3d93b616e8b63cbc82ec9826e90e84d8ba59aa63b6ac569f2e7d9af5
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJnGVTAAoJEEHL93ESzgeiR48P/0qcvN5SZfAPUHaJOCXtJsuU
+NRstd17WvsNn82Ou+VAyFA1oVqRQkWHek93Kaf2EeIUhCM7vxfRoPCJXaSVx53gS
+VAc3pyaT8fwQM7EQrMxI8Ls80VbG1VMEtvRdk+DefgXKUI6Mkwv2eB2Vylt5Cmf0
+teTwD41kXk/Aeb52M1rz7q+8BaUa1r8koHAB2LGgisI0JA5pJGPYrk3ibL+t7Hds
+Pu+8FPUY9OE4h5s775zrePH/FulRWevVazhhHWyBh5Vb/bjtUBrwCSTmyrr25JE+
+E3ZHC76SLidmd/c1G1d6Hd1Pw80uPkOHkndQw/c9LnC5TGWXpxkToySZa7u+boHu
+LSXMVsTD43oyFuSQ02TEJf+bZyuo9suUCZPnKc98GrlMw92s9xWy74sott2ggDMj
+ZuN1zfHEDauuhOF83KiW0SHl2ORoSkGSnq4sNXJpD/Z793LUUP7pCnlLvYmAocqO
+7rwasumrua52Fcn5eRegkH9U9qjP29yKFwBSJSTpZacehzW+Ifup0S6HAHeRjgzS
+cCmeLb4WR5gSCPreq8Q0mMYKYTobg7Q8BHqm5yLUXd5HvM3R9sOqiL/w0QvcUMKf
+HrY2y8w0PPDnmtFyMgUSt1OFbqlN18bshGrcLxDLjVV+/sRvINXMM6uZfUa1AFVz
+WbdsnwzRxlCslGY5Iaol
+=dw0B
+-----END PGP SIGNATURE-----
diff --git a/app/crypt/rsyncrypto/rsyncrypto.SlackBuild b/app/crypt/rsyncrypto/rsyncrypto.SlackBuild
new file mode 100644
index 00000000..d228de36
--- /dev/null
+++ b/app/crypt/rsyncrypto/rsyncrypto.SlackBuild
@@ -0,0 +1,221 @@
+#!/bin/bash
+#
+# rsyncrypto.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# rsyncrypto.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for rsyncrypto, by Silvio Rhatto
+# requires: argtable
+# tested: rsyncrypto-1.12
+# model: generic.mkSlackBuild $Rev: 784 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="rsyncrypto"
+PKG_NAME="rsyncrypto"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=1.12}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
+TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
+REPOS=${REPOS:=$TMP}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
+
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
+
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://downloads.sourceforge.net/rsyncrypto/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
+
+# Check Manifest file
+if [ -e "$CWD/Manifest" ]; then
+
+ # Manifest signature checking
+ if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then
+ echo "Checking Manifest signature..."
+ gpg --verify $CWD/Manifest
+ if [ "$?" != "0" ]; then
+ exit $ERROR_MANIFEST
+ fi
+ fi
+
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`"
+ MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`"
+ MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`"
+
+ if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then
+ MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE"
+ else
+ MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`"
+ fi
+
+ if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then
+ continue
+ fi
+
+ echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..."
+
+ SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`"
+ SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`"
+
+ # Check source code size
+ if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then
+ echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "Size match."
+ fi
+
+ # Check source code integrity
+ for ALGO in md5 rmd160 sha1 sha256 sha512; do
+ if [ $ALGO = "rmd160" ]; then
+ ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`"
+ else
+ ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`"
+ fi
+ ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`"
+ ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }')
+ if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then
+ echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "$ALGO match."
+ fi
+ done
+
+ done
+
+else
+ exit $ERROR_MANIFEST
+fi
+
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler---------------------------------------------------|
+rsyncrypto: rsyncrypto
+rsyncrypto:
+rsyncrypto: Rsyncrypto allows you to encrypt a file or a directory structure
+rsyncrypto: such that they can later be synchronized to another machine using
+rsyncrypto: rsync. This means that local changes to the plain text file result
+rsyncrypto: in local changes to the cipher text file. rsyncrypto compresses
+rsyncrypto: the plain text file prior to encrypting it with gzip using the
+rsyncrypto: "rsyncable" patch, which is available from the rsync sources.
+rsyncrypto:
+rsyncrypto:
+rsyncrypto:
+EODESC
+
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
+ rm -rf "$PKG_WORK" "$PKG"
+fi
diff --git a/app/crypt/rsyncrypto/slack-required b/app/crypt/rsyncrypto/slack-required
new file mode 100644
index 00000000..df49b4d0
--- /dev/null
+++ b/app/crypt/rsyncrypto/slack-required
@@ -0,0 +1,4 @@
+# Dependency list to rsyncrypto
+#
+# dependency [condition] [version]]
+argtable