summaryrefslogtreecommitdiff
path: root/development/nexus/nexus.SlackBuild
diff options
context:
space:
mode:
authorGiorgio Peron <giorgio.peron@gmail.com>2016-07-28 06:53:22 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-07-30 06:04:10 +0700
commit30dc0f4782d744d2861e7be7ff81511461d4c7e7 (patch)
treee1129f6ec7c9b18f73c18f310d383432491ef0f2 /development/nexus/nexus.SlackBuild
parentd447c46e3fc42e5180bd90d7cead93cf1f4b596e (diff)
downloadslackbuilds-30dc0f4782d744d2861e7be7ff81511461d4c7e7.tar.gz
development/nexus: Updated for version 3.0.1_01.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/nexus/nexus.SlackBuild')
-rw-r--r--development/nexus/nexus.SlackBuild90
1 files changed, 29 insertions, 61 deletions
diff --git a/development/nexus/nexus.SlackBuild b/development/nexus/nexus.SlackBuild
index fae62f8aaa..7caa7b2256 100644
--- a/development/nexus/nexus.SlackBuild
+++ b/development/nexus/nexus.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for Sonatype Nexus
+# Slackware build script for Sonatype Nexus Repository OSS
-# Copyright 2014 Giorgio Peron Campodarsego, PD, Italy giorgio.peron@gmail.com
+# Copyright 2016 Giorgio Peron <giorgio.peron@gmail.com>, Belluno, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,39 +23,17 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=nexus
-VERSION=${VERSION:-2.11.1_01}
+VERSION=${VERSION:-3.0.1_01}
+ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-
SRCVERSION=$(echo $VERSION | tr _ -)
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- NEXUS_ARCH="linux-x86-32"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- NEXUS_ARCH="linux-x86-32"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- NEXUS_ARCH="linux-x86-64"
- LIBDIRSUFFIX="64"
-else
- echo "ARCH $ARCH not supported"
- exit 1
-fi
-
set -e
# Check if the 'nexus' user & group exist:
@@ -70,7 +48,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$SRCVERSION
-tar xvf $CWD/$PRGNAM-$SRCVERSION-bundle.tar.gz
+tar xvf $CWD/$PRGNAM-$SRCVERSION-unix.tar.gz
cd $PRGNAM-$SRCVERSION
chown -R root:root .
find -L . \
@@ -79,48 +57,38 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-mkdir -p $PKG/usr/share/$PRGNAM/bin/jsw/lib
-mv lib $PKG/usr/share/$PRGNAM
-mv $PRGNAM $PKG/usr/share/$PRGNAM/
-mv bin/jsw/license $PKG/usr/share/$PRGNAM/bin/jsw
-mv bin/jsw/lib/*.jar $PKG/usr/share/$PRGNAM/bin/jsw/lib
-mv bin/jsw/lib/libwrapper-$NEXUS_ARCH.so $PKG/usr/share/$PRGNAM/bin/jsw/lib
-mv bin/jsw/$NEXUS_ARCH $PKG/usr/share/$PRGNAM/bin/jsw
-
-mkdir -p $PKG/etc/$PRGNAM
-mv conf/* $PKG/etc/$PRGNAM
-mv bin/jsw/conf/* $PKG/etc/$PRGNAM
-
-mkdir -p $PKG/var/{lib,log,run,tmp}/$PRGNAM
-ln -sf /etc/$PRGNAM $PKG/usr/share/$PRGNAM/conf
-ln -sf /etc/$PRGNAM $PKG/usr/share/$PRGNAM/bin/jsw/conf
-ln -sf /var/tmp/$PRGNAM $PKG/usr/share/$PRGNAM/tmp
-ln -sf /var/log/$PRGNAM $PKG/usr/share/$PRGNAM/logs
-
+mkdir -p $PKG/usr/share/$PRGNAM
mkdir -p $PKG/etc/rc.d
-mv bin/$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
+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
+cd $PKG/usr/share/$PRGNAM
+ln -sf ../../../var/lib/$PRGNAM data
+cd data
+ln -sf /../../../var/log/$PRGNAM log
+ln -sf /../../../var/tmp/$PRGNAM tmp
# Fix configuration files
-sed -i $PKG/etc/rc.d/rc.$PRGNAM.new \
- -e "s:NEXUS_HOME=\"..\":NEXUS_HOME=\"/usr/share/$PRGNAM\":g" \
- -e "s:#RUN_AS_USER=:RUN_AS_USER=nexus:g" \
- -e "s:#PIDDIR=\".\":PIDDIR=\"/var/run/$PRGNAM\":g" \
- -e "s:DIST_ARCH=\`uname -p:DIST_ARCH=\`uname -m:g"
-sed -i \
- "s:nexus-work=\${bundleBasedir}/../sonatype-work/nexus:nexus-work=/var/lib/$PRGNAM:g" \
- $PKG/etc/$PRGNAM/$PRGNAM.properties
-sed -i $PKG/etc/$PRGNAM/wrapper.conf \
- -e "s:wrapper.working.dir=../../..:wrapper.working.dir=/usr/share/$PRGNAM:g" \
- -e "s:wrapper.java.command=java:wrapper.java.command=/usr/lib$LIBDIRSUFFIX/java/bin/java:g"
+sed -i $PKG/usr/share/$PRGNAM/bin/$PRGNAM.rc \
+ -e "s:#run_as_user=\"\":run_as_user=\"nexus\":g"
-mv $PKG/etc/$PRGNAM/$PRGNAM.properties{,.new}
-mv $PKG/etc/$PRGNAM/wrapper.conf{,.new}
+cd $PKG/etc/rc.d
+ln -sf ../../usr/share/$PRGNAM/bin/$PRGNAM rc.$PRGNAM
+cd $PKG
# Fix ownership of some dirs
-chown -R nexus:nexus $PKG/var/{lib,log,run,tmp}/$PRGNAM
+chown -R nexus:nexus $PKG/var/{lib,log,tmp}/$PRGNAM
+chown -R nexus:nexus $PKG/usr/share/$PRGNAM/etc
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-mv *.txt $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/$PRGNAM/*.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install