diff options
author | Eric Hameleers <alien@slackware.com> | 2008-12-09 09:15:21 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2008-12-09 09:15:21 +0000 |
commit | 6d622ae87fb2af76d713f35ca8136d77b65ea58e (patch) | |
tree | d35bcfb1c677972bbbbcdd751c469685a1d32d2a /sshfs-fuse/build/sshfs-fuse.SlackBuild | |
parent | ebf065ee6208849c487ec439baa6edd4307c98da (diff) | |
download | asb-6d622ae87fb2af76d713f35ca8136d77b65ea58e.tar.gz asb-6d622ae87fb2af76d713f35ca8136d77b65ea58e.tar.xz |
Updated to 2.2
Diffstat (limited to 'sshfs-fuse/build/sshfs-fuse.SlackBuild')
-rwxr-xr-x | sshfs-fuse/build/sshfs-fuse.SlackBuild | 72 |
1 files changed, 29 insertions, 43 deletions
diff --git a/sshfs-fuse/build/sshfs-fuse.SlackBuild b/sshfs-fuse/build/sshfs-fuse.SlackBuild index b0e22f6b..1a1220a6 100755 --- a/sshfs-fuse/build/sshfs-fuse.SlackBuild +++ b/sshfs-fuse/build/sshfs-fuse.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2005,2007 Eric Hameleers <alien@slackware.com> +# Copyright (c) 2005-2008 Eric Hameleers <alien@slackware.com>, Eindhoven,NL # Permission to use, copy, modify, and distribute this software for # any purpose with or without fee is hereby granted, provided that # the above copyright notice and this permission notice appear in all @@ -26,7 +26,7 @@ # For: sshfs-fuse # Descr: a filesystem client for FUSE, based on ssh # URL: http://fuse.sourceforge.net/sshfs.html -# Needs: fuse +# Needs: # Changelog: # 1.3-1: 18/dec/2005 by Eric Hameleers <alien@slackware.com> # * Initial build. @@ -34,6 +34,10 @@ # * Update. Also reworked this SlackBuild script. # 1.8-1: 30/Jul/2007 by Eric Hameleers <alien@slackware.com> # * Update. +# 2.1-1: 08/aug/2008 by Eric Hameleers <alien@slackware.com> +# * Update. +# 2.2-1: 09/dec/2008 by Eric Hameleers <alien@slackware.com> +# * Update. # # Run 'sh sshfs-fuse.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -41,19 +45,16 @@ # # ----------------------------------------------------------------------------- -# Set initial variables: - PRGNAM=sshfs-fuse -VERSION=${VERSION:-1.8} +VERSION=${VERSION:-2.2} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} +TAG=${TAG:-alien} DOCS="AUTHORS COPYING ChangeLog NEWS README" # Where do we look for sources? -CWD=`pwd` -SRCDIR=`dirname $0` -[ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR} +SRCDIR=$(cd $(dirname $0); pwd) # Place to build (TMP) package (PKG) and output (OUTPUT) the program: TMP=${TMP:-/tmp/build} @@ -61,7 +62,7 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz" -SRCURL="http://dl.sourceforge.net/fuse/${PRGNAM}-${VERSION}.tar.gz" +SRCURL="http://downloads.sourceforge.net/fuse/${PRGNAM}-${VERSION}.tar.gz" ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -82,9 +83,6 @@ else fi case "$ARCH" in - i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; @@ -102,23 +100,22 @@ case "$ARCH" in ;; esac +# Create working directories: mkdir -p $TMP/tmp-$PRGNAM # location to build the source -rm -rf $TMP/tmp-$PRGNAM/* # By default we remove the remnants of previous build -mkdir -p $PKG # place for the package to be built -rm -rf $PKG/* # We always erase old package's contents: -mkdir -p $OUTPUT # place for the package to be saved - - -# --- SOURCE FILE AVAILABILITY --- +rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build +mkdir -p $PKG # place for the package to be built +rm -rf $PKG/* # erase old package's contents +mkdir -p $OUTPUT # place for the package to be saved +# Source file availability: if ! [ -f ${SOURCE} ]; then if ! [ "x${SRCURL}" == "x" ]; then # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/`basename $SOURCE`" echo "Source '`basename ${SOURCE}`' not available yet..." echo "Will download file to `dirname $SOURCE`" - wget -nv --connect-timeout=20 -O "${SOURCE}" "${SRCURL}" || true - if [ $? -ne 0 ]; then + wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true + if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then echo "Downloading '`basename ${SOURCE}`' failed... aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL exit 1 @@ -142,11 +139,7 @@ echo "++" cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." -if `file ${SOURCE} | grep -q ": bzip2"`; then - tar -xjvf ${SOURCE} -else - tar -xzvf ${SOURCE} -fi +tar -xvf ${SOURCE} cd ${PRGNAM}-${VERSION} chown -R root:root . chmod -R u+w,go+r-w,a-s . @@ -154,11 +147,13 @@ chmod -R u+w,go+r-w,a-s . # Building the sources: echo Building ... LDFLAGS="$SLKLDFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --sysconfdir=/etc \ + --mandir=/usr/man \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ @@ -177,7 +172,9 @@ fi # Add some documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* +cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION +find $PKG/usr/doc -type f -exec chmod 644 {} \; # Compress the man page(s): if [ -d $PKG/usr/man ]; then @@ -186,30 +183,19 @@ if [ -d $PKG/usr/man ]; then fi # Strip binaries: -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -) +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc -if [ -f $SRCDIR/doinst.sh ]; then - cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh -fi -if [ -f $SRCDIR/slack-required ]; then - cat $SRCDIR/slack-required > $PKG/install/slack-required -fi # Build the package: cd $PKG -makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz \ +makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz \ 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log -(cd $OUTPUT && md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5) -cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt -if [ -f $PKG/install/slack-required ]; then - cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep -fi +(cd $OUTPUT && md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5) +cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt # Clean up the extra stuff: if [ "$P1" = "--cleanup" ]; then |