blob: d04f1218a9e90f106fa7f949cec599654098ef4a [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "File classification tool"
2DESCRIPTION = "File attempts to classify files depending \
3on their contents and prints a description if a match is found."
4HOMEPAGE = "http://www.darwinsys.com/file/"
5SECTION = "console/utils"
6
7# two clause BSD
8LICENSE = "BSD"
9LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
10
Patrick Williamsf1e5d692016-03-30 15:21:19 -050011DEPENDS = "zlib file-replacement-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012DEPENDS_class-native = "zlib-native"
13
14SRC_URI = "git://github.com/file/file.git \
15 file://debian-742262.patch \
16 file://0001-Add-P-prompt-into-Usage-info.patch \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050017 file://host-file.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018 "
19
20SRCREV = "3c0874be4d3232d672b20f513451a39cfd7c585a"
21S = "${WORKDIR}/git"
22
23inherit autotools
24
Patrick Williamsf1e5d692016-03-30 15:21:19 -050025EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
26EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
27
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028FILES_${PN} += "${datadir}/misc/*.mgc"
29
30do_install_append_class-native() {
31 create_cmdline_wrapper ${D}/${bindir}/file \
32 --magic-file ${datadir}/misc/magic.mgc
33}
34
35do_install_append_class-nativesdk() {
36 create_cmdline_wrapper ${D}/${bindir}/file \
37 --magic-file ${datadir}/misc/magic.mgc
38}
39
40BBCLASSEXTEND = "native nativesdk"
Patrick Williamsf1e5d692016-03-30 15:21:19 -050041PROVIDES_append_class-native = " file-replacement-native"
42# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
43# depends on file-replacement-native.
44bindir_append_class-native = "/file-native"