diff options
author | B. Watson <yalhcru@gmail.com> | 2022-04-04 17:19:42 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2022-04-04 17:19:42 -0400 |
commit | c8934fcab85a5d1a990fa44983d6b20156314e8f (patch) | |
tree | aefbcbde30268a8117ade9dc8e4c91fdee31cd29 /system/bcache-tools | |
parent | 91a4f1126998691b82b9e37ba1ed21ff49f1e807 (diff) |
system/bcache-tools: Strip binaries, move to /usr/sbin.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'system/bcache-tools')
-rw-r--r-- | system/bcache-tools/bcache-tools.SlackBuild | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/system/bcache-tools/bcache-tools.SlackBuild b/system/bcache-tools/bcache-tools.SlackBuild index 3ea5965b5e79d..b08b36d9e576e 100644 --- a/system/bcache-tools/bcache-tools.SlackBuild +++ b/system/bcache-tools/bcache-tools.SlackBuild @@ -19,25 +19,27 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220404 bkw: Modified by SlackBuilds.org, BUILD=3: +# - i486 => i586. +# - move probe-bcache and bcache-register binaries to /usr/sbin. +# - strip binaries. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=bcache-tools VERSION=${VERSION:-1.0.8} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; *) export ARCH=$( uname -m ) ;; 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 @@ -47,8 +49,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" @@ -80,9 +82,9 @@ zcat $CWD/udev-rules-no-run-builtin.patch.gz | patch -p0 --verbose 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 \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ # Build cd $TMP/$PRGNAM-$VERSION @@ -98,10 +100,20 @@ mkdir -p $PKG/lib/udev/rules.d mkdir -p $PKG/usr/share/man/man8 make install DESTDIR=$PKG -# Man pages +# 20220404 bkw: 'make install' puts a couple of ELF binaries in +# /lib/udev, which is terrible. move them to /usr/sbin, and edit +# the udev rules to call them from there (absolute path). +for i in probe-bcache bcache-register; do + mv $PKG/lib/udev/$i $PKG/usr/sbin/$i + sed -i "s,$i,/usr/sbin/$i," $PKG/lib/udev/rules.d/*.rules +done + +# 20220404 bkw: there weren't getting stripped. +strip $PKG/usr/sbin/* + +# Man pages in wrong place, move and gzip. mv $PKG/usr/share/man $PKG/usr/ -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*/* rm -rf $PKG/usr/share # Documentation |