diff options
Diffstat (limited to 'net/im/silc-client')
-rw-r--r-- | net/im/silc-client/Manifest | 24 | ||||
-rwxr-xr-x | net/im/silc-client/silc-client.SlackBuild | 84 |
2 files changed, 101 insertions, 7 deletions
diff --git a/net/im/silc-client/Manifest b/net/im/silc-client/Manifest new file mode 100644 index 00000000..2e3f9636 --- /dev/null +++ b/net/im/silc-client/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST silc-client-1.1.8.tar.bz2 1532816 MD5 4219d96f6adc2eed406c6dbf8072ae90 RMD160 a010384b5e498a62cc6cd69e97602f3118b64d2f SHA1 5936ab682e746ae413f938ce9c9b72215d6524c0 SHA256 623fec16aef312cc98a8a97c640b9451d3ea81d7690abc86bece2e8d5e19d3e2 SHA512 3b9850557c7f82679a686948f7487ca7bfa53bca320ed798f83f172a1d4eff418c15bcda164bb9ade7051a5e2b19987f0a2145e7e860d0f7f63cd1032206e67d +MKBUILD silc-client.mkbuild 3383 MD5 cda9174e3881abd1fe7b8f3ae8415ea9 RMD160 b0b031659ae26a4d329519d220337bb7f43230f9 SHA1 d8d61fa542702144576a456f264b039112fa7659 SHA256 94955a926c43c858a1c50d51565b842b4092c80e5a41efa80916b0a71f101caf SHA512 1188c586e66a41ddb8d84130c6231079b275fbe346a4e036f5417d46786c86699cf2cffc5e7f70ff1531e543ca61f2e01e7c3031715634e3be55906cfe5356f1 +SLACK-REQUIRED slack-required 88 MD5 05e6f1899f1ed815324e8e9877bc5c89 RMD160 f4e3d40f5ac39b6919c066339a44636ec06b40c1 SHA1 9112b64c6c1cc94187dc014df91a8a1f58a54274 SHA256 9deec51ead084748da12bef6ebc4f462e146686bd190000cdfc24769738c9002 SHA512 5e700a8b283da6692b8edfa91032707f925b6d98a4845bcc1348c702d641c99f1305f85c1a8982523144c6dd19a7a6e0e72bb84179cb7ed34e576f0472f4a5cc +SLACKBUILD silc-client.SlackBuild 8735 MD5 794b96df83cd77e3f78eb1274f4e2fdb RMD160 bacf02f66f8fe1d4b33ab1b50b8b05743820a842 SHA1 a3c043b7b395fc952c11eebc027fe2a561b62fc3 SHA256 9034503c6462d51a0583794279ac16c66ef995cccd0bff4903685a6410ffabd7 SHA512 1f19d53e38c101fd01b59d3d6520f00a22936decff8d8ca1d9a356c6ef2754a1473c322906870c52d08bd812a4382c030bd3cc06c8aeb64abc8d858eec4fb8e2 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJKpZunAAoJEEHL93ESzgeiAUQQAIeohnoTrxtrhvthUaXdo3qP +1ITBuBLOCVKHwRuMlkWXzwNCJ/x61Hu9BhOEw8lLB0AeKqqIWPnpf38RvM73j0ud +qJ7LfIgf40PGgZ008841dEd6w0jkEYXnOVuDYrHXmHMV9VQuVLL0iuCLbD44CyEx +Z9VOzoET8JpJ7VFHLIgjDSYhMJqcpt15++cNbETLcIgSUbPv2c7RPomgai2pcTfS +Tbnt96JBSLUtZaF/bydxsn1yh3OpU6K9w1GkX2HT7GVIuH6lYCHhwenzS+rZLKr+ +T7RnXhp99LOeZk4sRD8bJTSDaetMXDcM+Pmt2IJyECRr7sjJsJcUwM0XWSmKph39 +TFzi/61AGP+8pmOyRvwa1c6oDhvE6ypm9PNh63PzQWkaFBq3+JD20y+Hwiaaj0kT +y/ogpoLOwaXcjkogfsjZsZWhhJBjQVDIxpYHkzzIyGbJhsWq5L7NxV/zYib0ds90 +hykFmCzP3pmk2lbCksl8s9YFPH3Q4zXVqal9JKy5KaaF+wJQyR+zuMOnj+4CcAKG +V3CARmC7iWEkUr0Uqdq2ZyCGJyL61Qy1tRM4qIU5wg2hIEtKEEWTKyaKG/puioYP +txV2gNM2m0TA3/RGhLn80GrygCoKSC53q02PGRZ/7nN96/HOGAaIfTDICj8l/U0b +wkbK/R3O31qYFT1qZAbH +=HVGr +-----END PGP SIGNATURE----- diff --git a/net/im/silc-client/silc-client.SlackBuild b/net/im/silc-client/silc-client.SlackBuild index d5d1f3f6..4a99f5d5 100755 --- a/net/im/silc-client/silc-client.SlackBuild +++ b/net/im/silc-client/silc-client.SlackBuild @@ -15,8 +15,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for silc-client, by Silvio Rhatto -# requires: silc-toolkit -# tested: silc-client-1.1.6 +# requires: +# tested: silc-client-1.1.8 +# model: generic.mkSlackBuild $Rev: 808 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="silc-client" PKG_NAME="silc-client" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=1.1.6} +SRC_VERSION=${VERSION:=1.1.8} 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:="net/im/silc-client"} PREFIX=${PREFIX:=/usr} PKG_WORK="$TMP/$SRC_NAME" CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --docdir=/usr/doc/$PKG_NAME-$PKG_VERSION"} @@ -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" ] || ! 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 @@ -188,7 +257,7 @@ mkuser() { fi } -config etc/silc.conf +config etc/silc.conf.new EOSCRIPT # Copy slack-required @@ -199,7 +268,8 @@ fi # 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" ] || [ "$1" = "--cleanup" ]; then |