summaryrefslogtreecommitdiffstats
path: root/development/cpan2tgz/cpan2tgz.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/cpan2tgz/cpan2tgz.SlackBuild')
-rw-r--r--development/cpan2tgz/cpan2tgz.SlackBuild69
1 files changed, 45 insertions, 24 deletions
diff --git a/development/cpan2tgz/cpan2tgz.SlackBuild b/development/cpan2tgz/cpan2tgz.SlackBuild
index 578b9fb889..1350a59fde 100644
--- a/development/cpan2tgz/cpan2tgz.SlackBuild
+++ b/development/cpan2tgz/cpan2tgz.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Slackware build script for cpan.tgz
+# Slackware build script for cpan2tgz
# Copyright 2006 Martin Lefebvre <dadexter@gmail.com>
# All rights reserved.
@@ -24,38 +24,59 @@
# Modifed by the SlackBuilds.org project
-# Requirements
-# CPAN (obviously)
-# Perl (duh)
-# Getopt::Long (can be installed using cpan2tgz)
-
-########################################################################
-# #
-# !!!- IMPORTANT NOTE - THIS MEANS YOU -!!! #
-# #
-# The following variables are mostly a reference. The real magic is #
-# done in buildslackpkg.diff. If you want to change something #
-# like the BUILD variable, you should do that here and in there. #
-# #
-########################################################################
-
PRGNAM=cpan2tgz
-VERSION=0.6.2
+VERSION=0.6.5
ARCH=noarch
-BUILD=1
-TAG=_SBo
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-cpan2tgz
+OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
-
-cat ${CWD}/buildslackpkg.diff | patch -p0 || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$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 Makefile.PL
+make
+make install DESTDIR=$PKG INSTALLSITEMAN1DIR=/usr/man/man1
+
+( cd $PKG
+ find . | xargs file | grep 'executable' | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep 'shared object' | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
+# Remove some unnecessary files
+find $PKG \
+ -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
+rm -rf $PKG/usr/lib
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README Changelog $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
-./buildslackpkg.sh
+cd $PKG
+/sbin/makepkg -c n -l y $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz