diff options
Diffstat (limited to 'development/eclipse/eclipse.SlackBuild')
-rw-r--r-- | development/eclipse/eclipse.SlackBuild | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/development/eclipse/eclipse.SlackBuild b/development/eclipse/eclipse.SlackBuild new file mode 100644 index 0000000000..1b0ba66d3d --- /dev/null +++ b/development/eclipse/eclipse.SlackBuild @@ -0,0 +1,66 @@ +#!/bin/sh + +# Slackware build script for eclipse +# Written by core (eroc@linuxmail.org) + +# This script is just a binary repackaging. + +set -e + +PRGNAM=eclipse +VERSION=3.3 +ARCH=i586 # Leave this alone. +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar -xzvf $CWD/$PRGNAM-SDK-$VERSION-linux-gtk.tar.gz + +# Binary directory is "eclipse" so rename it +mv $PRGNAM $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# Move the binary directory to $PKG/opt +mkdir -p $PKG/opt +mv $TMP/$PRGNAM-$VERSION $PKG/opt +( cd $PKG/opt ; ln -s $PRGNAM-$VERSION $PRGNAM ) + +# Add a script to run eclipse in /usr/bin +mkdir -p $PKG/usr/bin +cat $CWD/eclipse > $PKG/usr/bin/eclipse +chmod 0755 $PKG/usr/bin/eclipse + +# Add an icon for eclipse +mkdir -p $PKG/usr/share/pixmaps +( cd $PKG/usr/share/pixmaps ; ln -s /opt/$PRGNAM-$VERSION/icon.xpm eclipse.xpm ) + +# Add eclipse to KDE/GNOME/XFCE menu +mkdir -p $PKG/usr/share/applications +cat $CWD/eclipse.desktop > $PKG/usr/share/applications/eclipse.desktop + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cd $PKG/opt/$PRGNAM-$VERSION +cp -a epl-v10.html notice.html readme/readme_eclipse.html about.html \ + about_files $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |