slackbuilds/UNUSED/ap/ack/SlackBuild
2020-07-12 09:22:26 +02:00

64 lines
1.3 KiB
Bash
Executable file

#!/bin/sh
#NOTE: Needs File::Next (cpan -i File::Next)
# variables
TAG=gwh
TMP=/tmp/$TAG
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
VERSION=git$(date +%Y.%m.%d_%H.%M)
EXT=tar.xz
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
ARCH=$(uname -m)
BUILD=1
PREFIX=/usr
SLCKFLAGS="-fPIC -O2"
REPOSITORIES=/home/installs/SlackBuilds/repositories
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG
# mise en place
[ ! -e $CWD/ack-standalone ] && wget -c http://betterthangrep.com/ack-standalone $CWD/ack-standalone
# installation
mkdir -p $PKG$PREFIX/bin
cp $CWD/ack-standalone $PKG$PREFIX/bin/ack
# correction
cd $PKG
chown -R root:root *
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (a power search tool for programmers)
$PRGNAM:
$PRGNAM: ack is a tool like grep, designed for programmers with large trees of
$PRGNAM: heterogeneous source code.
$PRGNAM:
$PRGNAM: ack is written purely in Perl, and takes advantage of the power of
$PRGNAM: Perl's regular expressions.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://betterthangrep.com/
EOF
# empaquetage
cd $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz