diff options
author | core <eroc@linuxmail.org> | 2010-05-11 20:00:27 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 20:00:27 +0200 |
commit | 1ffcd1f797bbc2a5feaece3f25b99901459a871f (patch) | |
tree | 6e50ccf625ac46d86c7e5dd983274103b56592d5 /development/netbeans/netbeans.SlackBuild | |
parent | 59574d7b80cd51b63065b13b2f25ddcc7b2b2e82 (diff) | |
download | slackbuilds-1ffcd1f797bbc2a5feaece3f25b99901459a871f.tar.gz |
development/netbeans: Added to 12.0 repository
Diffstat (limited to 'development/netbeans/netbeans.SlackBuild')
-rw-r--r-- | development/netbeans/netbeans.SlackBuild | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/development/netbeans/netbeans.SlackBuild b/development/netbeans/netbeans.SlackBuild new file mode 100644 index 0000000000..d2d3222a51 --- /dev/null +++ b/development/netbeans/netbeans.SlackBuild @@ -0,0 +1,91 @@ +#!/bin/sh + +# Slackware build script for netbeans +# Written by core (eroc@linuxmail.org) +# Modified by Robby Workman + +# This script is just a binary repackaging. +# You can make a localised package with this SlackBuild +# (default is english). For example: +# +# To get netbeans in Spanish - Espaņol (es) : +# 1).- Go to: http://www.netbeans.info/downloads/all.php?b_id=3095 +# 2).- Under "Archive Distributions", download the package: +# netbeans-5_5_1-es.zip +# 3).- Execute the slackbuild as: +# NBLANG=es ./netbeans.SlackBuild +# to finally get in /tmp: netbeans-5.5.1_es-i586-1_SBo.tgz +# +# Other values for NBLANG could be: ja, pt_BR, zh_CN, de and zh_TW +# +# This SlackBuild was tested with "es" and "pt_BR" and with default +# language (English) so if it works for you with the other values, +# it's a good idea to send feedback about it :) + +set -e + +PRGNAM=netbeans +VERSION=5.5.1 +VERSIONALT='5_5_1' +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 + +# If NBLANG has a value: +if [ ! -z $NBLANG ]; then + NBLANGSRC="-$NBLANG" # For the sourcecode + NBLANGPKG="_$NBLANG" # For the final package + NBLANGLOC=$(echo "--locale $NBLANG" | sed 's/_/:/') # To netbeans's locale. +fi + +unzip $CWD/$PRGNAM-$VERSIONALT${NBLANGSRC}.zip || exit 1 +mv $PRGNAM $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +mkdir $PKG/opt +cp -R $TMP/$PRGNAM-$VERSION $PKG/opt + +( 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 +) + +# Add netbeans to KDE/GNOME/XFCE menu +mkdir -p $PKG/usr/share/applications +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + +# Add an icon for netbeans +mkdir -p $PKG/usr/share/pixmaps +cp $TMP/$PRGNAM-$VERSION/nb5.5/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +# Add a script to call netbeans from usr/bin. +mkdir -p $PKG/usr/bin +cat <<- EOF > $PKG/usr/bin/$PRGNAM +#!/bin/sh +cd /opt/$PRGNAM-$VERSION/bin +./$PRGNAM $NBLANGLOC +EOF +chmod 0755 $PKG/usr/bin/$PRGNAM + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a build_info CREDITS* DISTRIBUTION.txt LICENSE.txt \ + netbeans.css README* THIRDPARTYLICENSE.txt $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$NBLANGPKG-$ARCH-$BUILD$TAG.tgz |