aboutsummaryrefslogtreecommitdiff
path: root/development/bsdiff/bsdiff.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/bsdiff/bsdiff.SlackBuild')
-rw-r--r--development/bsdiff/bsdiff.SlackBuild48
1 files changed, 25 insertions, 23 deletions
diff --git a/development/bsdiff/bsdiff.SlackBuild b/development/bsdiff/bsdiff.SlackBuild
index 436d9f1747cd1..b0e64862089ea 100644
--- a/development/bsdiff/bsdiff.SlackBuild
+++ b/development/bsdiff/bsdiff.SlackBuild
@@ -2,9 +2,10 @@
# Slackware build script for bsdiff.
#
-# Copyright 2010-2011 Marco Bonetti <sid77@slackware.it>
+# Copyright 2010-2011 Marco Bonetti <email removed>
# All rights reserved.
-# Maintenance adoption 2016 Glenn Becker <glenn.becker@gmail.com>
+# Maintenance adoption 2016 Glenn Becker <email removed>
+# Maintenance adoption 2018 B. Watson <yalhcru@gmail.com>
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@@ -23,6 +24,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20181211 bkw:
+# - Take over maintenance.
+# - i486 => i586.
+# - Simplify script a bit.
+# - Get rid of Makefile.diff.
+
PRGNAM=bsdiff
VERSION=${VERSION:-4.3}
BUILD=${BUILD:-1}
@@ -30,7 +37,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
@@ -41,8 +48,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"
@@ -64,28 +71,23 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-# fix Makefile
-patch -p1 --verbose < $CWD/Makefile.diff
+# fix Makefile so it works with gmake
+sed -i '/^\./d' Makefile
+
+# 'make install' won't create these
+mkdir -p $PKG/usr/bin $PKG/usr/man/man1
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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# bsdiff needs to be linked against bzip2 libraries
-SLKCFLAGS="$SLKCFLAGS -lbz2"
-make CFLAGS="$SLKCFLAGS"
-make install INSTALL=install PREFIX=/usr 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
-
-( 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
-)
+make CFLAGS="$SLKCFLAGS -lbz2"
+make install \
+ INSTALL_PROGRAM="install -s -m0755" \
+ INSTALL_MAN="install -m0644" \
+ PREFIX=$PKG/usr
+gzip -9 $PKG/usr/man/man1/*.1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild