]> CyberLeo.Net >> Repos - CDN/portage-cdn.git/blob - media-video/v4l2loopback/v4l2loopback-0.12.5-r2.ebuild
media-video/v4l2loopback: fix distfile
[CDN/portage-cdn.git] / media-video / v4l2loopback / v4l2loopback-0.12.5-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit linux-mod toolchain-funcs
7
8 case ${PV} in
9 9999)
10         inherit git-r3
11         KEYWORDS=""
12         EGIT_REPO_URI="https://github.com/umlaeute/v4l2loopback.git"
13         ;;
14 *)
15 #       inherit vcs-snapshot
16         KEYWORDS="~amd64 ~x86"
17         SRC_URI="https://github.com/umlaeute/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
18         ;;
19 esac
20
21 DESCRIPTION="v4l2 loopback device which output is it's own input"
22 HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
23
24 LICENSE="GPL-2"
25 SLOT="0"
26 IUSE="examples"
27
28 CONFIG_CHECK="VIDEO_DEV"
29 MODULE_NAMES="v4l2loopback(video:)"
30 BUILD_TARGETS="all"
31
32 pkg_setup() {
33         linux-mod_pkg_setup
34         export KERNELRELEASE=${KV_FULL}
35 }
36
37 src_prepare() {
38         default
39         sed -i -e 's/gcc /$(CC) /' examples/Makefile || die
40 }
41
42 src_compile() {
43         linux-mod_src_compile
44         if use examples; then
45                 emake CC=$(tc-getCC) -C examples
46         fi
47 }
48
49 src_install() {
50         linux-mod_src_install
51         dosbin utils/v4l2loopback-ctl
52         dodoc doc/kernel_debugging.txt
53         dodoc doc/docs.txt
54         if use examples; then
55                 dosbin examples/yuv4mpeg_to_v4l2
56                 docinto examples
57                 dodoc examples/{*.sh,*.c,Makefile}
58         fi
59 }