aboutsummaryrefslogtreecommitdiff
path: root/development/eclipse/eclipse.SlackBuild
blob: 1b0ba66d3d32e779e5da97b7b8d3e8834f21a1e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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