libraries/perl-Sub-Uplevel: Miscellaneous cleanups

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Robby Workman 2010-10-17 13:41:25 -05:00
parent 6e27855915
commit 2c53149c64
2 changed files with 17 additions and 24 deletions

View file

@ -1,3 +1,3 @@
perl-Sub-Uplevel provides perl modules to run a function in a higher stack frame.
perl-Sub-Uplevel is a recommended dependency for perl-Carp-Clan.
perl-Sub-Uplevel is a recommended dependency for perl-Carp-Clan.

View file

@ -24,18 +24,17 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SRCNAM=Sub-Uplevel
PRGNAM=perl-Sub-Uplevel
VERSION=0.22
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
SRCNAM=Sub-Uplevel
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@ -47,39 +46,39 @@ 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
DOCS="Changes INSTALL LICENSE README"
### clean up from previous builds
rm -fr $TMP/$SRCNAM-$VERSION $PKG
rm -rf $TMP/$SRCNAM-$VERSION $PKG
mkdir -p $TMP $PKG $OUTPUT
### Extracting the source tarballs
cd $TMP
tar xzvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $TMP/$SRCNAM-$VERSION
chown -R root.root .
find . \
\( -perm 664 -o -perm 666 -o -perm 600 -o -perm 440 -o -perm 444 -o -perm 400 \) \
-exec chmod 644 {} \;
\( -perm 664 -o -perm 666 -o -perm 600 -o -perm 440 -o -perm 444 -o -perm 400 \) \
-exec chmod 644 {} \;
find . \
\( -perm 777 -o -perm 755 -o -perm 711 -o -perm 700 -o -perm 555 -o -perm 511 -o -perm 500 \) \
-exec chmod 755 {} \;
\( -perm 777 -o -perm 755 -o -perm 711 -o -perm 700 -o -perm 555 -o -perm 511 -o -perm 500 \) \
-exec chmod 755 {} \;
CFLAGS="$SLKCFLAGS" perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor
make
make install DESTDIR=$PKG
### putting essential docs
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
@ -87,22 +86,16 @@ cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/share/man $PKG/usr
# Remove perlocal.pod and .packlist from $PKG
( cd $PKG
find . -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" | xargs rm -f
)
find $PKG -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
# Remove empty directories
find $PKG -depth -type d -empty -exec rm -rf {} \;
# find and compress man pages
if [ -d $PKG/usr/man ]; then
( 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
)
fi
find $PKG/usr/man -type f -exec gzip -9 {} \;
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}