]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
fix on gpg signature handling on generic and perl mkbuild model files
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 20 Apr 2008 20:25:44 +0000 (20:25 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 20 Apr 2008 20:25:44 +0000 (20:25 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@491 04377dda-e619-0410-9926-eae83683ac58

trunk/mkbuild/generic.mkSlackBuild
trunk/mkbuild/perl.mkSlackBuild

index a71a225f94401de4370110cc93964e8350f45981..55bfba370552d04d408d437968e2848892623ed7 100644 (file)
@@ -1,7 +1,7 @@
 #################################################################
 ## Generic template for SlackBuilds
 ##
-## Version 0.9.4 - Luis ( luis at riseup d0t net)
+## Version 0.9.5 - Luis ( luis at riseup d0t net)
 ##                 Alves ( rudsonalves at yahoo d0t com d0t br )
 #################################################################
 #!/bin/bash
@@ -125,17 +125,21 @@ MD5SUM_URL="$(grep "$SRC[ \t]*$" "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" | cut -d "
 
 <gpg_signature_check> off
 # Import minimized signing key from
-# [[SIGNING KEY URL]]
-gpg --import << EOKEY || exit $ERROR_GPG
+if echo [[SIGNING KEY URL]] | grep -q -v "SIGNING KEY URL"; then
+  lynx -dump [[SIGNING KEY URL]] | gpg --import || exit $ERROR_GPG
+else
+  gpg --import << EOKEY || exit $ERROR_GPG
 [[SIGNING KEY]]
 EOKEY
+fi
 
-# Dowload source's signature if necessary and check it
+# Download source's signature if necessary and check it
+SIGNATURE="`basename [[SIGNING URL]]`"
 if [ ! -s "$SRC_DIR/$SRC.sig" ]; then
-  wget "$URL.sig" -O "$SRC_DIR/$SRC.sig" || exit $ERROR_WGET
+  wget "[[SIGNING URL]]" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET
 fi
 
-gpg --verify "$SRC_DIR/$SRC.sig" "$SRC_DIR/$SRC" || exit $ERROR_GPG
+gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG
 </gpg_signature_check>
 
 <untar_source> off
index d90dacc7db869c3e9030558f3f874bfb5e06a15e..617283a5eda8e519645fd87c95c63c29eb9190a9 100644 (file)
@@ -126,17 +126,21 @@ MD5SUM_URL="$(grep "$SRC[ \t]*$" "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" | cut -d "
 
 <gpg_signature_check> off
 # Import minimized signing key from
-# [[SIGNING KEY URL]]
-gpg --import << EOKEY || exit $ERROR_GPG
+if echo [[SIGNING KEY URL]] | grep -q -v "SIGNING KEY URL"; then
+  lynx -dump [[SIGNING KEY URL]] | gpg --import || exit $ERROR_GPG
+else
+  gpg --import << EOKEY || exit $ERROR_GPG
 [[SIGNING KEY]]
 EOKEY
+fi
 
-# Dowload source's signature if necessary and check it
+# Download source's signature if necessary and check it
+SIGNATURE="`basename [[SIGNING URL]]`"
 if [ ! -s "$SRC_DIR/$SRC.sig" ]; then
-  wget "$URL.sig" -O "$SRC_DIR/$SRC.sig" || exit $ERROR_WGET
+  wget "[[SIGNING URL]]" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET
 fi
 
-gpg --verify "$SRC_DIR/$SRC.sig" "$SRC_DIR/$SRC" || exit $ERROR_GPG
+gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG
 </gpg_signature_check>
 
 <untar_source> off