diff options
-rw-r--r-- | system/cfengine/README | 1 | ||||
-rw-r--r-- | system/cfengine/cfengine.SlackBuild | 37 | ||||
-rw-r--r-- | system/cfengine/cfengine.info | 8 | ||||
-rw-r--r-- | system/cfengine/doinst.sh | 13 | ||||
-rw-r--r-- | system/cfengine/slack-desc | 10 |
5 files changed, 36 insertions, 33 deletions
diff --git a/system/cfengine/README b/system/cfengine/README index 6ee27eff884c0..8656958133e6c 100644 --- a/system/cfengine/README +++ b/system/cfengine/README @@ -12,4 +12,3 @@ convergence to a stable state. Note: Even though an rc file is included, at least an update.conf is needed as well (a sample is also included in the package). - diff --git a/system/cfengine/cfengine.SlackBuild b/system/cfengine/cfengine.SlackBuild index a24dc3922e530..f88193da82576 100644 --- a/system/cfengine/cfengine.SlackBuild +++ b/system/cfengine/cfengine.SlackBuild @@ -1,17 +1,15 @@ #!/bin/sh # Slackware build script for Cfengine -# -# Written by Menno Duursma <druiloor@zonnet.nl> -# Exit on most errors -set -e +# Written by Menno Duursma <druiloor@zonnet.nl> PRGNAM=cfengine -VERSION=2.1.22 +VERSION=2.2.3 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -23,11 +21,13 @@ elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" fi +set -e # Exit on most errors + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . @@ -42,16 +42,17 @@ CXXFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --infodir=/usr/info \ --datadir=/usr/doc \ + --libdir=/usr/lib \ + --enable-shared=yes \ --with-docs -# Compile the application and install it into the $PKG directory make make install-strip DESTDIR=$PKG # Create the server directory (may not be needed) mkdir -p $PKG/var/cfengine/masterfiles -# Include an example config files +# Include example config files mkdir -p $PKG/etc/rc.d cat $CWD/rc.cfengine > $PKG/etc/rc.d/rc.cfengine.new mkdir -p $PKG/var/cfengine/inputs @@ -60,38 +61,28 @@ cat $CWD/config/cfagent.conf > $PKG/var/cfengine/inputs/cfagent.conf.new cat $CWD/config/cfservd.conf > $PKG/var/cfengine/inputs/cfservd.conf.new cat $CWD/config/cfrun.hosts > $PKG/var/cfengine/inputs/cfrun.hosts.new -# Compress man pages -( cd $PKG/usr/man +( cd $PKG/usr/man || exit 1 find . -type f -exec gzip -9 {} \; for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done ) -# Compress info pages and remove the package's dir file rm -f $PKG/usr/info/dir gzip -9 $PKG/usr/info/*.info* -( cd $PKG/usr/info - # link main-page to the ref doc - ln -s cfengine-Reference.info.gz cfengine.info.gz -) -# Move program documentation into place +# Put docs in the versioned directory mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION -( cd $PKG/usr/doc - # Fix permissions - find . -type f -exec chmod 644 {} \; -) -# Include the SlackBuild script in the documentation directory +cp -a [A-Z][A-Z]* ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo +find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; -# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Make the package; be sure to leave it in $OUTPUT cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/system/cfengine/cfengine.info b/system/cfengine/cfengine.info index 997655fbd435d..79f6598e4468a 100644 --- a/system/cfengine/cfengine.info +++ b/system/cfengine/cfengine.info @@ -1,8 +1,8 @@ PRGNAM="cfengine" -VERSION="2.1.22" +VERSION="2.2.3" HOMEPAGE="http://www.cfengine.org/" -DOWNLOAD="ftp://ftp.iu.hio.no/pub/cfengine/cfengine-2.1.22.tar.gz" -MD5SUM="5452c988225751da9ed2f1edf3426866" -MAINTAINER="Menno Duursma" +DOWNLOAD="http://www.cfengine.org/downloads/cfengine-2.2.3.tar.gz" +MD5SUM="903298e54e80fe0c617f1c51102caef1" +MAINTAINER="Menno E. Duursma" EMAIL="druiloor@zonnet.nl" APPROVED="rworkman" diff --git a/system/cfengine/doinst.sh b/system/cfengine/doinst.sh index 0518d145cbcea..5740fda749da5 100644 --- a/system/cfengine/doinst.sh +++ b/system/cfengine/doinst.sh @@ -1,19 +1,24 @@ config() { NEW="$1" - OLD="`dirname $NEW`/`basename $NEW .new`" + OLD="$(dirname $NEW)/$(basename $NEW .new)" # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD - elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy rm $NEW fi # Otherwise, we leave the .new copy for the admin to consider... } -# Add a sample rc file for the admin to consider -config etc/rc.d/rc.cfengine.new +# Keep same perms on rc.cfengine: +if [ -e etc/rc.d/rc.cfengine ]; then + cp -a etc/rc.d/rc.cfengine etc/rc.d/rc.cfengine.new.incoming + cat etc/rc.d/rc.cfengine.new > etc/rc.d/rc.cfengine.new.incoming + mv etc/rc.d/rc.cfengine.new.incoming etc/rc.d/rc.cfengine.new +fi +config etc/rc.d/rc.cfengine.new config var/cfengine/inputs/update.conf.new config var/cfengine/inputs/cfagent.conf.new config var/cfengine/inputs/cfservd.conf.new diff --git a/system/cfengine/slack-desc b/system/cfengine/slack-desc index 5276b31f34414..9885041a136a8 100644 --- a/system/cfengine/slack-desc +++ b/system/cfengine/slack-desc @@ -1,4 +1,12 @@ -cfengine: Cfengine - the system administration tool for networks. +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-----------------------------------------------------| +cfengine: Cfengine (the system administration tool for networks) cfengine: cfengine: Cfengine (configuration engine) is an autonomous agent / software cfengine: robot and a middle- to high-level policy language for building |