NetBeans is now an Apache Foundation project, but (as of today) we lost the possibility to download a specific release (Java only, PHP, C/C++, …), the standard version available (release 9+) is only built with Java support.
I have created a very simple script that build Apache NetBeans including support for various programming languages (PHP included), getting sources from the latest tree hosted on GitHub.
Paste the following script in a file (ie: ~/build-netbeans.sh), make the file executable, change SRCDIR and DESTDIR to absolute directory paths of your choice, launch the script. If everything goes well you have a working installation of Apache NetBeans.
Remeber to install, before trying the building process, JDK or OpenJDK.
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
#!/bin/sh # where to store Apache Netbeans sources , don't add trailing / SRCDIR="/usr/src/netbeans" # where to install Apache Netbeans binaries , don't add trailing / DESTDIR="/home/user/netbeans" # set to 1 to preserve last Apache Netbeans binary installation DOBACKUP=1 ANT=$(which ant) GIT=$(which git) if [ "$ANT" = "" ]; then echo "ANT not found, install ANT 1.9+" exit 1 fi if [ "$GIT" = "" ]; then echo "GIT not found" exit 1 fi if [ ! -e $SRCDIR ]; then mkdir -p $SRCDIR 2>/dev/null >/dev/null if [ ! -e $SRCDIR ]; then echo "Unable to create $SRCDIR" exit 1 fi fi cd $SRCDIR [ ! -e incubator-netbeans ] && $GIT clone https://github.com/apache/incubator-netbeans.git [ -e buildok ] && rm buildok cd incubator-netbeans && \ git pull && \ LANG=en $ANT -Dcluster.config=full && \ touch ../buildok if [ ! -e ../buildok ]; then echo "Unable to build Apache Netbeans" exit 1 fi if [ -e $DESTDIR ]; then if [ "$DOBACKUP" = "1" ]; then BACKUPDIR=${DESTDIR}-$(date +%s) mv $DESTDIR $BACKUPDIR if [ "$?" != "0" ]; then echo "Unable to create backup in $BACKUPDIR" exit 1 fi else rm -rf $DESTDIR if [ "$?" != "0" ]; then echo "Uname to remove old installation in $DESTDIR" exit 1 fi fi mkdir $DESTDIR if [ "$?" != "0" ]; then echo "Unable to create $DESTDIR" exit 1 fi else mkdir $DESTDIR if [ "$?" != "0" ]; then echo "Unable to create $DESTDIR" exit 1 fi fi cd nbbuild/netbeans && \ cp -prf * $DESTDIR/ && \ echo "bin/netbeans" > $DESTDIR/netbeans && \ chmod +x ~/netbeans/netbeans if [ ! -x $DESTDIR/netbeans ]; then echo "Unable to finalize installation in $DESTDIR" exit 1 fi echo "Installation complete" echo "Now you can launch Netbeans using $DESTDIR/netbeans" echo "" exit 0 |