aboutsummaryrefslogtreecommitdiffstats
path: root/media-video/droidcam/droidcam-6.0.0.ebuild
blob: c6cfce676277657e8e96a2feb15722cb868566c1 (plain) (blame)
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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit eutils linux-mod user

DESCRIPTION="Use your Android phone as a wireless webcam"
HOMEPAGE="http://www.dev47apps.com/"
MY_PV=$(replace_all_version_separators '')
SRC_URI="x86? ( https://www.dev47apps.com/files/${MY_PV}/droidcam-32bit.tar.bz2 )
    amd64? ( https://www.dev47apps.com/files/${MY_PV}/droidcam-64bit.tar.bz2 )"

LICENSE="as-is"

SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
DEPEND="net-wireless/bluez"
RDEPEND="${DEPEND}"

BUILD_TARGETS="all"
BUILD_TARGET_ARCH="${ARCH}"
BUILD_PARAMS="-j1"
MODULE_NAMES="v4l2loopback-dc(droid:${S}/v4l2loopback)"

src_unpack() {
	if use x86 ; then 
		unpack droidcam-32bit.tar.bz2
		mv "${WORKDIR}/droidcam-32bit" "${S}"
	fi

	if use amd64 ; then
		unpack droidcam-64bit.tar.bz2
		mv "${WORKDIR}/droidcam-64bit" "${S}"
	fi
}

src_install() {
	cd "${S}"
	dobin droidcam
	dobin droidcam-cli
	linux-mod_src_install
	dodoc README
}