From b4ea36ae6f68d119838c454a5fddea92b971f63a Mon Sep 17 00:00:00 2001 From: B. Watson Date: Tue, 7 Sep 2021 13:19:39 -0400 Subject: development/srecord: Rearrange docs, get rid of .la. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- development/srecord/srecord.SlackBuild | 46 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'development/srecord/srecord.SlackBuild') diff --git a/development/srecord/srecord.SlackBuild b/development/srecord/srecord.SlackBuild index d07ad4c807..1e530da361 100644 --- a/development/srecord/srecord.SlackBuild +++ b/development/srecord/srecord.SlackBuild @@ -6,6 +6,12 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 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 +20,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=srecord VERSION=${VERSION:-1.64} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -26,9 +32,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 +64,43 @@ 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.?.?.? +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 -- cgit v1.2.3