blob: 798b1707d7cd524e9b407f5283a1a6fbd1de0b98 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001# TODO: include debian's mtp-tools man page (needs xsltproc-native and
2# docbook-xsl-native, or we pregenerate it), add support for doxygen
3# generation fully with -natives
4DESCRIPTION = "libmtp is an Initiator implementation of the Media Transfer \
5Protocol (MTP) in the form of a library suitable primarily for POSIX \
6compliant operating systems"
7SUMMARY = "libmtp is an Initiator implementation of the Media Transfer Protocol (MTP)"
8HOMEPAGE = "http://libmtp.sourceforge.net/"
9LICENSE = "LGPL-2.1+"
10LIC_FILES_CHKSUM = "\
11 file://COPYING;md5=0448d3676bc0de00406af227d341a4d1 \
12 file://src/ptp.c;beginline=3;endline=22;md5=dafe6cfd1782f56471bb94ab06624c1f \
13 file://examples/albums.c;beginline=5;endline=21;md5=84f4e55dfec49e898b7f68a828c15620 \
14"
15
16DEPENDS += "libusb1 gettext-native"
17
18SCM_URI = "git://git.code.sf.net/p/libmtp/code"
19SRC_URI = "\
20 ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
21 file://69-libmtp.rules \
22 file://glibc-2.20.patch \
23"
24SRC_URI[md5sum] = "f80e45c0e6e5798c434bb1c26a7b602d"
25SRC_URI[sha256sum] = "787679171baf8b3cf2fcc03196c705ab4d7cbc969bd71f9d3696be1ce7f1c63a"
26
27# Currently we use a pregenerated rules file produced by mtp-hotplug, rather
28# than having to depend upon libmtp-native or run mtp-hotplug in a postinst.
29do_unpack[vardeps] += "skip_udev_rules_generation"
30do_unpack[postfuncs] += "skip_udev_rules_generation"
31
32skip_udev_rules_generation () {
33 sed -i -e '/^noinst_DATA=/,/util\/mtp-hotplug -H/d' ${S}/Makefile.am
34 cp ${WORKDIR}/69-libmtp.rules ${S}/
35}
36
37inherit autotools pkgconfig lib_package
38
39EXTRA_OECONF += "--disable-rpath"
40
41PACKAGECONFIG ?= "\
42 ${@bb.utils.contains('DISTRO_FEATURES', 'largefile$', 'largefile', '', d)} \
43"
44PACKAGECONFIG[doxygen] = "--enable-doxygen,--disable-doxygen"
45PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile"
46PACKAGECONFIG[mtpz] = "--enable-mtpz,--disable-mtpz,libgcrypt"
47
Brad Bishopd7bf8c12018-02-25 22:55:05 -050048PACKAGES =+ "libmtp-common libmtp-runtime"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050049
50RDEPENDS_${PN} += "libmtp-common"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050051RRECOMMENDS_${PN} += "libmtp-runtime ${PN}-bin"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050052FILES_${PN}-dbg += "${nonarch_base_libdir}/udev/.debug/*"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050053FILES_libmtp-common = "${nonarch_base_libdir}/udev/rules.d/*"
54SUMMARY_libmtp-common = "The udev rules file for MTP devices"
55FILES_libmtp-runtime = "${nonarch_base_libdir}/udev/mtp-probe"
56DEPENDS_libmtp-runtime = "libmtp-common"
57SUMMARY_libmtp-runtime = "mtp-probe, used for the MTP udev rules"
58DESCRIPTION_libmtp-runtime = "This package provides mtp-probe, a program to probe newly connected device interfaces from userspace to determine if they are MTP devices, used for udev rules."