summaryrefslogtreecommitdiff
path: root/development/nexus/nexus.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/nexus/nexus.SlackBuild')
-rw-r--r--development/nexus/nexus.SlackBuild33
1 files changed, 26 insertions, 7 deletions
diff --git a/development/nexus/nexus.SlackBuild b/development/nexus/nexus.SlackBuild
index 7caa7b2256..77d8672a38 100644
--- a/development/nexus/nexus.SlackBuild
+++ b/development/nexus/nexus.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for Sonatype Nexus Repository OSS
-# Copyright 2016 Giorgio Peron <giorgio.peron@gmail.com>, Belluno, Italy
+# Copyright 2017 Giorgio Peron <giorgio.peron@gmail.com>, Belluno, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,17 +23,34 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=nexus
-VERSION=${VERSION:-3.0.1_01}
-ARCH=noarch
+VERSION=${VERSION:-3.5.0_02}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
SRCVERSION=$(echo $VERSION | tr _ -)
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i586" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
set -e
# Check if the 'nexus' user & group exist:
@@ -60,12 +77,8 @@ find -L . \
mkdir -p $PKG/usr/share/$PRGNAM
mkdir -p $PKG/etc/rc.d
mkdir -p $PKG/var/{lib,log,tmp}/$PRGNAM
-mv data/tmp/.placeholder $PKG/var/tmp/$PRGNAM/
-rm -rf data/tmp
-mv data/* $PKG/var/lib/$PRGNAM/
mv * $PKG/usr/share/$PRGNAM
mv .install4j $PKG/usr/share/$PRGNAM
-rm -rf $PKG/usr/share/$PRGNAM/data
cd $PKG/etc
ln -sf ../usr/share/$PRGNAM/etc $PRGNAM
@@ -78,6 +91,12 @@ ln -sf /../../../var/tmp/$PRGNAM tmp
# Fix configuration files
sed -i $PKG/usr/share/$PRGNAM/bin/$PRGNAM.rc \
-e "s:#run_as_user=\"\":run_as_user=\"nexus\":g"
+sed -i $PKG/usr/share/$PRGNAM/bin/$PRGNAM \
+ -e "s:# INSTALL4J_JAVA_HOME_OVERRIDE=:INSTALL4J_JAVA_HOME_OVERRIDE=\"/usr/lib${LIBDIRSUFFIX}/java\":g"
+sed -i $PKG/usr/share/$PRGNAM/bin/$PRGNAM.vmoptions \
+-e "s\-XX:LogFile=../sonatype-work/nexus3/log/jvm.log\-XX:LogFile=/var/lib/nexus/log/jvm.log\g" \
+-e "s:-Dkaraf.data=../sonatype-work/nexus3:-Dkaraf.data=/var/lib/nexus:g" \
+-e "s:-Djava.io.tmpdir=../sonatype-work/nexus3/tmp:-Djava.io.tmpdir=/var/lib/nexus/tmp:g"
cd $PKG/etc/rc.d
ln -sf ../../usr/share/$PRGNAM/bin/$PRGNAM rc.$PRGNAM