summaryrefslogtreecommitdiff
path: root/development/netbeans/netbeans.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/netbeans/netbeans.SlackBuild')
-rw-r--r--development/netbeans/netbeans.SlackBuild106
1 files changed, 55 insertions, 51 deletions
diff --git a/development/netbeans/netbeans.SlackBuild b/development/netbeans/netbeans.SlackBuild
index d2d3222a51..798b812655 100644
--- a/development/netbeans/netbeans.SlackBuild
+++ b/development/netbeans/netbeans.SlackBuild
@@ -1,86 +1,90 @@
#!/bin/sh
-# Slackware build script for netbeans
-# Written by core (eroc@linuxmail.org)
-# Modified by Robby Workman
+# Slackware build script for netbeans
-# 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
+# Copyright (c) 2008, Antonio Hernández Blas <hba.nihilismus@gmail.com>
+# All rights reserved.
#
-# Other values for NBLANG could be: ja, pt_BR, zh_CN, de and zh_TW
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1.- Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
#
-# 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 :)
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-set -e
+# This script is just a binary repackaging.
PRGNAM=netbeans
-VERSION=5.5.1
-VERSIONALT='5_5_1'
-ARCH=i586 # Leave this alone
+VERSION=6.5
+DATE="200811100001"
+ARCH=i586 # Leave this alone
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+set -e
+
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
+mkdir -p $TMP $PKG/opt $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
+rm -rf $PRGNAM
+unzip -o $CWD/$PRGNAM-$VERSION-$DATE-ml.zip
+cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
-mkdir $PKG/opt
-cp -R $TMP/$PRGNAM-$VERSION $PKG/opt
+# Move the netbeans directory to $PKG/opt
+cd $TMP
+mv $PRGNAM $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 "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
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
+install -D -m 0644 $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
+install -D -m 0644 $PKG/opt/$PRGNAM/nb6.5/$PRGNAM.png \
+ $PKG/usr/share/pixmaps/$PRGNAM.png
-# Add a script to call netbeans from usr/bin.
+# Add a script to call netbeans from /usr/bin.
mkdir -p $PKG/usr/bin
-cat <<- EOF > $PKG/usr/bin/$PRGNAM
+cat <<- EOF > $PKG/usr/bin/netbeans
#!/bin/sh
-cd /opt/$PRGNAM-$VERSION/bin
-./$PRGNAM $NBLANGLOC
+cd /opt/netbeans/bin
+./netbeans "\$@"
EOF
-chmod 0755 $PKG/usr/bin/$PRGNAM
+chmod 0755 $PKG/usr/bin/netbeans
+
+# Don't clobber any existing config file
+mv $PKG/opt/$PRGNAM/etc/netbeans.conf \
+ $PKG/opt/$PRGNAM/etc/netbeans.conf.new
+mv $PKG/opt/$PRGNAM/etc/netbeans.clusters \
+ $PKG/opt/$PRGNAM/etc/netbeans.clusters.new
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
+cd $PKG/opt/$PRGNAM
+cp -a *.html *.txt *.css $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -88,4 +92,4 @@ 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
+/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz