development/netbeans: Updated for version 6.5

This commit is contained in:
Antonio Hernández Blas 2010-05-11 22:22:40 +02:00 committed by David Somero
parent ee70ae24c2
commit 6511ba3eee
6 changed files with 97 additions and 79 deletions

View file

@ -7,20 +7,13 @@ provides developers with all the tools they need to create
professional cross-platform desktop, enterprise, web and mobile
applications.
NOTE:
You can make a localised package with this SlackBuild
(default is english). For example:
NOTES:
To use an specified locale you should execute netbeans as:
netbeans --locale $LANGOPT
where $LANGOPT can be 'ja','zh:CN' or 'pt:BR', default is english.
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 get this package in /tmp: netbeans-5.5.1_es-i586-1_SBo.tgz
If you want to make this a default option for netbeans, then add it
into the line #6(netbeans_default_options) in the file
/opt/netbeans/etc/netbeans.conf
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 serves to you for the other values it's
a good idea to send feedback about it :)
GlassFish and Apache Tomcat are not available in this package.

View file

@ -1,4 +1,26 @@
if [ -x usr/bin/update-desktop-database ]; then
usr/bin/update-desktop-database -q usr/share/applications
#!/bin/sh
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD|md5sum)" = "$(cat $NEW|md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config opt/netbeans/etc/netbeans.conf.new
config opt/netbeans/etc/netbeans.clusters.new
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications 2>/dev/null
fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi

View file

@ -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
# Copyright (c) 2008, Antonio Hernández Blas <hba.nihilismus@gmail.com>
# All rights reserved.
#
# 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 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.
# 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
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

View file

@ -1,5 +1,4 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=netbeans
Name=Netbeans
@ -7,4 +6,4 @@ GenericName=NetBeans IDE
Comment=IDE for Java
Icon=netbeans
StartupNotify=true
Categories=Qt;KDE;Development;GNOME;Application;Development;
Categories=Qt;KDE;GNOME;Development;

View file

@ -1,8 +1,8 @@
PRGNAM="netbeans"
VERSION="5.5.1"
VERSION="6.5"
HOMEPAGE="http://www.netbeans.org"
DOWNLOAD="http://dlc.sun.com/netbeans/download/5_5_1/fcs/200704122300/netbeans-5_5_1.zip"
MD5SUM="64eb5495dd4a9def5bc80ed28557eac7"
MAINTAINER="core"
EMAIL="eroc@linuxmail.org"
APPROVED="rworkman"
DOWNLOAD="http://download.netbeans.org/netbeans/sync/6.5/zip/netbeans-6.5-200811100001-ml.zip"
MD5SUM="9ae35f7e434f031bb52f41e50edd143d"
MAINTAINER="Antonio Hernández Blas"
EMAIL="hba.nihilismus@gmail.com"
APPROVED="dsomero"

View file

@ -5,7 +5,7 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
|-----handy-ruler----------------------------------------------------|
netbeans: Netbeans (Free and Open-Source IDE for Java Development and More)
netbeans:
netbeans: The NetBeans IDE is a free, Open-Source Integrated Development