diff options
Diffstat (limited to 'libraries/libvirt/libvirt.SlackBuild')
-rw-r--r-- | libraries/libvirt/libvirt.SlackBuild | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/libraries/libvirt/libvirt.SlackBuild b/libraries/libvirt/libvirt.SlackBuild index 5b45d4cb55..1da38ef831 100644 --- a/libraries/libvirt/libvirt.SlackBuild +++ b/libraries/libvirt/libvirt.SlackBuild @@ -4,10 +4,13 @@ # Written by Michal Bialozor <bialyy@o2.pl> # Maintained by Robby Workman <rworkman@slackbuilds.org> +# 20220422 bkw: Modified by SlackBuilds.org, BUILD=2: +# - strip binaries. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=libvirt -VERSION=${VERSION:-7.4.0} +VERSION=${VERSION:-9.1.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -20,9 +23,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 @@ -43,6 +43,7 @@ else LIBDIRSUFFIX="" fi +VIRTUSER=${VIRTUSER:-root} VIRTGROUP=${VIRTGROUP:-users} # Some optional dependencies checks @@ -63,9 +64,9 @@ 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 \ + -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 {} \+ # we have sysctld files in /etc/sysctl.d sed -i "s|prefix / 'lib' / 'sysctl.d'|sysconfdir / 'sysctl.d'|" src/remote/meson.build @@ -78,7 +79,7 @@ mkdir -p build cd build CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ - meson .. \ + meson setup .. \ --buildtype=release \ --infodir=/usr/info \ --libdir=/usr/lib${LIBDIRSUFFIX} \ @@ -87,6 +88,7 @@ cd build --prefix=/usr \ --sysconfdir=/etc \ -Dqemu_group=$VIRTGROUP \ + -Dqemu_user=$VIRTUSER \ $bash_completion \ -Daudit=${audit}abled \ -Dlibiscsi=${libiscsi}abled \ @@ -100,9 +102,9 @@ cd build -Ddriver_vz=disabled \ -Dsecdriver_apparmor=disabled \ -Dsecdriver_selinux=disabled \ - -Dstorage_sheepdog=disabled \ -Dstorage_vstorage=disabled \ -Ddtrace=disabled \ + -Dstrip=true \ -Dinit_script=none "${NINJA:=ninja}" DESTDIR=$PKG $NINJA install @@ -133,11 +135,14 @@ sed -i \ $PKG/etc/libvirt/qemu.conf # disable seccomp support or else VMs won't start with new libvirt/qemu combo -sed -i "s|^\#seccomp_sandbox = 1|seccomp_sandbox = 0|" \ - $PKG/etc/libvirt/qemu.conf +# 20220212 bkw: this file doesn't exist if qemu wasn't installed. and +# since qemu isn't in REQUIRES, it's optional, so the build shouldn't fail. +if [ -e $PKG/etc/libvirt/qemu.conf ]; then + sed -i "s|^\#seccomp_sandbox = 1|seccomp_sandbox = 0|" \ + $PKG/etc/libvirt/qemu.conf +fi -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 mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION/ |