diff options
author | Andreas Voegele <andreas@andreasvoegele.com> | 2012-02-21 18:09:59 -0600 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2012-03-29 10:16:26 -0500 |
commit | 7893622b2de44a5a1ef08770a9ad6967500cd4c5 (patch) | |
tree | 5ef2fb1b0327a56b0b894bb6eb9455b221b6b8ad | |
parent | 82ee7b528e011c6ebb0ad3eab52e9f127305e873 (diff) |
perl/perl-CPANPLUS-Dist-Slackware: Added (Install Perl distributions)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
4 files changed, 128 insertions, 0 deletions
diff --git a/perl/perl-CPANPLUS-Dist-Slackware/README b/perl/perl-CPANPLUS-Dist-Slackware/README new file mode 100644 index 000000000000..f3020442d3b4 --- /dev/null +++ b/perl/perl-CPANPLUS-Dist-Slackware/README @@ -0,0 +1,17 @@ +CPANPLUS::Dist::Slackware is a CPANPLUS plugin that creates Slackware +compatible packages from Perl distributions. You can either install the +created packages using the API provided by CPANPLUS, or manually via +"installpkg". + + $ cpanp + CPAN Terminal> i Some::Module --format=CPANPLUS::Dist::Slackware + + $ cpan2dist --format CPANPLUS::Dist::Slackware Some::Module + $ sudo /sbin/installpkg /tmp/perl-Some-Module-1.0-i486-1_CPANPLUS.tgz + +The fakeroot command is highly recommended. + +After installing, you can find documentation for this module with the +perldoc command. + + perldoc CPANPLUS::Dist::Slackware diff --git a/perl/perl-CPANPLUS-Dist-Slackware/perl-CPANPLUS-Dist-Slackware.SlackBuild b/perl/perl-CPANPLUS-Dist-Slackware/perl-CPANPLUS-Dist-Slackware.SlackBuild new file mode 100644 index 000000000000..931223863be8 --- /dev/null +++ b/perl/perl-CPANPLUS-Dist-Slackware/perl-CPANPLUS-Dist-Slackware.SlackBuild @@ -0,0 +1,82 @@ +#!/bin/sh + +# Slackware build script for perl-CPANPLUS-Dist-Slackware + +# Written by Andreas Voegele <andreas@andreasvoegele.com> + +PRGNAM=perl-CPANPLUS-Dist-Slackware +VERSION=${VERSION:-1.00} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +SRCNAM=${PRGNAM#perl-} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +perl Build.PL \ + installdirs=vendor \ + destdir=$PKG +./Build +./Build test +./Build install \ + --install_path bindoc=/usr/man/man1 \ + --install_path libdoc=/usr/man/man3 + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true + +find $PKG -depth -type d -empty -delete || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + Changes README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/perl/perl-CPANPLUS-Dist-Slackware/perl-CPANPLUS-Dist-Slackware.info b/perl/perl-CPANPLUS-Dist-Slackware/perl-CPANPLUS-Dist-Slackware.info new file mode 100644 index 000000000000..d0a14232b022 --- /dev/null +++ b/perl/perl-CPANPLUS-Dist-Slackware/perl-CPANPLUS-Dist-Slackware.info @@ -0,0 +1,10 @@ +PRGNAM="perl-CPANPLUS-Dist-Slackware" +VERSION="1.00" +HOMEPAGE="https://metacpan.org/release/CPANPLUS-Dist-Slackware" +DOWNLOAD="http://cpan.metacpan.org/authors/id/V/VO/VOEGELAS/CPANPLUS-Dist-Slackware-1.00.tar.gz" +MD5SUM="11cb7f26940409852261b45ba71712ae" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Andreas Voegele" +EMAIL="andreas@andreasvoegele.com" +APPROVED="Erik Hanson" diff --git a/perl/perl-CPANPLUS-Dist-Slackware/slack-desc b/perl/perl-CPANPLUS-Dist-Slackware/slack-desc new file mode 100644 index 000000000000..d2ff5167c127 --- /dev/null +++ b/perl/perl-CPANPLUS-Dist-Slackware/slack-desc @@ -0,0 +1,19 @@ +# 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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +perl-CPANPLUS-Dist-Slackware: perl-CPANPLUS-Dist-Slackware (Install Perl distributions) +perl-CPANPLUS-Dist-Slackware: +perl-CPANPLUS-Dist-Slackware: This CPANPLUS plugin creates Slackware compatible packages from Perl +perl-CPANPLUS-Dist-Slackware: distributions. +perl-CPANPLUS-Dist-Slackware: +perl-CPANPLUS-Dist-Slackware: $ cpanp +perl-CPANPLUS-Dist-Slackware: CPAN Terminal> i Some::Module --format=CPANPLUS::Dist::Slackware +perl-CPANPLUS-Dist-Slackware: +perl-CPANPLUS-Dist-Slackware: $ cpan2dist --format CPANPLUS::Dist::Slackware Some::Module +perl-CPANPLUS-Dist-Slackware: sudo /sbin/installpkg /tmp/perl-Some-Module-1.0-i486-1_CPANPLUS.tgz +perl-CPANPLUS-Dist-Slackware: |