slackbuilds/ap/regdel/SlackBuild
Gwenhael Le Moine 60a50402f9
typo
2018-04-22 11:34:46 +02:00

61 lines
1.3 KiB
Bash
Executable file

#!/bin/sh
# variables
TAG=cyco
TMP=/tmp/$TAG
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
VERSION=$(date +%Y.%m.%d_%H.%M)
DOCS="LICENSE README.rst AUTHORS.rst"
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$PREFIX/{bin,doc/$PRGNAM}
# mise en place
cd $TMP
[ ! -e $REPOSITORIES/$PRGNAM ] && git clone https://github.com/guillaumechereau/regdel.git $REPOSITORIES/$PRGNAM
( cd $REPOSITORIES/$PRGNAM && git pull )
VERSION="$( cd $REPOSITORIES/$PRGNAM && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
cp -R $REPOSITORIES/$PRGNAM/* $PKG$PREFIX/doc/$PRGNAM
mv $PKG$PREFIX/doc/$PRGNAM/$PRGNAM $PKG$PREFIX/bin/
# correction
cd $PKG
chown -R root:root *
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (Ncurses based interface to ledger)
$PRGNAM:
$PRGNAM: regdel is to ledger what tig is to git.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://github.com/guillaumechereau/regdel
$PRGNAM:
EOF
# empaquetage
cd $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz