Add e/egg, magit «clone»

This commit is contained in:
Gwenhael Le Moine 2010-10-31 22:48:03 +07:00
parent 0c86b43d5f
commit 0858bfbfe2

78
e/egg/egg.SlackBuild Executable file
View file

@ -0,0 +1,78 @@
#!/bin/sh -x
# variables
BRANCH=master
VERSION=${VERSION:-${BRANCH}_$(date +"%Y.%m.%d_%H.%M")}
ARCH=${ARCH:-$(uname -m)}
BUILD=${BUILD:-1}
PACKAGER=cyco
TMP=/tmp/$PACKAGER
OUTPUT=/tmp
CWD=$(pwd)
PRGNAM=$(basename $CWD)
PKG=$TMP/$PACKAGER/pkg-$PRGNAM
REPOSITORY=/home/cycojesus/projets/packages/repositories/$PRGNAM
PREFIX=/usr
EMACS=$(basename $(ls /usr/bin/emacs-2*))
EMACS_VERSION=$(echo "$EMACS" | grep -o "[0-9\.]*")
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG$PREFIX/share/emacs/site-lisp
# mise en place
cd $TMP
if [ ! -e $REPOSITORY ] ; then
mkdir -p $(dirname $REPOSITORY)
cd $(dirname $REPOSITORY)
git clone http://github.com/byplayer/egg.git $PRGNAM
fi
( cd $REPOSITORY
git pull
)
cp -R $REPOSITORY $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
# correction
( cd $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
find . -name .git\* -exec rm -fr {} \;
chown -R root:root *
$EMACS -batch -f batch-byte-compile *.el
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
mv doc/ CHANGELOG.markdown README.markdown $PKG/usr/doc/$PRGNAM-$VERSION/
)
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
$PRGNAM: $PRGNAM (Emacs Got Git)
$PRGNAM:
$PRGNAM: Egg is an Emacs interface to git. It's a suite composed of a
$PRGNAM: minor-mode and various special-buffers presenting different UIs to help
$PRGNAM: the user performing many git operations.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://github.com/byplayer/egg
$PRGNAM:
EOF
# empaquetage
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz