summaryrefslogtreecommitdiffstats
path: root/development/srecord/srecord.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/srecord/srecord.SlackBuild')
-rw-r--r--development/srecord/srecord.SlackBuild54
1 files changed, 32 insertions, 22 deletions
diff --git a/development/srecord/srecord.SlackBuild b/development/srecord/srecord.SlackBuild
index d07ad4c807..39a18efec2 100644
--- a/development/srecord/srecord.SlackBuild
+++ b/development/srecord/srecord.SlackBuild
@@ -2,10 +2,21 @@
# Slackware build script for srecord
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20230627 bkw: BUILD=2
+# - install shared lib with +x perm.
+# Note: I know there's a 1.65 release. But it has problems. Waiting on
+# 1.66 to see if it's any better.
+
+# 20210907 bkw: BUILD=2
+# - get rid of useless BUILDING.pdf
+# - move PDF docs directly into the doc dir (instead of a subdir of it)
+# - get rid of .la file
+# - make the script code easier to read (for me anyway)
+
# 20140819 bkw: updated for v1.64, switched to regular sourceforge download
# URL. Turns out the short URL on the main site will disappear whenever
# there's a new release.
@@ -14,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=srecord
VERSION=${VERSION:-1.64}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -26,9 +37,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -61,42 +69,44 @@ rm -rf $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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+DOCDIR=/usr/doc/$PRGNAM-$VERSION
+PKGDOC=$PKG/$DOCDIR
+LIBDIR=/usr/lib$LIBDIRSUFFIX
+PKGLIB=$PKG/$LIBDIR
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --libdir=$LIBDIR \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --docdir=$DOCDIR \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# don't need static lib, and --disable-static doesn't work
-rm -f $PKG/usr/lib$LIBDIRSUFFIX/*.a
+rm -f $PKGLIB/*.a
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+strip $PKG/usr/bin/* $PKGLIB/*.so.?.?.?
+chmod 755 $PKGLIB/*.so.?.?.?
+rm -f $PKGLIB/*.la
-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
+gzip -9 $PKG/usr/man/man?/*
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mkdir -p $PKGDOC
+cp -a AUTHORS LICENSE README $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
# --docdir is ignored, too
-mv $PKG/usr/share/doc/$PRGNAM/ $PKG/usr/doc/$PRGNAM-$VERSION
-rm -rf $PKG/usr/share
+mv $PKG/usr/share/doc/$PRGNAM/* $PKGDOC
+rm -rf $PKG/usr/share $PKGDOC/BUILDING.pdf
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc