diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-12-21 14:09:21 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-12-24 07:33:38 +0700 |
commit | 1a3fa2655471054212803368b235df009ebbcb36 (patch) | |
tree | d62cb929657d9ec3e7d3aca85870197e8f571207 /misc | |
parent | 4accae737577872cbfd59df496f9bf147cd4df67 (diff) | |
download | slackbuilds-1a3fa2655471054212803368b235df009ebbcb36.tar.gz |
misc/rsnapshot: Script cleanup.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/rsnapshot/rsnapshot.SlackBuild | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/misc/rsnapshot/rsnapshot.SlackBuild b/misc/rsnapshot/rsnapshot.SlackBuild index fe8d6fec35..59432e7db4 100644 --- a/misc/rsnapshot/rsnapshot.SlackBuild +++ b/misc/rsnapshot/rsnapshot.SlackBuild @@ -29,7 +29,7 @@ TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -54,11 +54,13 @@ else LIBDIRSUFFIX="" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -77,14 +79,17 @@ CXXFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --build=$ARCH-slackware-linux -make all || exit 1 -make install DESTDIR=$PKG || exit 1 +make all +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -find $PKG/usr/man -type f -exec gzip -9 {} + || true +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING ChangeLog README docs/HOWTOs/rsnapshot-HOWTO.en.html utils \ - $CWD/contrib $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING ChangeLog README.md docs/HOWTOs/*.html utils $CWD/contrib $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION |