slackbuilds/ap/ack/ack.SlackBuild

64 lines
1.2 KiB
Text
Raw Normal View History

#!/bin/sh -x
#NOTE: Needs File::Next (cpan -i File::Next)
# variables
TAG=cyco
TMP=/tmp/$TAG
CWD=$(pwd)
2010-11-23 08:17:59 +01:00
OUTPUT=/tmp
2010-11-23 08:09:08 +01:00
PRGNAM=$(basename $CWD)
2010-11-16 11:11:51 +01:00
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)
2010-11-16 11:11:51 +01:00
BUILD=1
PREFIX=/usr
SLCKFLAGS="-fPIC -O2"
2011-07-22 08:41:46 +02:00
REPOSITORIES=/home/installs/SlackBuilds/repositories
# nettoyage pr<70>alable
2010-11-16 11:11:51 +01:00
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
2011-09-20 09:54:58 +02:00
# correction
cd $PKG
chown -R root:root *
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
2010-11-16 11:11:51 +01:00
$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:
2010-11-16 11:11:51 +01:00
$PRGNAM:
$PRGNAM: http://betterthangrep.com/
EOF
# empaquetage
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz