diff options
Diffstat (limited to 'development/nexus/nexus.SlackBuild')
-rw-r--r-- | development/nexus/nexus.SlackBuild | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/development/nexus/nexus.SlackBuild b/development/nexus/nexus.SlackBuild index e49a3c17aa1ca..44687b4b1bf6b 100644 --- a/development/nexus/nexus.SlackBuild +++ b/development/nexus/nexus.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for Sonatype Nexus -# Copyright 2012 Giorgio Peron Campodarsego, PD, Italy giorgio.peron@gmail.com +# Copyright 2013 Giorgio Peron Campodarsego, PD, Italy giorgio.peron@gmail.com # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=nexus -VERSION=${VERSION:-2.0} +VERSION=${VERSION:-2.5.0-04} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -101,23 +101,24 @@ ln -sf ../../../var/tmp/$PRGNAM tmp ln -sf ../../../var/log/$PRGNAM logs cd - cd $PKG/usr/share/$PRGNAM/bin/jsw - ln -sf ../../../../../etc/nexus conf + ln -sf ../../../../../etc/$PRGNAM conf cd - -#Put startup script in place and set correct location -cat $CWD/files/rc.$PRGNAM | \ - sed -e "s/@NEXUS_ARCH@/$NEXUS_ARCH/g" \ - -e "s/@LIBDIRSUFFIX@/$LIBDIRSUFFIX/g" \ - > $PKG/etc/rc.d/rc.$PRGNAM.new - -#Replace two configuration files -rm $PKG/etc/nexus/nexus.properties -cat $CWD/files/nexus.properties > $PKG/etc/nexus/nexus.properties.new -rm $PKG/etc/nexus/wrapper.conf -cat $CWD/files/wrapper.conf > $PKG/etc/nexus/wrapper.conf.new +# Rename to rc.nexus +mv $PKG/usr/share/$PRGNAM/bin/$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new +# Fix configuration files +sed -i "s:NEXUS_HOME=\"..\":NEXUS_HOME=\"/usr/share/$PRGNAM\":g" $PKG/etc/rc.d/rc.$PRGNAM.new +sed -i "s:#RUN_AS_USER=:RUN_AS_USER=nexus:g" $PKG/etc/rc.d/rc.$PRGNAM.new +sed -i "s:#PIDDIR=\".\":PIDDIR=\"/var/run/$PRGNAM\":g" $PKG/etc/rc.d/rc.$PRGNAM.new +sed -i "s:DIST_ARCH=\`uname -p:DIST_ARCH=\`uname -m:g" $PKG/etc/rc.d/rc.$PRGNAM.new +sed -i "s:nexus-work=\${bundleBasedir}/../sonatype-work/nexus:nexus-work=/var/lib/$PRGNAM:g" $PKG/etc/$PRGNAM/$PRGNAM.properties +sed -i "s:wrapper.working.dir=../../..:wrapper.working.dir=/usr/share/$PRGNAM:g" $PKG/etc/$PRGNAM/wrapper.conf +sed -i "s:wrapper.java.command=java:wrapper.java.command=/usr/lib$LIBDIRSUFFIX/java/bin/java:g" $PKG/etc/$PRGNAM/wrapper.conf +mv $PKG/etc/$PRGNAM/$PRGNAM.properties $PKG/etc/$PRGNAM/$PRGNAM.properties.new +mv $PKG/etc/$PRGNAM/wrapper.conf $PKG/etc/$PRGNAM/wrapper.conf.new #Fix ownership of some dirs -chown -R nexus:nexus $PKG/var/{lib,log,run,tmp}/nexus +chown -R nexus:nexus $PKG/var/{lib,log,run,tmp}/$PRGNAM mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |