summaryrefslogtreecommitdiff
path: root/recipes/gphoto2/ptp-gadget_git.bb
blob: 5d89712f0fde9045b2dd4b5ab74b818b0706f6ad (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
DESCRIPTION = "This is a device-side implementation of the PTP (Picture Transfer Protocol)"
LICENSE = "GPLv3"

DEPENDS = "virtual/kernel"
RDEPENDS_${PN} = "imagemagick"

PV = "1.1"
PR = "r1"
PR_append = "+gitr${SRCREV}"

SRCREV = "ef7ef29b5cdcf8630c901362a66905b956242e0d"
SRC_URI = "git://git.denx.de/ptp-gadget.git;protocol=git \
           file://0001-Fix-musb_hdrc-EP_STATUS_NAME.patch"

S = "${WORKDIR}/git"

do_compile () {
	export CPPFLAGS="${CPPFLAGS} ${CFLAGS}"
	sed -i -e 's:pthread:pthread ${LDFLAGS}:' Makefile
	oe_runmake KERNEL_SRC=${STAGING_KERNEL_DIR} CROSS_COMPILE=${TARGET_PREFIX}
}

do_install () {
	sed -i -e s:local/::g Makefile
	# "/usr/bin" is hardcoded in the makefile
	install -d ${D}/usr/bin
	oe_runmake install DESTDIR="${D}"
}

#Need specific kernel headers
PACKAGE_ARCH = "${MACHINE_ARCH}"