summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2022-04-13 12:33:17 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-16 12:11:25 +0700
commitbb769687e88e4c7d2b767a6692c3d678b1088391 (patch)
treebaa175aa0fe2406010c58cc5034776fc42649e9e
parentcbb0c6a330548315d772ad78d6d05b016f777466 (diff)
downloadslackbuilds-bb769687e88e4c7d2b767a6692c3d678b1088391.tar.gz
slackbuilds-bb769687e88e4c7d2b767a6692c3d678b1088391.tar.xz
system/multipath-tools: Strip binaries, fix docs.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/multipath-tools/multipath-tools.SlackBuild23
1 files changed, 17 insertions, 6 deletions
diff --git a/system/multipath-tools/multipath-tools.SlackBuild b/system/multipath-tools/multipath-tools.SlackBuild
index b9b2b7f452..feb20d6fe2 100644
--- a/system/multipath-tools/multipath-tools.SlackBuild
+++ b/system/multipath-tools/multipath-tools.SlackBuild
@@ -20,18 +20,22 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# 22-Oct-2018
-# Updated for version 0.7.8
+# 20220413 bkw: Modified by SlackBuilds.org, BUILD=3:
+# - fix broken symlink in doc dir.
+# - strip binaries and libraries.
# 20220321 bkw: Modified by SlackBuilds.org, BUILD=2:
# - fix 32-bit build.
# - fix path to kpart_id script in udev rules.
+# 22-Oct-2018
+# Updated for version 0.7.8
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=multipath-tools
VERSION=${VERSION:-0.8.7}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -90,6 +94,9 @@ cd $TMP/$PRGNAM-$VERSION
CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make
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
+
# Move everything in place
mkdir -p $PKG/lib
mv $PKG/usr/lib/udev $PKG/lib/udev
@@ -99,8 +106,7 @@ sed -i 's,/usr/lib/udev,/lib/udev,' $PKG/lib/udev/rules.d/11-dm-mpath.rules
# Manpages
mv $PKG/usr/share/man $PKG/usr/
rm -rf $PKG/usr/share
-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*/*
# init script
mkdir -p $PKG/etc/rc.d
@@ -114,10 +120,15 @@ chmod 644 $PKG/etc/multipath.conf.new
# Docs
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- COPYING README.alua README.md $CWD/README.SLACKWARE \
+ LICENSES COPYING README.alua README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 20220413 bkw: note: *never* use "cp -a" to copy files from $CWD to
+# the package. if the file happens not to be owned by root, you end up
+# with bad ownership in the package!
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh