From 341756a6b8a18115785b46e7172a81b02cedeb4d Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Fri, 5 Jul 2013 01:59:59 -0500 Subject: 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 --- development/nexus/nexus.SlackBuild | 65 +++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 32 deletions(-) (limited to 'development/nexus/nexus.SlackBuild') diff --git a/development/nexus/nexus.SlackBuild b/development/nexus/nexus.SlackBuild index 80379f409a..77d9eac0ba 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 -- cgit v1.2.3