aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/text/rarian/Manifest23
-rw-r--r--app/text/rarian/rarian.SlackBuild82
2 files changed, 99 insertions, 6 deletions
diff --git a/app/text/rarian/Manifest b/app/text/rarian/Manifest
new file mode 100644
index 00000000..35eeda14
--- /dev/null
+++ b/app/text/rarian/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST rarian-0.8.1.tar.bz2 324441 MD5 75091185e13da67a0ff4279de1757b94 RMD160 2e4c0a4d22a4e0c41d4d3dc8e4a5ad080ee3b6ce SHA1 9b3f1bad1cdbb0de51d6f74431b20eb3647edc5a SHA256 aafe886d46e467eb3414e91fa9e42955bd4b618c3e19c42c773026b205a84577 SHA512 64f3e7fbe423e45a59453805fe6b4116e0ffad43c7e88fe362d76a326c70936c6b46c4a4dc57cf43e3535c16f2f07fa1b2affa0aaeae637ee3ede48850c1fc60
+MKBUILD rarian.mkbuild 4039 MD5 cb513b002f298868a895aa0d4a08774c RMD160 2969b44db63f3e94554ca43c862ecb22c6357186 SHA1 ee5ac271138aa08dda5577e82f93c882d44b83e7 SHA256 5dfaa6f058668718d3db6d03f9806c24ddfccfdafc3ba36661e6de6adb72eb78 SHA512 6f715ba2648b9f0516e2f3aa38c7aac28aa3cfc4ccee5f78f619af156f009828385b28b0d880dcfc29578dec1c4691ea406f31a157f7a32b533073e057a17912
+SLACKBUILD rarian.SlackBuild 7161 MD5 03ca04cfdd6da7e678953a25fe653592 RMD160 42465a0dcda1b1be04d5b1b3384b7d941bca0770 SHA1 60cfdb8cda98197589ab6f425ed7250553b070bf SHA256 cbff7274ee9aa898742ec5fbdbf5ed98535ad98af3cac5e2956a36417a4f15c6 SHA512 ca13856d91a0e545ad97568d9b87066624b97983e2ee7f551e35db9a1c3eb8514bf41948babd5901a44ccdefba63a852744f0452cded11f60d6e3af965dcc9b5
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKz5TTAAoJEEHL93ESzgeidmgP/1E/m+3irtZfs+prMCDosrDc
+dvjOJVi55Qt7jtwq7y5Pk7nuXv02KEaYokwaNZ7UKiP4mLwZUoq7nCo1rSPSLOr2
+sKeR74bcPgbM5oTzkyXWkmTcoscZa24LjBvLbBfv00BWWO1MxyeG+nnz6X9dZHdS
+V8sH8g0ksearvW1N0y5gpD2O+AkmguslI3+jluOvUgnMJKSF1GfopkfilIA+n/O5
+V6gSaEmld8VFKVV3vhwRadKAv010qaQkHmXvzOcCsXVrXtHiRcGF75fCk/YlCVvk
+JgbLZqeeDNbI3sWxXuWgCtT8aE4mzvcbwIfXJxFneQz0w2tlu6kP5qp1FvDbdw2N
+63EgwfQM7AD6Nh1VpLLQAa/4vmreXukG8z1wNdTUb+1Q5gkHKWSsl3FoxpmTh1NP
+XtO6zAxP6W+o1Cr6bgwWNb/bE9SR0H0Ca1xpE/C2qlscQtVUQB9+aPODtv+UySAR
+QOmCZxZfMSDFlPPSWn1PdD6IpkyZUFoJTmDc1cxYdLjDWcFZf4C6wdm2lG+Fa7Cj
+atzNKGNb4s00wrcX377zKoyim03XEyo2fWja1jMepOaPMZNnkLCVJDvBZlHafDT6
+hVWIOrNUTCRrUoJULeI8EzOUcMdHH0MiJHJ8My5+85X2BbS/Cq63pw3YT3TE1Smj
+V4p8bR0ZdfxOdcSw6XUI
+=1hqs
+-----END PGP SIGNATURE-----
diff --git a/app/text/rarian/rarian.SlackBuild b/app/text/rarian/rarian.SlackBuild
index 61532b55..d378a503 100644
--- a/app/text/rarian/rarian.SlackBuild
+++ b/app/text/rarian/rarian.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for rarian, by Rudson R. Alves
# requires:
-# tested: rarian-0.8.0
+# tested: rarian-0.8.1
+# model: generic.mkSlackBuild $Rev: 808 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="rarian"
PKG_NAME="rarian"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=0.8.0}
+SRC_VERSION=${VERSION:=0.8.1}
PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rra}
SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="app/text/rarian"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --localstatedir=/var --disable-static --program-prefix= --program-suffix= --build=$ARCH-slackware-linux"}
@@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:="-j7"}
LIBDIR="$PREFIX/lib"
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686"
elif [ "$ARCH" = "s390" ]; then
@@ -65,6 +67,7 @@ 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
@@ -84,6 +87,72 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -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
@@ -145,9 +214,10 @@ EODESC
# Build the package
cd "$PKG"
-makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
# Delete source and build directories if requested
-if [ "$CLEANUP" == "yes" ]; then
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
rm -rf "$PKG_WORK" "$PKG"
fi