aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-07-14 14:23:48 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-07-14 14:23:48 +0000
commit9fe1a048f6a61e9b36313af42c9294d26fe960fd (patch)
tree778f84401471d1e83ab54012f196d84fe338cfbd /dev
parent30278eddad7f73e234880e1944b8801095580fac (diff)
downloadslackbuilds-9fe1a048f6a61e9b36313af42c9294d26fe960fd.tar.gz
slackbuilds-9fe1a048f6a61e9b36313af42c9294d26fe960fd.tar.bz2
monkeysphere: updating dependencies; syslog-ng: updating; cyrus-sasl: updating
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2227 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev')
-rw-r--r--dev/libs/cyrus-sasl/Manifest24
-rwxr-xr-xdev/libs/cyrus-sasl/cyrus-sasl.SlackBuild101
-rw-r--r--dev/libs/eventlog/Manifest23
-rwxr-xr-xdev/libs/eventlog/eventlog.SlackBuild86
-rw-r--r--dev/perl/perl-crypt-openssl-bignum/Manifest23
-rw-r--r--dev/perl/perl-crypt-openssl-bignum/perl-crypt-openssl-bignum.SlackBuild226
-rw-r--r--dev/perl/perl-crypt-openssl-rsa/Manifest24
-rw-r--r--dev/perl/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.SlackBuild226
-rw-r--r--dev/perl/perl-crypt-openssl-rsa/slack-required4
-rw-r--r--dev/perl/perl-digest-sha/Manifest23
-rw-r--r--dev/perl/perl-digest-sha/perl-digest-sha.SlackBuild226
-rw-r--r--dev/perl/perl-digest-sha1/Manifest24
-rwxr-xr-xdev/perl/perl-digest-sha1/perl-digest-sha1.SlackBuild78
13 files changed, 1063 insertions, 25 deletions
diff --git a/dev/libs/cyrus-sasl/Manifest b/dev/libs/cyrus-sasl/Manifest
new file mode 100644
index 00000000..43946ca8
--- /dev/null
+++ b/dev/libs/cyrus-sasl/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST cyrus-sasl-2.1.23.tar.gz 1613642 MD5 2eb0e48106f0e9cd8001e654f267ecbc RMD160 b2cd9734fa8b4bad82663517f019f9b92d9d3519 SHA1 5df33a6788d6cd8329b109eff777c6cfae1a21bd SHA256 20efcc4040cbab6e89a636a07dcf5720ee07b5c62359a4e7bf2500ef6020b136 SHA512 bf72db55fefe9eccfe4a12caf1160efc80aba98f8acc2743af360fda96659a3ee1fc3a5af6104b3dfc8fc4571f4e98526b9719a6cdf0948980cf76a9cb1a2b0e
+MISC rc.saslauthd.new 1169 MD5 55bd59e6700b0d10b5caba7071ed1f99 RMD160 7574bdc35a5b81db2dd4df9c721a8984efb822ac SHA1 26432c67e25054c766d896caf50f252003db6b31 SHA256 b38e63eb33e1abece6b03102050efeced966d983b515cbef864fe80ca10476d4 SHA512 4c520d7e6e5225d285f59c66692934767f98faaa1d53d47d8243ede0ff346b2a2c3219f9daf79a7522729e82b08bf76b98efc688d2c50fb8497c30d5c91b0a63
+MKBUILD cyrus-sasl.mkbuild 3102 MD5 260a85dc2e861d3c8e23b13622949b82 RMD160 a2dcc40c0e2e2cdafb24905d44a112e91b8f1e6b SHA1 7cb1626f56c6f6398ac66aa257e37ee9aa069834 SHA256 387d9fad33961e0fa59316dcd2b527875ecef26b3cd2ba440b9b1f6d6793775e SHA512 df68dd1ba843a1aa898886dc2a2a4d8b2f956bc621b087803a69a9c269404ff38341d69eb87539a619914388783b79314c1d0d674c7aecec8b32ba00210d9d3a
+SLACKBUILD cyrus-sasl.SlackBuild 9599 MD5 1d70665f8c7ec173ec2626d0a203c563 RMD160 fa042cc18beb0ebce7fbb15a59a21543475bdc06 SHA1 3f5acb759277adb069fcc204e4a7342ff5bb7fcb SHA256 4eb10d42cbe597b6c5152caed510d4781165a38e32114fc4e26c1497670920ab SHA512 a535b1cf3f45251bdc5ce3249e720bfff2d9fab777426bbb3a1abeed525e3ae9e6d11ee1d2a84d0e9939da10170a3a77126abdd89e78ac698056fb5b21fffcc1
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKWpOhAAoJEEHL93ESzgeiNj8QAJ0Hb/lewmmQt+UD3JfCR8St
+cIrcGn7kb2UrA/eGd0vIjy76/XO/peXDuF5EMqDFwWyMGdHwmt6SQw8O58T7FNyL
+3NrKeUHEdzI1abblQvrUIjhO+RTqS4+My1lQMCU94BQK8lss8XnoDnpfhjdeIddS
+GDcWogCJPjcB3UvGknkMqP/Jy1waz+cMIAxB83pcOhf45mzvPOwzY9vGSc8a7GSd
+C+5moUt3PUeICWLUdU2w7hDmr3tmk3b1AT1gjBRyUNWHo1xac7UYuatjSf9XEn0Y
+Jo0RFp3FHiRSlLq7nS2VgS5Ab9k+fWFZHV507zakJidaHtoYMoYsYLcYiH2YbdmB
+2L/0cBwtTst6CdQBb1idvEjQ0LRKUoXpl/tZbsPwNeT4C1n2qZZAWZM6wiEcjxFe
+ZuV2K8N6QwCUL150ChaOeTeLUcPHt05iCps8jfTnZUwyGMhOudZHe9O6OQ39VKM/
+eRPNxLPAqsli9QFj7INdUeiiF9FTEIBKbSNaM4WgimtTnt0HCBh3CA7JedjvkOCS
+y6GH9ZfiWNVREtrWEzKLQglKUTNAg5ZGt/4kih8UuR3Z3hKu4o/5MBDZ3IUn56jt
+h/fUVLeTUWWoLeo8J0cWnW9+L7iTJLH4SQtnBPr5w1OY2iBtIxk+QAJDS2yu0b72
+XkWdTrNLe8DoKNQP4RNQ
+=8qt3
+-----END PGP SIGNATURE-----
diff --git a/dev/libs/cyrus-sasl/cyrus-sasl.SlackBuild b/dev/libs/cyrus-sasl/cyrus-sasl.SlackBuild
index a70a2b29..17123def 100755
--- a/dev/libs/cyrus-sasl/cyrus-sasl.SlackBuild
+++ b/dev/libs/cyrus-sasl/cyrus-sasl.SlackBuild
@@ -10,13 +10,14 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place - Suite 330, Boston, MA 02111-1307, USA
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
# slackbuild for cyrus-sasl, by Silvio Rhatto
# requires:
-# tested: cyrus-sasl-2.1.22
+# tested: cyrus-sasl-2.1.23
+# model: generic.mkSlackBuild $Rev: 805 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="cyrus-sasl"
PKG_NAME="cyrus-sasl"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=2.1.22}
+SRC_VERSION=${VERSION:=2.1.23}
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:="dev/libs/cyrus-sasl"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-authdaemond=/usr/sbin/authdaemond"}
@@ -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
@@ -57,6 +59,7 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
# Set error codes (used by createpkg)
@@ -64,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
@@ -127,10 +131,76 @@ echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE...
gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG
echo Success.
+# 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
-PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`"
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
# Configure
@@ -170,9 +240,9 @@ done
mkdir -p "$PKG/install" || exit $ERROR_MKDIR
cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
@@ -191,10 +261,14 @@ cyrus-sasl-ldap:
EODESC
# Add a post-installation script (doinst.sh)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
cat << EOSCRIPT > "$PKG/install/doinst.sh"
config() {
NEW="\$1"
OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .sample)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .dist)"
+
# If there's no config file by that name, mv it over:
if [ ! -r \$OLD ]; then
mv \$NEW \$OLD
@@ -210,7 +284,7 @@ mkgroup() {
if ! grep -qe "^\$GROUP:" etc/group; then
echo Creating group \$GROUP...
chroot . /usr/sbin/groupadd \$GROUP
- fi
+ fi
}
mkuser() {
@@ -231,9 +305,10 @@ EOSCRIPT
# 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
diff --git a/dev/libs/eventlog/Manifest b/dev/libs/eventlog/Manifest
new file mode 100644
index 00000000..9e8ae806
--- /dev/null
+++ b/dev/libs/eventlog/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST eventlog_0.2.9.tar.gz 330517 MD5 76e3d7a0b8f335c12099e9b91191fbf1 RMD160 e5b75a133b0e173425f4c2dd4d86a11c73dec6af SHA1 2cc6a4d1dc07ab84832f2cd44822ee7b339deb51 SHA256 15146cb72e322766bb8f93b7b0d254d4b9a53826ee65de335dc6ac4376cd51b1 SHA512 c37636cf3cd37a9cb9bafbc56c414d4a6baacfb866af0ff8728a8529d619d0716e2b7cd40f3bdcd9d8eff964e564737692409f20a20235ecaee3281e310435e5
+MKBUILD eventlog.mkbuild 2880 MD5 22d7aa0018ad630c70f1aa4c84dd8eba RMD160 aa67d6eea94fed33d3dbcd01104102334622acaf SHA1 641bdbbad0353f7d3fb4ecd323a089bc1f8dcd84 SHA256 b19e95a80e4d2e43381a0b4c93bfc96253dae3923accc297653eb5acccf6db65 SHA512 856e1f1b1edcd25f3e011059377962d1b6bcdb28c8652b555496e574f2ec44f25495cd4791b6e09b72b976e49ff224cc978367c7b812b8722321b8d12a9065f9
+SLACKBUILD eventlog.SlackBuild 7004 MD5 684a5633d65459bfd00b43d0aef1750b RMD160 c2f99f0a8e48888e59883c164c7056953ce0edee SHA1 59dcd9c59391932a580130546e0f2cdb7fbf4d78 SHA256 6bbd8baeee2ffa76627f8b5458072748c67ef68d8e8a7672a7fb85032aa4f08f SHA512 132a899e4fc741a9ee51e61fd3d36471a001029d2255c236167287128c65e3de1dd3b4dd9eb23f2c26cda66f6c13c4b923a901cc3e942ff60f4484a5e49172af
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKWpwtAAoJEEHL93ESzgeiKwUP/2CD7kqNfyGk+B5/Nq1BJNGP
+qc38APLISfnNYqOfh4YVdvwcrzvFhaU5PbUVhW/8AlpkhSAaqTr/AAIEADCEfEQT
+s0A3SsIECjBvRzf4xrBc2ArVFWXnZUNWDfcVUcXlNWC+/nO4D7b0gbfez2PoWyS8
+yuKFX4sKFLiN2zzkoiWJh9q50kf51qEgBZxndNN8F8VMKlkb1h5084oav+0Gk2Z/
+R2XGARSEPU+GGKv5F0Yh7AbdWP7VGXvz2XbcwRC9lPN7X0/i0lU0AzxOuhlFWWsh
+oWGTazrLmPUda/xJOW93srv4sWsCDltKxGEIhsnP4yKJhkueQ5O7Ci/I6SNXfO0l
+O1pKBrHhedsEiIiNhjv2VpejRcaEqMMtsODFUcCvPfqQAs2Wm/wZ08y7x6AiEyGH
+Ha6iDOecWrfbHyRfQNDn3szekcTs01viOARI7vKtFkn6pqxbGgku/72TKc1YkE88
+dgUIpzqZnCBiAbd+UT0JbGI978ElkLIOSzJIvs0O5jySeeEdRTRw2+lr4Hj/3H8U
+a5kMbGVm59PEg9D4M1/d97feiWlZGFvkGYENyXQiKAZZhwFzltlJ+ECclGdkRA36
+zIgGrwPAREC5HiikPg3/9rUppiKmYB9IBSLRfD9GnPwvVP2jfxlyBscjJwYfKRbr
+oRlWNNzL19ynS0vPV+Zz
+=+fVD
+-----END PGP SIGNATURE-----
diff --git a/dev/libs/eventlog/eventlog.SlackBuild b/dev/libs/eventlog/eventlog.SlackBuild
index 8830087d..d5fc82c7 100755
--- a/dev/libs/eventlog/eventlog.SlackBuild
+++ b/dev/libs/eventlog/eventlog.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for eventlog, by Silvio Rhatto
# requires:
-# tested: eventlog-0.2.7
+# tested: eventlog-0.2.9
+# model: generic.mkSlackBuild $Rev: 805 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="eventlog"
PKG_NAME="eventlog"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=0.2.7}
+SRC_VERSION=${VERSION:=0.2.9}
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:="dev/libs/eventlog"}
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
@@ -77,13 +80,79 @@ mkdir -p "$REPOS" || exit $ERROR_MKDIR
mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
# Dowload source if necessary
-SRC="$SRC_NAME-$VERSION.tar.gz"
-URL="http://www.balabit.com/downloads/files/syslog-ng/sources/stable/src/$SRC"
+SRC="$SRC_NAME"_"$VERSION.tar.gz"
+URL="http://www.balabit.com/downloads/files/eventlog/0.2/$SRC"
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
diff --git a/dev/perl/perl-crypt-openssl-bignum/Manifest b/dev/perl/perl-crypt-openssl-bignum/Manifest
new file mode 100644
index 00000000..0efb37c5
--- /dev/null
+++ b/dev/perl/perl-crypt-openssl-bignum/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST Crypt-OpenSSL-Bignum-0.04.tar.gz 13520 MD5 9369ef722b0705c0604998559988eb18 RMD160 9069e693779eab96596d44404413e15a6eebe177 SHA1 ce7f856483f4a1f473bc41d77736ff9684b0545e SHA256 73a1e3a2419054a5109629c55d3ec322415be07d6bb6029b830a30e8f1126fa3 SHA512 ea95da0a71e7534595d721a0c4ad95f43d93407b3ed465aad88d8809a11646da15254341b5c36c6248b80be844b36276079b1b050ad5dacbdf71f2bb06621403
+MKBUILD perl-crypt-openssl-bignum.mkbuild 2508 MD5 520790c5ef784f6cebc32387fecd95ac RMD160 c8b7cb2ea0461dd2b565da9cb7ed1217934b089b SHA1 d7de3e4cefd6b55a9242ca9e3fea8d392168652a SHA256 2ceffe158f8f8737fd2732b54dc9c754029f47443b3822115347b1002db60e99 SHA512 66e49654c53efd64c1c726ae2097cf3cbe83e39cf633722e2aa323adc3f3986620d0a4964a3a40f3d72437f8adcd9f97a0cd3a92d478419d1e84c70f734a02a4
+SLACKBUILD perl-crypt-openssl-bignum.SlackBuild 7231 MD5 9942803817b0d3138b6be931923fb174 RMD160 d81df6e8bf61224dbf076c1c1a2851976ec13d6a SHA1 339e8a4c11b0cf7d05b4360a7a479c3b015a3a47 SHA256 10d87e96d5868167cedf69e8022090c2728b54c3d763702ef3b99db5d5ba0c0a SHA512 0d13e0ab8972bfc2208d3901ffe90ddc82df6623e2eff73a538ce97c089842ce19e10f973f6f0ccbcd99b9ed65c63941a8f6a4f2bfd331438d49be39f2b86df9
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKWh9RAAoJEEHL93ESzgeijqUQAI7QB1U7IFiHunXwXFU+O5NS
+VEgeqB+JBKzo0aSwKzJUiMpr2rQKHn7CFkwMTlx+rsOa8NWQdIm/qK1M2JxglYvV
+TLhbZBW4TvgpRIav45qLayOx1lt16DYMDzBZjYmcQbTKyeN4uk61Gi6Oy6/j7h9D
+NiRN8UnobD7AJmEo756Kqadv8mbWouf0xLj+wQhy83RMx1uczFo7HCMEHArrVUKU
+UtE1Uz7SBxAciLz/aL9BWHuFaqyIzzlgADFiXzupxcKLGX9CqP4ADKMp8D4kSlgF
+r6+15GFVk2ns+Xr3wm0zQ8I8QJh+xkY8Vq8ft7ViXNendznX3kbz17osdaGKC6SS
+ERAiQnqAFBw9zadpO/w9UACppUNuLqe1BdLsvFl7zmyr6TSfXuKOjgLroFWoSfXS
+x69v5OABOaY/nImIm1GIm6AlsOkEEazo33/95P/3ydG083IPQ2G8d2nnJjBurK6f
+NvSHh9tFGRnZq4JfRWYd0nVEsSV9JVLruFemIXO+LZLMOh7AF6ZqvS7EWKHcvb08
+wIpHA/29MpKDBYx2UImAuwXz8wY4iYedTsDtHK/9EJppsjIMnwW8aeky4o1Uu0Wy
+KkhO8Qvc+/WLfY4YsYfPzMj4MufVo1RwvlTsNcptJB/3wj9a8eBrxplu91ZE12Xd
+rKjMteXcU/sSdbo5Nbj4
+=UhQN
+-----END PGP SIGNATURE-----
diff --git a/dev/perl/perl-crypt-openssl-bignum/perl-crypt-openssl-bignum.SlackBuild b/dev/perl/perl-crypt-openssl-bignum/perl-crypt-openssl-bignum.SlackBuild
new file mode 100644
index 00000000..cd8c4177
--- /dev/null
+++ b/dev/perl/perl-crypt-openssl-bignum/perl-crypt-openssl-bignum.SlackBuild
@@ -0,0 +1,226 @@
+#!/bin/bash
+#
+# perl-crypt-openssl-bignum.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# perl-crypt-openssl-bignum.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for perl-crypt-openssl-bignum, by Silvio Rhatto
+# requires:
+# tested: perl-crypt-openssl-bignum-0.04
+# model: perl.mkSlackBuild $Rev: 796 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="Crypt-OpenSSL-Bignum"
+PKG_NAME="perl-crypt-openssl-bignum"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=0.04}
+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:="dev/perl/perl-crypt-openssl-bignum"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIR="$PREFIX/lib64"
+fi
+
+# Set error codes (used by createpkg)
+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_SRC" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://search.cpan.org/CPAN/authors/id/I/IR/IROBERTS/$SRC"
+
+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 sha1 sha256 sha512 rmd160; 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
+PKG_SRC=`ls -l | awk '/^d/ { print $8 }'`
+cd "$PKG_SRC"
+
+# Configure
+perl Makefile.PL || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Fix .packlist
+string="`echo $PKG | sed -e 's/\//\\\\\//g'`"
+for file in `find $PKG -name .packlist`; do
+ sed -e "s/^$string//g" $file > $file.tmp
+ mv $file.tmp $file
+done
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------|
+perl-crypt-openssl-bignum: perl-crypt-openssl-bignum
+perl-crypt-openssl-bignum:
+perl-crypt-openssl-bignum: OpenSSL's multiprecision integer arithmetic.
+perl-crypt-openssl-bignum:
+perl-crypt-openssl-bignum:
+perl-crypt-openssl-bignum:
+perl-crypt-openssl-bignum:
+perl-crypt-openssl-bignum:
+perl-crypt-openssl-bignum:
+perl-crypt-openssl-bignum:
+perl-crypt-openssl-bignum:
+EODESC
+
+# Build the package
+cd "$PKG"
+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
+ rm -rf "$PKG_WORK" "$PKG"
+fi
diff --git a/dev/perl/perl-crypt-openssl-rsa/Manifest b/dev/perl/perl-crypt-openssl-rsa/Manifest
new file mode 100644
index 00000000..6a8d915d
--- /dev/null
+++ b/dev/perl/perl-crypt-openssl-rsa/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST Crypt-OpenSSL-RSA-0.25.tar.gz 19133 MD5 fdf19c9093f47cffb851ae937d053c14 RMD160 c7df8425238fc8d62db217b68ef9441a430dbda1 SHA1 41597bfc06aa8f816d9d4e4f0dc28405ebe9c407 SHA256 7977343b5d5bb305c4cd71d3f343aa12f73e78e3185e9923579b1bd5cd45b601 SHA512 47e8b9c471cf331beb85c91006f19205cbd6a90aac2403440d4d14c5e2b88ed4a71f78f300ab79626e5644165a17fb6c9330bd29e0cf6412b75f8b94a9f5885d
+MKBUILD perl-crypt-openssl-rsa.mkbuild 2540 MD5 715398f31db31f8a33177a43c28018ce RMD160 cb28a070608515f876ede199806fa05896024d58 SHA1 a49a9729d581384cd353ea334ad2f8d9376561f7 SHA256 f7d1aa1f837c2e1b67caa18d8b14923b9336789d4101d4195e33a4b6dba7e61e SHA512 4a6f84b1e69881ca3cdd949a30626eea92c64eb21bdd4b60ff643225ac516af5752204e2c3bc6fce29eb6121263270b2d488384d7ed81ad1f1d0486b350f3b70
+SLACK-REQUIRED slack-required 107 MD5 7f03c1255a165b8ff646906eb1661d5d RMD160 9e6ab895206428bf0cb5cb91ee5a57889d52f8c4 SHA1 a27a1c09558585ecf48839c58a21f125405b2e01 SHA256 098f874ff509b31cbb1f74977119654861e47b7303ec3b6a4390a6a73e93c667 SHA512 f59403b72cd4d198d3300754e4cea02e99f6a9f298189a48c7af6f972e53293f6398627bf3ea1ab3cec3043793716295203a372376ad60a9b573b1715b7aecc2
+SLACKBUILD perl-crypt-openssl-rsa.SlackBuild 7210 MD5 528b9afb3368036a0bec6e526ebf3d98 RMD160 7334eedd2628358178eed59813c85312a9bde696 SHA1 b859bea051ec8a2ea8a31302c92d8e6c19f37dab SHA256 a852ca67f6d1974581863927ac9ab6a96b942123de1eb60e593dea4a3d5be496 SHA512 c8d7f507eea2bb31392ddb540eb754fba5435ad687d4a60d9bdf7268f4b5c477db15abfeaee4b4e11a8007daa1ddb26cd466cdbfbb61e78c83bae18a12b098be
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKWiAyAAoJEEHL93ESzgeiIFYP/1/muC3/YAAfsbMT4bztrVmk
+Wd1PRixPXB4WHewIQudN7cbfaQRn06hlqiSFY1gSbW3hFIVmZJHy5H2gMsDNuW6U
+T2ibN/rmxMbhSO/EoDHAT01/mGn/d0khGp8iQfEB2O37IiH3WMbCW9AtJ4agctAj
+jxwps2a0IGzmEspRCppU8xO9wIsYySPR8VMzYPF7Qzq9I8cv+bkgq7nJmuaIOz6m
++vzqNnRggd/0lp0EqL3YtfFsP+EBLVwCKr3f02FUaZQ+FFkXKTmLKTP3LODSynMM
+WigYV69Pf1c/3rDSuaF9KJoELIJ4N1lvoSCnDEk6bIg0UHOM3OLpsMf3E1PKJGYL
+tQhdvqnje2nXawJkIIuLMBd0mcwKOLL+eTKMASWAKDO9ssk9TjfRIqUyQuJz2s3H
+RSvLEnBTAl+eA+PJhg74tcFVySztz7K6Q7rG2BQMjRgKFhIyle5gU2kgaZPjrcWl
+EPTevh0irKx6E/eGQmflY+OGuEDNOeRMR7CfIC1JZQUvoj8PaOMPciuZmuJxLVik
+IKu4aFdY7QY7k0jJ90ZE5zeo6vTbZF6dJLdrWzDlvyS9JIQHNSJGSoTHtGukI2CV
+nyN1audr7GWZd27W6audONE2wpqi0rxc2CYHuXZzDJTrydYDZx7RiSV5GW7cVoBl
+YGTCe35ZTwGu9tmwcYpC
+=hz9l
+-----END PGP SIGNATURE-----
diff --git a/dev/perl/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.SlackBuild b/dev/perl/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.SlackBuild
new file mode 100644
index 00000000..8fcba8fe
--- /dev/null
+++ b/dev/perl/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.SlackBuild
@@ -0,0 +1,226 @@
+#!/bin/bash
+#
+# perl-crypt-openssl-rsa.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# perl-crypt-openssl-rsa.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for perl-crypt-openssl-rsa, by Silvio Rhatto
+# requires: perl-crypt-openssl-bignum
+# tested: perl-crypt-openssl-rsa-0.25
+# model: perl.mkSlackBuild $Rev: 796 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="Crypt-OpenSSL-RSA"
+PKG_NAME="perl-crypt-openssl-rsa"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=0.25}
+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:="dev/perl/perl-crypt-openssl-rsa"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIR="$PREFIX/lib64"
+fi
+
+# Set error codes (used by createpkg)
+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_SRC" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://search.cpan.org/CPAN/authors/id/I/IR/IROBERTS/$SRC"
+
+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 sha1 sha256 sha512 rmd160; 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
+PKG_SRC=`ls -l | awk '/^d/ { print $8 }'`
+cd "$PKG_SRC"
+
+# Configure
+perl Makefile.PL || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Fix .packlist
+string="`echo $PKG | sed -e 's/\//\\\\\//g'`"
+for file in `find $PKG -name .packlist`; do
+ sed -e "s/^$string//g" $file > $file.tmp
+ mv $file.tmp $file
+done
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler---------------------------------------|
+perl-crypt-openssl-rsa: perl-crypt-openssl-rsa
+perl-crypt-openssl-rsa:
+perl-crypt-openssl-rsa: RSA encoding and decoding, using the openSSL libraries.
+perl-crypt-openssl-rsa:
+perl-crypt-openssl-rsa:
+perl-crypt-openssl-rsa:
+perl-crypt-openssl-rsa:
+perl-crypt-openssl-rsa:
+perl-crypt-openssl-rsa:
+perl-crypt-openssl-rsa:
+perl-crypt-openssl-rsa:
+EODESC
+
+# Build the package
+cd "$PKG"
+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
+ rm -rf "$PKG_WORK" "$PKG"
+fi
diff --git a/dev/perl/perl-crypt-openssl-rsa/slack-required b/dev/perl/perl-crypt-openssl-rsa/slack-required
new file mode 100644
index 00000000..3ea93246
--- /dev/null
+++ b/dev/perl/perl-crypt-openssl-rsa/slack-required
@@ -0,0 +1,4 @@
+# Dependency list to Crypt-OpenSSL-RSA
+#
+# dependency [condition] [version]]
+perl-crypt-openssl-bignum
diff --git a/dev/perl/perl-digest-sha/Manifest b/dev/perl/perl-digest-sha/Manifest
new file mode 100644
index 00000000..97ee5803
--- /dev/null
+++ b/dev/perl/perl-digest-sha/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST Digest-SHA-5.47.tar.gz 39864 MD5 03ff8e4ea73a1c2c5de005d5e4160e94 RMD160 fd57e3595bd196726b0ff47ddf9d0c8d72ae637e SHA1 eaf4d3cdd4f35b6ede4d56b52e3d5b816b3e432e SHA256 9d17d884d6a77005bbac581628d9e30cb5edde72cda1dce98c6536a25b8369f6 SHA512 6ab664f085347d4397cbe832f319a0b051f34e60ef30c3999af12371a5f6b9f63651a8fff043b21c8d1087d48e7d93a620ebc527b057a5a5133bcc677ac1ed0f
+MKBUILD perl-digest-sha.mkbuild 2347 MD5 c11802d77f562a8863aa5251aee8b0dc RMD160 5a84d9a1d922a8ebfa3b4bbd6387723943bd98eb SHA1 fa9abb6ba765cd22848de26f941292ea37d71e4a SHA256 5f4dee372720238ab38ffe901117c2b797c05f71c0de842b9c8dbc7fcbb34e0e SHA512 68f1c6e947690ac9d745e7c574977eb9f8f6c541c7bc33f1c46da5fb4514904cf0ec5731342ad86c18dae2b4e7ddaa8e0c64666fd0cafd4bbbf56306f5a45251
+SLACKBUILD perl-digest-sha.SlackBuild 7030 MD5 e5b3035b3478acf786fd9bdda5abc4d6 RMD160 644f29a74637826d5597fbf07376c8f2baeb2e9c SHA1 3099304e81899b032746646096030c928021b290 SHA256 84f6b4d7af354ee40ac83bd54e7eed5ef4626a7dd46c65ca7c978b700de90e9b SHA512 48a3b2f21f2addb1c22e6d5321cdb93daa8519e956ee661d3ffdd7b70f17a44f5926945ff9384c2aec83c581e7554d3d5c3dcd7175940a210bbf67b0bc40996b
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKWiOuAAoJEEHL93ESzgeinB8QAKKGsMvlZiZQcIJazIVc1tgF
++xu4gDTs57Eoa21/TbtuQWZE8zxhvGvbpE1IOy64tzfUVbS11A3Rhg3C5hqMcZ96
+swICGkva+TM+2BQ00RwREWpk0LNaOGzV5WzdJ5EP6MdaNg9xnY4xkwSso7Wh3kpy
+/jzeklVfRMkYrtv8OLYuHSFkE9KGo667A5nofT4iBNSG0iTYODojtuX5+l5Zvwg+
+cWbYkSpbBVz+c9+xi2sYYJqCXgAj5veV6pYOTwwWGjX4RxwSqaamt3N69LG7MgY/
+noffAPxf6qK2c2IOh/PTEkyxmoQy3+m+AFH/AAZ1Z91ZQesU5qGnq5jyT6MyhurQ
+/ENTF2ucXhk0lY3lbFhLoVrqab2hV82PUzMg7nEVRfu2SGGymUh4kuZydrrgQn0p
+7fua0M3Ea+5aLtjLvzTzBDtld8UtjuLtHPVZ0fvrtGSn7Cg9O5qgc0Vny+JfQv7B
+TTzStMLA94IlBAxTVyWrcdtzRuhlKNZHspryvS2yr2wSwdbW6tgdyGNIAdZ0Rywi
+YA8uHEKjY7o+NEaBCuvG9x8SS4bi6uk0IOpqx7MxpFou8dy/TDaVB/PZtJQEZZzH
+YGYj3SkTQV7OHs95+7hp6UltdGP41qJH8166fDAJ3MHUq7Y6skirAc5FJ4d7s0nB
+aD99WjXDbECzM4z+YYcz
+=Nn3F
+-----END PGP SIGNATURE-----
diff --git a/dev/perl/perl-digest-sha/perl-digest-sha.SlackBuild b/dev/perl/perl-digest-sha/perl-digest-sha.SlackBuild
new file mode 100644
index 00000000..ef5f8c84
--- /dev/null
+++ b/dev/perl/perl-digest-sha/perl-digest-sha.SlackBuild
@@ -0,0 +1,226 @@
+#!/bin/bash
+#
+# perl-digest-sha.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# perl-digest-sha.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for perl-digest-sha, by Silvio Rhatto
+# requires:
+# tested: perl-digest-sha-5.47
+# model: perl.mkSlackBuild $Rev: 796 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="Digest-SHA"
+PKG_NAME="perl-digest-sha"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=5.47}
+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:="dev/perl/perl-digest-sha"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIR="$PREFIX/lib64"
+fi
+
+# Set error codes (used by createpkg)
+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_SRC" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://search.cpan.org/CPAN/authors/id/M/MS/MSHELOR/$SRC"
+
+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 sha1 sha256 sha512 rmd160; 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
+PKG_SRC=`ls -l | awk '/^d/ { print $8 }'`
+cd "$PKG_SRC"
+
+# Configure
+perl Makefile.PL || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Fix .packlist
+string="`echo $PKG | sed -e 's/\//\\\\\//g'`"
+for file in `find $PKG -name .packlist`; do
+ sed -e "s/^$string//g" $file > $file.tmp
+ mv $file.tmp $file
+done
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler----------------------------------------------|
+perl-digest-sha: perl-digest-sha
+perl-digest-sha:
+perl-digest-sha: Perl extension for SHA-1/224/256/384/512.
+perl-digest-sha:
+perl-digest-sha:
+perl-digest-sha:
+perl-digest-sha:
+perl-digest-sha:
+perl-digest-sha:
+perl-digest-sha:
+perl-digest-sha:
+EODESC
+
+# Build the package
+cd "$PKG"
+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
+ rm -rf "$PKG_WORK" "$PKG"
+fi
diff --git a/dev/perl/perl-digest-sha1/Manifest b/dev/perl/perl-digest-sha1/Manifest
new file mode 100644
index 00000000..c530d8ec
--- /dev/null
+++ b/dev/perl/perl-digest-sha1/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST Digest-SHA1-2.11.tar.gz 38723 MD5 2449bfe21d6589c96eebf94dae24df6b RMD160 66a446c0f7cdca43b8ec5742551b34a750a16871 SHA1 00e945eb71b6d118bc3f785cc0e469df2f032709 SHA256 3cebe0a6894daee3bfa5d9619fc90e7619cb6a77ac1b04d027341cd6033ae989 SHA512 ff4ae2e1ae752e295378b63d28690411bbf62054ade955fc031d1c824e22b40bde8cee62cd80d0638cef2b8c0e982f5eb81339c0d611f0ab138e14f4ee12ad24
+DIST Digest-SHA1-2.12.tar.gz 39073 MD5 eeb0292868801a202bd7ead87b291374 RMD160 b4cdb567ff44407c658b1ca40fffa63bf0acb33a SHA1 1c6de4ed22f4583385d88b2eca8986b1f2d3fa34 SHA256 aa13440259fd7e0a343b343b428f514791007f4a2e1b268007f9a6e5c75af5a5 SHA512 64cc2e6ed0453ea2e5ffd3d272396a723820470ad166aa54cd2fe1a9195faa3131f55093682a3516755d159ab89b47183743c4071b8d7bf57f368c65733b587b
+MKBUILD perl-digest-sha1.mkbuild 2564 MD5 e5873dde7e826a948fcca399a697c658 RMD160 e595dbcad6d7f8388dd628e87c7cc9b9228694a2 SHA1 ce0705a0096f0cf8c31c84b1299e0a98aa692ea5 SHA256 ec5b50cfaceceb775bf7ba091a9fc76abfd274f44e27e49bdb50ecf2a3d64861 SHA512 52c7c65bbcef27792f1940e07b3fcdeb610f19fe3f63cfa3bbdd2d790f587ece4a3c95bc57dfe71354a2c51c57d5840ec78a03b5c8cd97c6831a2b17b9871d8e
+SLACKBUILD perl-digest-sha1.SlackBuild 7251 MD5 f2da9b175ff74e90eb333ab54ef47828 RMD160 4cf890823c4ec9f325871a5302cc357bedd1bcda SHA1 7ee5b73984f4beb75f0dcee961089b8c6e78ed1c SHA256 efd81a78d8ff8e642faef9f4be381dcf646879ad8cec7c0236ae916cc6e60bf4 SHA512 5ea987881b6e1ae8aea9cf6d65f4f0a412a37e171aa32b11577c61a00da0e9171c6bb12cf41212fa02b0fb1e9e5115c11e7615b42db8cb53495feeac06ca2192
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKWh49AAoJEEHL93ESzgeiJNQP/Axkl0lzq8Pd763QaGqFFcyU
+2MFCTPSv2lbGcv4LlfRGD36j//WkjAzKeDV/L5hBv6vKGe/LTrwTZlq02gYsv+/1
+FhFn2CxtMW/D4V1b+kJqlXogo7ZvFf1zRB5uEXkeQuy6yPiU9zzmubQ7Kn0bcqJb
+NSCT9BmLO/NfOv6Ssoxr1+fT+FWI0ocpNKCkrgeud9O/12scoM1XqW9vY6rIGV9b
+DwS439UHvMG4t436qqm9IWmyroI0P1iRzkodR4B7gJ2JSZb9gJGlA6o73sBgTlIF
+nbgtAM8Kdc4gU5sNB4zY7wqcqogAvFoxIBiX5d7sNf3VoKvezB+s6+xmr3zXsEfC
+Stpweu1J++k2j9UpxZRkLMdXR2s4A53P9YRNpUD4At5waNpAQ2wmVSmYrG64+0KE
+SBSq/MDXJqebLHrcaoQa9BSyyv9eSCkewKm2pbsgsA0Ne2YCuTouo8CwdznnFnaY
+Gx2Q1mpq0TA6Zpti24q21UXxbvt2opsw7M9GPhTPav4p93avRGuhoro2PhVnJAVB
+jREbIqQkEutF8n+8gBnOJkh3h7FlTxKUmf9lcWdAFsF/kgR+7LogNTDa+gdJ4uZu
+hC8490AdmipRHSNwewR0Fr4mLsIgnB+avsQpHdvg34q2f+vd6GlkBbK9sARZhpqm
+uslvUResOmrpuUZwXI9R
+=ENRm
+-----END PGP SIGNATURE-----
diff --git a/dev/perl/perl-digest-sha1/perl-digest-sha1.SlackBuild b/dev/perl/perl-digest-sha1/perl-digest-sha1.SlackBuild
index e67ca940..0d6030f8 100755
--- a/dev/perl/perl-digest-sha1/perl-digest-sha1.SlackBuild
+++ b/dev/perl/perl-digest-sha1/perl-digest-sha1.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for perl-digest-sha1, by Silvio Rhatto
# requires:
-# tested: perl-digest-sha1-2.11
+# tested: perl-digest-sha1-2.12
+# model: perl.mkSlackBuild $Rev: 796 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="Digest-SHA1"
PKG_NAME="perl-digest-sha1"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=2.11}
+SRC_VERSION=${VERSION:=2.12}
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:="dev/perl/perl-digest-sha1"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=""}
@@ -64,6 +66,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_SRC" 2> /dev/null
@@ -83,6 +86,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 sha1 sha256 sha512 rmd160; 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
@@ -148,9 +217,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