system/multipath-tools: Strip binaries, fix docs.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-04-13 12:33:17 -04:00 committed by Willy Sudiarto Raharjo
parent cbb0c6a330
commit bb769687e8
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 17 additions and 6 deletions

View File

@ -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