#!/bin/sh # variables TAG=gwh 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 < $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 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz