summaryrefslogtreecommitdiff
path: root/development/cpan2tgz
diff options
context:
space:
mode:
Diffstat (limited to 'development/cpan2tgz')
-rw-r--r--development/cpan2tgz/buildslackpkg.diff45
-rw-r--r--development/cpan2tgz/cpan2tgz.SlackBuild69
-rw-r--r--development/cpan2tgz/cpan2tgz.info8
-rw-r--r--development/cpan2tgz/slack-desc19
4 files changed, 68 insertions, 73 deletions
diff --git a/development/cpan2tgz/buildslackpkg.diff b/development/cpan2tgz/buildslackpkg.diff
deleted file mode 100644
index c83effb81f..0000000000
--- a/development/cpan2tgz/buildslackpkg.diff
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -ur cpan2tgz-0.6.2-old/buildslackpkg.sh cpan2tgz-0.6.2/buildslackpkg.sh
---- cpan2tgz-0.6.2-old/buildslackpkg.sh 2007-06-18 00:11:50.000000000 -0400
-+++ cpan2tgz-0.6.2/buildslackpkg.sh 2008-04-25 19:02:51.000000000 -0400
-@@ -1,10 +1,13 @@
- #!/bin/sh
-
--DESTINATION=/tmp/$$
-+PKG=/tmp/SBo/package-cpan2tgz
-+OUTPUT=/tmp
-+DESTINATION=$PKG
- VERSION=`grep VERSION cpan2tgz | awk '{print $4}'|cut -f2 -d\'`
- PKGNAME=cpan2tgz
-+TAG=_SBo
-
--perl Makefile.PL
-+perl Makefile.PL INSTALLDIRS=vendor
- make
- chown -R root.root .
- find . -perm 777 -exec chmod 755 {} \;
-@@ -37,6 +40,7 @@
- chmod 755 ./usr/bin/*
- fi
- chmod 644 ./usr/man/man?/*
-+ gzip -9 ./usr/man/man?/*
- rmdir ./usr/share
- mkdir install
-
-@@ -51,8 +55,6 @@
- rm $PERLLOCALPOD
- fi
-
-- echo "perl" > ./install/slack-required
--
- cat >./install/slack-desc <<EOF
- # HOW TO EDIT THIS FILE:
- # The "handy ruler" below makes it easier to edit a package description. Line
-@@ -73,7 +75,7 @@
- ${PKGNAME}: http://software.jaos.org/
- ${PKGNAME}:
- EOF
-- makepkg -l y -c n /usr/src/${PKGNAME}-${VERSION}-noarch-1.tgz
-+ makepkg -l y -c n ${OUTPUT}/${PKGNAME}-${VERSION}-noarch-1$TAG.tgz
- )
-
- make distclean
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
diff --git a/development/cpan2tgz/cpan2tgz.info b/development/cpan2tgz/cpan2tgz.info
index 582587fc61..cadc249ca2 100644
--- a/development/cpan2tgz/cpan2tgz.info
+++ b/development/cpan2tgz/cpan2tgz.info
@@ -1,8 +1,8 @@
PRGNAM="cpan2tgz"
-VERSION="0.6.2"
+VERSION="0.6.5"
HOMEPAGE="http://software.jaos.org"
-DOWNLOAD="http://software.jaos.org/source/cpan2tgz/cpan2tgz-0.6.2.tar.gz"
-MD5SUM="d6cb5331abf6918c56f18e1a59cf983e"
+DOWNLOAD="http://software.jaos.org/source/cpan2tgz/cpan2tgz-0.6.5.tar.gz"
+MD5SUM="790c94cf0d3fb903649586d7ad4311e9"
MAINTAINER="David Somero"
EMAIL="dsomero@hotmail.com"
-APPROVED="rworkman,Alan_Hicks"
+APPROVED="rworkman"
diff --git a/development/cpan2tgz/slack-desc b/development/cpan2tgz/slack-desc
new file mode 100644
index 0000000000..a719721f37
--- /dev/null
+++ b/development/cpan2tgz/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+cpan2tgz: cpan2tgz (create Slackware packages from CPAN Perl modules)
+cpan2tgz:
+cpan2tgz: cpan2tgz is a utility used to create Slackware packages from
+cpan2tgz: CPAN perl modules.
+cpan2tgz:
+cpan2tgz: cpan2tgz was written by Jason Woodward <woodwardj at jaos dot org>
+cpan2tgz:
+cpan2tgz: http://software.jaos.org/
+cpan2tgz:
+cpan2tgz:
+cpan2tgz: