#!/bin/sh # variables TAG=cyco TMP=/tmp/$TAG CWD=$(pwd) OUTPUT=/tmp PRGNAM=$(basename $CWD) PKG=$TMP/pkg-$PRGNAM DOCS="ChangeLog README.md" ARCH=$(uname -m) BUILD=1 PREFIX=/usr REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM # nettoyage préalable rm -fr $PKG $TMP/$PRGNAM mkdir -p $PKG # mise en place [ ! -e $REPOSITORY ] && git clone https://github.com/jeffkaufman/icdiff $REPOSITORY ( cd $REPOSITORY && git pull ) VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )" cp -R $REPOSITORY $TMP/$PRGNAM cd $TMP/$PRGNAM # installation mkdir -p $PKG$PREFIX/bin/ cp icdiff git-icdiff $PKG$PREFIX/bin/ mkdir -p $PKG/usr/doc/$PRGNAM cp -R $DOCS $PKG/usr/doc/$PRGNAM # correction cd $PKG chown -R root:root * # embaumement mkdir -p $PKG/install cat < $PKG/install/slack-desc $PRGNAM: $PRGNAM (improved color diff) $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: http://www.jefftk.com/icdiff $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