add e/magit/
Signed-off-by: Gwenhael Le Moine <cycojesus@darkstar.example.net>
This commit is contained in:
parent
05c1ad9a18
commit
2949eb5617
1 changed files with 105 additions and 0 deletions
105
e/magit/magit.SlackBuild
Executable file
105
e/magit/magit.SlackBuild
Executable file
|
@ -0,0 +1,105 @@
|
|||
#!/bin/sh -x
|
||||
|
||||
# variables
|
||||
VERSION=git$(date +"%Y%m%d")
|
||||
BUILD=1
|
||||
PACKAGER=cyco
|
||||
|
||||
TMP=/tmp
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
PKG=$TMP/$PACKAGER/pkg-$PRGNAM
|
||||
|
||||
ARCH=x86_64
|
||||
|
||||
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
|
||||
|
||||
# mise en place
|
||||
cd $TMP
|
||||
if [ ! -e $REPOSITORY ] ; then
|
||||
mkdir -p $(dirname $REPOSITORY)
|
||||
cd $(dirname $REPOSITORY)
|
||||
git clone git://gitorious.org/magit/mainline.git $PRGNAM
|
||||
fi
|
||||
|
||||
( cd $REPOSITORY
|
||||
git pull
|
||||
)
|
||||
|
||||
cp -R $REPOSITORY $TMP/$PRGNAM-$VERSION
|
||||
( cd $TMP/$PRGNAM-$VERSION
|
||||
./autogen.sh
|
||||
./configure \
|
||||
--prefix=$PREFIX \
|
||||
--infodir=$PREFIX/info \
|
||||
--sysconfdir=/etc
|
||||
make
|
||||
|
||||
make DESTDIR=$PKG install
|
||||
)
|
||||
|
||||
# correction
|
||||
( cd $PKG
|
||||
chown -R root:root *
|
||||
|
||||
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
|
||||
|
||||
rm $PKG$PREFIX/info/dir
|
||||
[ -d $PKG/usr/info ] && find $PKG/usr/info -type f -name "*" -exec gzip -9f {} \;
|
||||
|
||||
[ -d $PKG$PREFIX/share/emacs/site-lisp ] && \
|
||||
find $PKG$PREFIX/share/emacs/site-lisp -type f -name "*.el" -exec gzip -9f {} \;
|
||||
|
||||
# magit wants to install etc/emacs/site-start.d/50magit.el which seem to be a debianism
|
||||
# and I think it sucks, so rm
|
||||
# it'll be in $PKG/usr/doc/$PRGNAM-$VERSION/ if you want it
|
||||
rm -r $PKG/etc
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
|
||||
cp 50magit.el COPYING AUTHORS ChangeLog NEWS README $PKG/usr/doc/$PRGNAM-$VERSION/
|
||||
)
|
||||
|
||||
# embaumement
|
||||
mkdir -p $PKG/install
|
||||
cat <<EOF > $PKG/install/doinst.sh
|
||||
cd /usr/info
|
||||
for file in $(ls *.gz | grep -v ".*\-[0-9]\+\.gz")
|
||||
do
|
||||
install-info \$file ./dir
|
||||
done
|
||||
EOF
|
||||
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 (A Emacs mode for Git)
|
||||
$PRGNAM: With Magit, you can inspect and modify your Git repositories with Emacs.
|
||||
$PRGNAM: You can review and commit the changes you have made to the tracked files,
|
||||
$PRGNAM: for example, and you can browse the history of past changes. There is
|
||||
$PRGNAM: support for cherry picking, reverting, merging, rebasing, and other
|
||||
$PRGNAM: common Git operations.
|
||||
$PRGNAM:
|
||||
$PRGNAM: http://zagadka.vm.bytemark.co.uk/magit/magit.html
|
||||
$PRGNAM: http://daemianmack.com/magit-cheatsheet.html
|
||||
$PRGNAM:
|
||||
$PRGNAM: http://zagadka.vm.bytemark.co.uk/magit/
|
||||
EOF
|
||||
|
||||
# empaquetage
|
||||
cd $PKG
|
||||
makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz
|
Loading…
Reference in a new issue