diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2013-07-05 01:59:59 -0500 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2013-07-07 09:12:02 -0300 |
commit | 341756a6b8a18115785b46e7172a81b02cedeb4d (patch) | |
tree | 505912b07aa836c477f886b70ccd4c538e66aa73 /development/nexus | |
parent | d09870e2e2a5fa9b6f8b9f909aab54287acdd0fb (diff) |
development/nexus: Rearrange and OCDize some build lines
Functionally, this *should* be identical to the previous
version. Aesthetically, it's better, but of course, that's
just this guy's opinion, and we know how that goes... :-)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'development/nexus')
-rw-r--r-- | development/nexus/nexus.SlackBuild | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/development/nexus/nexus.SlackBuild b/development/nexus/nexus.SlackBuild index 80379f409a6c..77d9eac0bac9 100644 --- a/development/nexus/nexus.SlackBuild +++ b/development/nexus/nexus.SlackBuild @@ -79,49 +79,50 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -mkdir -p $PKG/var/{lib,log,run,tmp}/$PRGNAM -mkdir -p $PKG/etc/rc.d -mkdir -p $PKG/etc/$PRGNAM mkdir -p $PKG/usr/share/$PRGNAM/bin/jsw/lib - -mv *.txt $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mv lib $PKG/usr/share/$PRGNAM mv $PRGNAM $PKG/usr/share/$PRGNAM/ -mv conf/* $PKG/etc/$PRGNAM -mv bin/$PRGNAM $PKG/usr/share/$PRGNAM/bin -mv bin/jsw/conf/* $PKG/etc/$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 -cd $PKG/usr/share/$PRGNAM -ln -sf ../../../etc/$PRGNAM conf -ln -sf ../../../var/tmp/$PRGNAM tmp -ln -sf ../../../var/log/$PRGNAM logs -cd - -cd $PKG/usr/share/$PRGNAM/bin/jsw - ln -sf ../../../../../etc/$PRGNAM conf -cd - - -# Rename to rc.nexus -mv $PKG/usr/share/$PRGNAM/bin/$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new +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/etc/rc.d +mv 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 +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" + +mv $PKG/etc/$PRGNAM/$PRGNAM.properties{,.new} +mv $PKG/etc/$PRGNAM/wrapper.conf{,.new} + +# Fix ownership of some dirs chown -R nexus:nexus $PKG/var/{lib,log,run,tmp}/$PRGNAM +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv *.txt $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh |