diff options
Diffstat (limited to 'system/v4l2loopback/v4l2loopback.SlackBuild')
-rw-r--r-- | system/v4l2loopback/v4l2loopback.SlackBuild | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/system/v4l2loopback/v4l2loopback.SlackBuild b/system/v4l2loopback/v4l2loopback.SlackBuild index 7d7fadd788..91726509ce 100644 --- a/system/v4l2loopback/v4l2loopback.SlackBuild +++ b/system/v4l2loopback/v4l2loopback.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for v4l2loopback -# Copyright 2020 Edward W. Koenig <kingbeowulf@gmail.com> +# Copyright 2020 Edward W. Koenig <kingbeowulf@linuxgalaxy.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,16 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=v4l2loopback -VERSION=${VERSION:-0.12.5} +VERSION=${VERSION:-0.12.7} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +KERNEL=${KERNEL:-$(uname -r)} +PKGVER=${VERSION}_$(echo $KERNEL | tr - _) if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +41,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -69,18 +82,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Fix for older kernels, etc... -# https://github.com/umlaeute/v4l2loopback/commit/d26e624b4ead762d34152f9f825b3a51fb92fb9c -# https://github.com/umlaeute/v4l2loopback/commit/7dced0f9e6641b7e9e54ced74c5c7611d10f729f -# https://github.com/umlaeute/v4l2loopback/commit/72a32a67dee3a67dff76f565551907a2fc7e88e6 -# only set (struct video_device).device_caps on linux>=4.7.0 -# Set device_caps in init_vdev() for all kernel-versions (not just >4.7.0) -# Don't set the V4L2_CAP_DEVICE_CAPS on device_caps -patch -p1 < $CWD/update_to_master_17JUN2020.patch - -make - -install -D -m 644 $PRGNAM.ko $PKG/lib/modules/$(uname -r)/kernel/extra/$PRGNAM.ko +make KERNELRELEASE=$KERNEL + +install -D -m 644 $PRGNAM.ko $PKG/lib/modules/$KERNEL/kernel/extra/$PRGNAM.ko install -D -m 755 utils/$PRGNAM-ctl $PKG/usr/bin/$PRGNAM-ctl find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ @@ -95,4 +99,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-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE |