blob: a968c4b1a632ae804567daedcd990ea32f7b925e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="4"
inherit linux-mod
DESCRIPTION="Kernel module to create webcamstudio's virtual webcam loopback device"
HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
SRC_URI="https://github.com/umlaeute/v4l2loopback/tarball/v${PV} -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="modules"
DEPEND=""
RDEPEND="${DEPEND}"
S="${WORKDIR}"/umlaeute-v4l2loopback-dd9ea64
pkg_setup() {
linux-mod_pkg_setup
CONFIG_CHECK="VIDEO_DEV"
MODULE_NAMES="webcamstudio(video:)"
BUILD_TARGETS="all"
}
src_prepare() {
if use modules; then
epatch "${FILESDIR}/${P}-webcamstudio.patch"
sed -e "s:\$(KERNEL_DIR):${KV_DIR}:" \
-i Makefile || die
set_arch_to_kernel
fi
}
src_compile() {
if use modules; then
einfo "Compile kernel module"
mv v4l2loopback.c webcamstudio.c || die
linux-mod_src_compile
fi
}
src_install() {
use modules && linux-mod_src_install
}
pkg_postinst() {
use modules && linux-mod_pkg_postinst
}
|