aboutsummaryrefslogtreecommitdiff
path: root/dev/perl/perl-list-moreutils
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-09-26 14:57:22 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-09-26 14:57:22 +0000
commit8b337fbaa4c857a23e7114d7350c8745c6e326d9 (patch)
treec5ee5763591e40b202997656e174bd6a7158ce6f /dev/perl/perl-list-moreutils
parentffec9e6cbb766134d63b6ca55dfe0e1df1fb06ae (diff)
downloadslackbuilds-8b337fbaa4c857a23e7114d7350c8745c6e326d9.tar.gz
slackbuilds-8b337fbaa4c857a23e7114d7350c8745c6e326d9.tar.bz2
perl-class-accessor: adding perl-class-accessor and other perl modules
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2250 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev/perl/perl-list-moreutils')
-rw-r--r--dev/perl/perl-list-moreutils/Manifest23
-rw-r--r--dev/perl/perl-list-moreutils/perl-list-moreutils.SlackBuild232
2 files changed, 255 insertions, 0 deletions
diff --git a/dev/perl/perl-list-moreutils/Manifest b/dev/perl/perl-list-moreutils/Manifest
new file mode 100644
index 00000000..cff6debe
--- /dev/null
+++ b/dev/perl/perl-list-moreutils/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST List-MoreUtils-0.22.tar.gz 22570 MD5 3a6ec506f40662ab1296c48c5eb72016 RMD160 f84b40511381d1bbd1bb9422237b6548ca7511b5 SHA1 36dd11bf03459a34391d84d9dd89ac721eadd2dc SHA256 b4948b26851d9d9ac611eb487ecb92815dc3c5ee64e414bc67211b48590f62b7 SHA512 14961a73f467dd8562d235d015efd0e8c89dbf2a5938810790ee7a3bd03787f605e700970b060d64cbb5352dba92bc460e1e6959b92efe7de676dcae0f2dea8e
+MKBUILD perl-list-moreutils.mkbuild 2484 MD5 6d7f89c81727cee249fa2862689d4c9c RMD160 0457cf709c2e62aae18ffe4c774c0e3678235a83 SHA1 0e0a702ea86a39d93e17b71bdafe3a7b53348d0f SHA256 c41cc0ef9955094477b604bcabeb2df3545e2a3ee300b46792a9f72d5792fb57 SHA512 2a46b59ca7ba2892f011df9de12b10220250fd5b80066ab7aba4b86ebfc8b651cba5b64b595ecced588b4130dd80c7d12004bd48876713a77745edf4d2a93d5f
+SLACKBUILD perl-list-moreutils.SlackBuild 7261 MD5 91b305b0e6d026ba738f3e6e1640de34 RMD160 b465b11487db87f7d6e7fdee0b2d73ee9d773959 SHA1 9e809aaf5eec24d9576a06f75a0bd271b60e3c34 SHA256 cd88afb2179d1a94bb3828f4f93851c6b413b0842aa56a77d867f4f1bd36d056 SHA512 3e906def302afaa359b02579cf8ac9fff4cf16af30e8239ec358a3cf86c9c0c80b4f9a9d848ab23988389833c5343e65737a3d91c883cf93d5004c1fc329428a
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKvMpDAAoJEEHL93ESzgei4esP/1fnIfeMbJI+K/ShyMbX5mar
+cFBWjh5EXuNG86X3MAD2VZsKeuR5h92EVVw2RioKbtb6wy6Pya55/vqrxZ1zLfj6
+EHliWJqTyOYQ9pHF18Idms3Z4kcP5g0h0nWqOgU3L+UG4zqavsJ04TdNXOWmkQDr
+txotfkAWZ5jN8+v4VdBttlY4Ps1czWorEXoaSSCjFi1TEgiqia42sjGy8JSQuq8B
+l9lUilolGfQ6j36E8fuKCknYOhH7sNCs1fNg6m1NyFRfroj9RtF7aEWF1TEYB9A4
+tEhOhdi4UQoVhmHmfVQ3fK/Cvi12vJn12OJkulLAMr/YSSlKeoocLGzlaHuVbA33
+Gqu28G5Pydn6ecpwoMBFv06osMNOuKzuSlKsoH/Ek44SVR2qVLzrvajXNB2R7M5Q
+glE9bEUf7ok3A3AOjnY1K79lo06vkSuj+l5iiC0L0kFyXzkb0pL+aUwHIVIbKzC4
+J0rTDPQfcKxlzScLGTFgzqyK+Ydh7aeVrxT4hy/PspI+UOWLSLTnrLSbEFw3gIdA
+DVcRMFcsFbfV+DOc8Xv5RvLaJIjw+rxJ9vL54Xfj8+RcTbp8GkWL8JDjnyuUYSC6
+GzQgd4fKINpS9gUptmsJohzmoO4QgQ55OxyfTwj7IYAJ0FoKPb22cCEQdol1STXR
+IjHxKUUOy8YLUJ7D6gto
+=KmVQ
+-----END PGP SIGNATURE-----
diff --git a/dev/perl/perl-list-moreutils/perl-list-moreutils.SlackBuild b/dev/perl/perl-list-moreutils/perl-list-moreutils.SlackBuild
new file mode 100644
index 00000000..e6ce0948
--- /dev/null
+++ b/dev/perl/perl-list-moreutils/perl-list-moreutils.SlackBuild
@@ -0,0 +1,232 @@
+#!/bin/bash
+#
+# perl-list-moreutils.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-list-moreutils.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-list-moreutils, by Silvio Rhatto
+# requires:
+# tested: perl-list-moreutils-0.22
+# 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="List-MoreUtils"
+PKG_NAME="perl-list-moreutils"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=0.22}
+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-list-moreutils"}
+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/V/VP/VPARSEVAL/$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-list-moreutils: perl-list-moreutils
+perl-list-moreutils:
+perl-list-moreutils: Provide the stuff missing in List::Util
+perl-list-moreutils:
+perl-list-moreutils:
+perl-list-moreutils:
+perl-list-moreutils:
+perl-list-moreutils:
+perl-list-moreutils:
+perl-list-moreutils:
+perl-list-moreutils:
+EODESC
+
+# Copy slack-required
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+if [ -f "$CWD/slack-required" ]; then
+ cp $CWD/slack-required $PKG/install
+fi
+
+# 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