slackbuilds/e/UNUSED/ropemacs/ropemacs.SlackBuild
Gwenhael Le Moine e1af471a86 Pymacs is being neughty
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-12-13 09:40:43 +01:00

71 lines
1.5 KiB
Bash
Executable file

#!/bin/sh -x
# variables
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=0.6
ARCH=$(uname -m)
BUILD=1
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
DOCS="COPYING MANIFEST.in PKG-INFO README.txt"
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG
# mise en place
( cd $TMP
[ ! -e $CWD/$PRGNAM-$VERSION.tar.?z* ] && \
wget -c http://downloads.sourceforge.net/project/rope/$PRGNAM/$VERSION/$PRGNAM-$VERSION.tar.gz?use_mirror=jaist \
-O $CWD/$PRGNAM-$VERSION.tar.gz
tar xf $CWD/$PRGNAM-$VERSION.tar.?z*
)
( cd $TMP/$PRGNAM-$VERSION
# installation
python setup.py install --root=$PKG
)
# correction
chown -R root:root $PKG/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
( cd $TMP/$PRGNAM-$VERSION
cp -R $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
)
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
# Strip binaries
find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (a python refactoring library...)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://rope.sourceforge.net/
$PRGNAM:
EOF
# empaquetage
( cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr -d -)-$ARCH-$BUILD$TAG.txz
)