diff options
-rw-r--r-- | app/office/calcurse/Manifest | 24 | ||||
-rwxr-xr-x | app/office/calcurse/calcurse.SlackBuild | 82 |
2 files changed, 100 insertions, 6 deletions
diff --git a/app/office/calcurse/Manifest b/app/office/calcurse/Manifest new file mode 100644 index 00000000..c8457b34 --- /dev/null +++ b/app/office/calcurse/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST get.cgi?calcurse-2.3.tar.gz 516721 MD5 3aaa2f788238a837df0cf137f3657567 RMD160 680c40a4ddb54ddfec0af809e03166f2d8c372d7 SHA1 7fc5234e1f759bea2677e4d820ece825ea9e4822 SHA256 84ca8895e434f5717a12a579b0df45e663c4d6b2fdc041b78180a8434a5458bf SHA512 30249e9089e508911bbce6f63ccecf95fac09d10ba8dbf99aab4b06f7cc3504a5b31a5392ae9e6cf350238e085dd8053fa3038068fd8215ff7c19da61dc2079f +DIST get.cgi?calcurse-2.5.tar.gz 519870 MD5 7868f67c49b426e3ab4a4d34ce16ef1d RMD160 855bf4bca3e36461dd8278f8d0c8d78044dd2f0f SHA1 095364ca6d04ddf1039d92e0cafe8c49d15df709 SHA256 c0817c5b0452bf71340cec846731f6b2b3d47e8e172ca51974266c4a390411a2 SHA512 ea046a9a55699c2eae5ac892ffe24c2689972916fd06bf8a6fe3feeade228f6de2086b52e07ee2c572a2013347514ab4c0f9e81766a1de2a0e246a6bebdc4ad1 +MKBUILD calcurse.mkbuild 2931 MD5 bd647d89440ec04e98d4e2abf2b16c08 RMD160 cfe3e5c19c7cba95df78f310dcca4d0fe2a39c55 SHA1 cc76780097c89c5c2cf668b3c218ff09da2de704 SHA256 03d41dedac8f905c5bfdb6302a20b2a9e608385c6ae431b6edce87dc377bdaf9 SHA512 fa8fdcba4c1736e0f163820c0eeee64c7024db3db6bb451c20a6e13585afafdd391451fb9b6187bf32cb9e15a22da1654d5569e0b88a5dad74529b725739f258 +SLACKBUILD calcurse.SlackBuild 7087 MD5 c34bfcb76f7accc52809925c71d4b38a RMD160 0ede97b854f39e65739126f5a7f9485e2f2e1fc6 SHA1 29dd7eee18f12e630a752df7ab61e2ca00e02c84 SHA256 87cbded9dc65ab7b967ae3da8efa495a2ca31e8666b2e038ffc9d3b3eacff6c5 SHA512 fd403183178434d68f3471d9de65f37c5f7fff9d9bdb7451c35ea3a772ad99c3174119c5c8046d5d06a86df02cb6fa1fd37a3b9a160722f9291024f70fc8d768 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJuTkaAAoJEEHL93ESzgeiD5QP/1CTGz0pLLxuN0tBFKLtpya+ +uwPhdkg3rygqAx29wuBg/SQigovL+sqxf7UfxWmdgPQgC550iCryqTLkgtK/1va4 +eycx4svTxfgw0FlDvCZ412XYfq1LqlFoNzRdEHkLYEaaGhFcspSYMJI22lV5dxDa +4M3vaQtFoQX19J158MmCSEH2QsfDOh/1a+7/QuQYzf5lnfye7wQKbLNEI7zkUzVY +lgDQ/pQ7BPAkoSjnq40w4M8lVXD/fyc4iHpMW8cAV/tLe18Y8ZEjYl5THFM70AIb +gf1xhZQnSzUqotjJWyFXsW7PrJIoyCQPOtbHKGEmHz5ZFVh2O15ULXNjYRxVu4Wu +eOIns7TKZkOM6QDaJcQe3YGVIkTi+RI57H0Wdv0xnDuv1kUsRT4+Mu9Nq9GuJjgR +D5RAA+XFLPWQmNxmZ2zZ7jhg6ezRq5R4LOhbu68mgPlLw5rjmXOe5Dc7xeQEmeRr +AogJ+8tbQe2Hm/U84Yk4BiPEGjwxQLpkBoLSW9NSVU2VNrQvYr0fyy2JRQ264GLU +arotfEWrv9hjpvcELPYXPJOMaDx951w3TaN//B0lOKFsKFTn8nfyxv2EbRxfzpgA +wDesGGNhRxv0/h2n6ugXkBSIdq0AHze1ysZyFUUuO4NYlkNEgOVb92uWh8iV+wQv +n7wYC11C8CcWWHTp3Pnj +=Zopy +-----END PGP SIGNATURE----- diff --git a/app/office/calcurse/calcurse.SlackBuild b/app/office/calcurse/calcurse.SlackBuild index e95296d2..8c0c78f9 100755 --- a/app/office/calcurse/calcurse.SlackBuild +++ b/app/office/calcurse/calcurse.SlackBuild @@ -16,7 +16,8 @@ # # slackbuild for calcurse, by Silvio Rhatto # requires: -# tested: calcurse-2.3 +# tested: calcurse-2.5 +# model: generic.mkSlackBuild $Rev: 796 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="calcurse" PKG_NAME="calcurse" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=2.3} +SRC_VERSION=${VERSION:=2.5} 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} +SLACKBUILD_PATH=${SLACKBUILD_PATH:="app/office/calcurse"} PREFIX=${PREFIX:=/usr} PKG_WORK="$TMP/$SRC_NAME" CONF_OPTIONS=${CONF_OPTIONS:=""} @@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:=""} 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" ] || ! 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 @@ -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 |