#!/bin/bash # Slackware Package Build Script for perl modules: Crypt::OpenSSL::Guess # Copyright (c) 2020 Matteo Bernardini $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild # Remove perlocal.pod and .packlist from $PKG ( cd $PKG find . -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" | xargs rm -f ) # Remove empty directories find $PKG -depth -type d -empty -exec rm -rf {} \; ### strip binaries find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true ( 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 ) 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}