diff options
Diffstat (limited to 'development/nexus/nexus.SlackBuild')
-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 80379f409a6c2..77d9eac0bac98 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 |