diff options
Diffstat (limited to 'trunk/conf')
-rw-r--r-- | trunk/conf/generic.mkSlackBuild.new | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/trunk/conf/generic.mkSlackBuild.new b/trunk/conf/generic.mkSlackBuild.new index 7f83d0e..81b1fdf 100644 --- a/trunk/conf/generic.mkSlackBuild.new +++ b/trunk/conf/generic.mkSlackBuild.new @@ -77,14 +77,6 @@ mkdir -p "$PKG" || exit $ERROR_MKDIR mkdir -p "$REPOS" || exit $ERROR_MKDIR </start_structure> -<import_gpg_signing> off -# Import minimized signing key from -# [[SIGNING KEY URL]] -gpg --import << EOKEY || exit $ERROR_GPG -[[SIGNING KEY]] -EOKEY -</import_gpg_signing> - <download_source> on # Dowload source if necessary SRC="$SRC_NAME-$SRC_VERSION.tar.[[SOURCE EXTENSION]]" @@ -95,14 +87,34 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! [[DECOMPRESSOR]] [[DECOMPRESSOR TEST FLAG]] "$S fi </download_source> -<download_signature_and_check> off +<gpg_signature_check> off +# Import minimized signing key from +# [[SIGNING KEY URL]] +gpg --import << EOKEY || exit $ERROR_GPG +[[SIGNING KEY]] +EOKEY + # Dowload source's signature if necessary and check it if [ ! -s "$SRC_DIR/$SRC.sig" ]; then wget "$URL.sig" -O "$SRC_DIR/$SRC.sig" || exit $ERROR_WGET fi gpg --verify "$SRC_DIR/$SRC.sig" "$SRC_DIR/$SRC" || exit $ERROR_GPG -</download_signature_and_check> +</gpg_signature_check> + +<md5sum_download_and_check> off +# Md5sum check +MD5SUM_FILE=${SRC//.tar.[[SOURCE EXTENSION]]}.[[MD5SUM EXTENSION]] +#MD5SUM_FILE=$SRC.[[MD5SUM EXTENSION]] +if [ ! -s "$SRC_DIR/$MD5SUM_FILE" ]; then + wget [[DOWNLOAD FOLDER URL]]/$MD5SUM_FILE -O $SRC_DIR/$MD5SUM_FILE +fi + +MD5SUM_SRC=`md5sum $SRC_DIR/$SRC | awk '{print $1}'` +MD5SUM_EXT=`eval "grep '$SRC[ \t]*$' $SRC_DIR/$MD5SUM_FILE" | awk '{print $1}'` + +[ "$MD5SUM_SRC" != "$MD5SUM_EXT" ] && exit $ERROR_MD5 +</md5sum_download_and_check> <untar_source> all # Untar |