aboutsummaryrefslogtreecommitdiff
path: root/dev/perl/perl-crypt-openssl-rsa
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/perl/perl-crypt-openssl-rsa
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/perl/perl-crypt-openssl-rsa')
-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
3 files changed, 254 insertions, 0 deletions
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