diff options
author | Andrew Clemons <andrew.clemons@gmail.com> | 2022-02-18 18:22:05 +1300 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-19 12:10:40 +0700 |
commit | 986c59de595f424a25d11cf7050f81f9db2d985a (patch) | |
tree | cb7dce8d7f055ebadbb1aa0968781e2e52aec1cc /system/v4l2loopback | |
parent | 6ecdff9ad89a28333a8939f121625692461d534b (diff) |
system/v4l2loopback: Use KERNEL env var.
Allow building for other kernels than the currently running
one.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/v4l2loopback')
-rw-r--r-- | system/v4l2loopback/v4l2loopback.SlackBuild | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/system/v4l2loopback/v4l2loopback.SlackBuild b/system/v4l2loopback/v4l2loopback.SlackBuild index adf049d335691..01a55c1577a3d 100644 --- a/system/v4l2loopback/v4l2loopback.SlackBuild +++ b/system/v4l2loopback/v4l2loopback.SlackBuild @@ -30,6 +30,9 @@ 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 i?86) ARCH=i586 ;; @@ -42,7 +45,7 @@ fi # 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" + echo "$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi @@ -88,9 +91,9 @@ find -L . \ # Don't set the V4L2_CAP_DEVICE_CAPS on device_caps patch -p1 < $CWD/update_to_master_17JUN2020.patch -make +make KERNELRELEASE=$KERNEL -install -D -m 644 $PRGNAM.ko $PKG/lib/modules/$(uname -r)/kernel/extra/$PRGNAM.ko +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 \ @@ -105,4 +108,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 +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE |