From 983c29d352e1644083b2ed03d94407153b0929c9 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 9 Jan 2008 20:37:22 +0000 Subject: Fixed installation location of the binary... --- foremost/build/foremost.SlackBuild | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'foremost') diff --git a/foremost/build/foremost.SlackBuild b/foremost/build/foremost.SlackBuild index fd7ba6b3..0acda6fe 100755 --- a/foremost/build/foremost.SlackBuild +++ b/foremost/build/foremost.SlackBuild @@ -155,22 +155,48 @@ cd ${PRGNAM}-${VERSION} echo Building ... export LDFLAGS="$SLKLDFLAGS" export CFLAGS="$SLKCFLAGS" -make BIN=/usr MAN=/usr/man/man1 CONF=/etc 2>&1 | tee $OUTPUT/make-${PRGNAM}.log +make BIN=/usr/bin MAN=/usr/man/man1 CONF=/etc 2>&1 | tee $OUTPUT/make-${PRGNAM}.log # Create destination directories: -mkdir -p $PKG/usr/man/man1 $PKG/etc +mkdir -p $PKG/usr/bin $PKG/usr/man/man1 $PKG/etc # Install all the needed stuff to the package dir # Use installwatch if available, to produce a logfile of the installation # process that is more easily readable: if $(which installwatch > /dev/null 2>&1); then installwatch -o $OUTPUT/install-${PRGNAM}.log \ - make BIN=$PKG/usr MAN=$PKG/usr/man/man1 CONF=$PKG/etc install + make BIN=$PKG/usr/bin MAN=$PKG/usr/man/man1 CONF=$PKG/etc install else - make BIN=$PKG/usr MAN=$PKG/usr/man/man1 CONF=$PKG/etc install \ + make BIN=$PKG/usr/bin MAN=$PKG/usr/man/man1 CONF=$PKG/etc install \ 2>&1 |tee $OUTPUT/install-${PRGNAM}.log fi +# Make the configuration file upgrade-safe: +mv $PKG/etc/foremost.conf{,.new} + +# Add this to the doinst.sh: +! [ -d $PKG/install ] && mkdir -p $PKG/install +cat <> $PKG/install/doinst.sh +# Handle the incoming configuration files: +config() { + for infile in \$1; do + NEW="\$infile" + 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 + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... + done +} + +config etc/foremost.conf.new + +EOINS + # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -- cgit v1.2.3-65-gdbad