slackbuilds/l/elpy/elpy.SlackBuild
2016-09-18 22:28:40 +02:00

50 lines
1.4 KiB
Text
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +%F | tr - .)
BUILD=1
ARCH=python
HOME=/home/cycojesus
TAG=cyco
OUTPUT=/tmp
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
PREFIX=/usr
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $TMP
# mise en place
[ ! -e $REPOSITORY ] && git clone https://github.com/jorgenschaefer/elpy.git $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
python setup.py install --root $PKG
VERSION=$(ls /usr/lib$(uname -m | grep -o 64)/python*/site-packages/| grep "$PRGNAM-.*-py.*\.egg-info" | grep -o "[0-9.]*" | head -n1)_$VERSION
mkdir -p $PKG/install
cat <<EOF > $PKG/install
|-----handy-ruler------------------------------------------------------|
$PRGNAM: $PRGNAM (Emacs Python Development Environment)
$PRGNAM:
$PRGNAM: Elpy is an Emacs package to bring powerful Python editing to Emacs.
$PRGNAM: It combines a number of other packages, both written in Emacs Lisp as
$PRGNAM: well as Python.
$PRGNAM:
$PRGNAM: Install elpy in Emacs as well through Marmalade as described on the
$PRGNAM: homepage.
$PRGNAM: https://github.com/jorgenschaefer/elpy/wiki
$PRGNAM:
$PRGNAM: https://github.com/jorgenschaefer/elpy
EOF
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$TAG.txz