2017-03-01 11:56:49 +01:00
|
|
|
|
#!/bin/sh
|
2009-11-12 23:23:06 +07:00
|
|
|
|
|
2009-12-21 14:19:03 +07:00
|
|
|
|
#NOTE: Needs File::Next (cpan -i File::Next)
|
|
|
|
|
|
2009-11-12 23:23:06 +07:00
|
|
|
|
# variables
|
2011-02-17 11:54:04 +07:00
|
|
|
|
|
2020-06-25 11:23:11 +02:00
|
|
|
|
TAG=gwh
|
2011-02-17 11:54:04 +07:00
|
|
|
|
TMP=/tmp/$TAG
|
2009-11-12 23:23:06 +07:00
|
|
|
|
CWD=$(pwd)
|
2010-11-23 14:17:59 +07:00
|
|
|
|
OUTPUT=/tmp
|
2009-11-12 23:23:06 +07:00
|
|
|
|
|
2010-11-23 14:09:08 +07:00
|
|
|
|
PRGNAM=$(basename $CWD)
|
2010-11-16 17:11:51 +07:00
|
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
2009-11-12 23:23:06 +07:00
|
|
|
|
|
2010-11-18 17:29:11 +07:00
|
|
|
|
VERSION=git$(date +%Y.%m.%d_%H.%M)
|
2009-11-12 23:23:06 +07:00
|
|
|
|
|
|
|
|
|
EXT=tar.xz
|
|
|
|
|
|
|
|
|
|
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
|
|
|
|
|
|
|
|
|
|
ARCH=$(uname -m)
|
2010-11-16 17:11:51 +07:00
|
|
|
|
BUILD=1
|
2009-11-12 23:23:06 +07:00
|
|
|
|
|
|
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
|
|
SLCKFLAGS="-fPIC -O2"
|
|
|
|
|
|
2011-07-22 08:41:46 +02:00
|
|
|
|
REPOSITORIES=/home/installs/SlackBuilds/repositories
|
2009-11-12 23:23:06 +07:00
|
|
|
|
# nettoyage pr<70>alable
|
2010-11-16 17:11:51 +07:00
|
|
|
|
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
2009-11-12 23:23:06 +07:00
|
|
|
|
|
|
|
|
|
mkdir -p $PKG
|
|
|
|
|
|
|
|
|
|
# mise en place
|
2012-12-12 13:52:56 +01:00
|
|
|
|
[ ! -e $CWD/ack-standalone ] && wget -c http://betterthangrep.com/ack-standalone $CWD/ack-standalone
|
2009-11-12 23:23:06 +07:00
|
|
|
|
|
|
|
|
|
# installation
|
2012-12-12 13:52:56 +01:00
|
|
|
|
mkdir -p $PKG$PREFIX/bin
|
|
|
|
|
cp $CWD/ack-standalone $PKG$PREFIX/bin/ack
|
2011-09-20 09:54:58 +02:00
|
|
|
|
|
2009-11-12 23:23:06 +07:00
|
|
|
|
# correction
|
|
|
|
|
cd $PKG
|
|
|
|
|
chown -R root:root *
|
|
|
|
|
|
|
|
|
|
# embaumement
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
2010-11-16 17:11:51 +07: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:
|
2012-12-12 13:52:56 +01:00
|
|
|
|
$PRGNAM:
|
2010-11-16 17:11:51 +07:00
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM: http://betterthangrep.com/
|
2009-11-12 23:23:06 +07:00
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
# empaquetage
|
|
|
|
|
cd $PKG
|
2018-04-20 23:02:35 +02:00
|
|
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
2020-07-12 09:22:26 +02:00
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz
|