diff options
Diffstat (limited to 'system/lvm2-cluster/lvm2-cluster.SlackBuild')
-rw-r--r-- | system/lvm2-cluster/lvm2-cluster.SlackBuild | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/system/lvm2-cluster/lvm2-cluster.SlackBuild b/system/lvm2-cluster/lvm2-cluster.SlackBuild index c923f480fa..e0ab207d53 100644 --- a/system/lvm2-cluster/lvm2-cluster.SlackBuild +++ b/system/lvm2-cluster/lvm2-cluster.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for lvm2-cluster @@ -22,10 +22,19 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220413 bkw: Modified by SlackBuilds.org, BUILD=2: strip library. + +# 20220222 bkw: Modified by SlackBuilds.org: fix build on 15.0. +# This should probably be updated to match the version of lvm2 in +# Slackware 15.0, but I leave that up to the maintainer to decide. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=lvm2-cluster VERSION=${VERSION:-2.02.154} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} SRCNAM=LVM2 @@ -37,7 +46,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -67,16 +80,18 @@ cd $SRCNAM.$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 \ + -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 {} \+ + +sed -i '1i#include <sys/sysmacros.h>' lib/filters/filter-sysfs.c # Copied from lvm2.SlackBuild CFLAGS="$SLKCFLAGS" \ ./configure \ --disable-readline \ --enable-cmdlib \ - --enable-dmeventd \ + --disable-dmeventd \ --enable-applib \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --with-usrlibdir=/usr/lib${LIBDIRSUFFIX} \ @@ -95,7 +110,6 @@ CFLAGS="$SLKCFLAGS" \ --with-default-dm-run-dir=/run/lvm \ --with-clvmd-pidfile=/run/lvm/clvmd.pid \ --with-cmirrord-pidfile=/run/lvm/cmirrord.pid \ - --with-dmeventd-pidfile=/run/lvm/dmeventd.pid \ --with-clvmd \ --with-cluster=shared \ --build=$ARCH-slackware-linux @@ -103,23 +117,18 @@ CFLAGS="$SLKCFLAGS" \ make daemons man # Some assembly required -install -D -m0755 -oroot -groot daemons/clvmd/clvmd $PKG/usr/sbin/clvmd -install -D -m0644 -oroot -groot man/clvmd.8 $PKG/usr/man/man8/clvmd.8 +mkdir -p $PKG/usr/{sbin,man/man8} +install -s -m0755 -oroot -groot daemons/clvmd/clvmd $PKG/usr/sbin/clvmd +gzip -9c < man/clvmd.8 > $PKG/usr/man/man8/clvmd.8.gz install -D -m0755 -oroot -groot scripts/clvmd_init_red_hat $PKG/etc/rc.d/rc.clvmd.new sed -e "s|/etc/sysconfig|/etc/default|g" -i $PKG/etc/rc.d/rc.clvmd.new -install -D -m0755 -oroot -groot lib/locking/liblvm2clusterlock.so.${VERSION%.*} \ +install -s -D -m0755 -oroot -groot lib/locking/liblvm2clusterlock.so.${VERSION%.*} \ $PKG/usr/lib${LIBDIRSUFFIX}/lvm2/liblvm2clusterlock.so.${VERSION%.*} ln -s liblvm2clusterlock.so.${VERSION%.*} \ $PKG/usr/lib${LIBDIRSUFFIX}/lvm2/liblvm2clusterlock.so -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 - -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 - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -130,4 +139,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |