aboutsummaryrefslogtreecommitdiff
path: root/system/srm/srm.SlackBuild
diff options
context:
space:
mode:
authorPhilip Lacroix <slackph at posteo dot de>2015-11-05 01:39:52 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-11-06 00:27:29 +0700
commit9bd9c5cdf5de656666e534de2f510e255f863535 (patch)
tree5f469fe5dd8b486b47d030f80984ab0673bc6e8f /system/srm/srm.SlackBuild
parent70bf054b35a2d9333a2f79dcafb2ce164d0e90f3 (diff)
system/srm: Updated for version 1.2.15 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/srm/srm.SlackBuild')
-rw-r--r--system/srm/srm.SlackBuild49
1 files changed, 25 insertions, 24 deletions
diff --git a/system/srm/srm.SlackBuild b/system/srm/srm.SlackBuild
index b214c4a60ce4..8bd3ee060b0c 100644
--- a/system/srm/srm.SlackBuild
+++ b/system/srm/srm.SlackBuild
@@ -1,8 +1,10 @@
#!/bin/sh
-# Slackware build script for srm.
+# Slackware build script for srm
+
+# Copyright 2009-2010 Marco Bonetti <sid77 at slackware dot it>
+# Copyright 2015 Philip Lacroix <slackph at posteo dot de>
#
-# Copyright 2009-2010 Marco Bonetti <sid77@slackware.it>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +26,7 @@
PRGNAM=srm
-VERSION=${VERSION:-1.2.10}
+VERSION=${VERSION:-1.2.15}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -41,8 +43,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS ChangeLog COPYING README"
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -63,41 +63,42 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Fix typos in the --help output and man page.
+patch -p1 < $CWD/srm-fix-typos.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+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
+
+PRGMAN=$PKG/usr/man/man1
+PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+# Compress man page.
+gzip -9 $PRGMAN/$PRGNAM.1
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Install documentation.
+mkdir -p $PRGDOC
+cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO $PRGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc