blob: 0dcc90548a013ebb5868c2b1ba528cda0930c519 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -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-2-Clause"
9LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdda1b"
10
Andrew Geisslerc182c622020-05-15 14:13:32 -050011DEPENDS = "file-replacement-native"
Andrew Geissler1e34c2d2020-05-29 16:02:59 -050012DEPENDS_class-native = "bzip2-replacement-native"
Andrew Geissler82c905d2020-04-13 13:39:40 -050013
14SRC_URI = "git://github.com/file/file.git"
15
Andrew Geisslerd25ed322020-06-27 00:28:28 -050016SRCREV = "87731415de945660b00f02207d8e9d986ef9b82e"
Andrew Geissler82c905d2020-04-13 13:39:40 -050017S = "${WORKDIR}/git"
18
19inherit autotools update-alternatives
20
Andrew Geisslerc182c622020-05-15 14:13:32 -050021PACKAGECONFIG ??= "zlib"
22PACKAGECONFIG[bz2] = "--enable-bzlib, --disable-bzlib, bzip2"
23PACKAGECONFIG[lzma] = "--enable-xzlib, --disable-xzlib, xz"
24PACKAGECONFIG[zlib] = "--enable-zlib, --disable-zlib, zlib"
25
Andrew Geissler82c905d2020-04-13 13:39:40 -050026EXTRA_OECONF += "--disable-libseccomp"
27
28ALTERNATIVE_${PN} = "file"
29ALTERNATIVE_LINK_NAME[file] = "${bindir}/file"
30
31EXTRA_OEMAKE_append_class-target = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
32EXTRA_OEMAKE_append_class-nativesdk = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
33
34FILES_${PN} += "${datadir}/misc/*.mgc"
35
36do_compile_append_class-native() {
37 oe_runmake check
38}
39
40do_install_append_class-native() {
41 create_cmdline_wrapper ${D}/${bindir}/file \
42 --magic-file ${datadir}/misc/magic.mgc
43}
44
45do_install_append_class-nativesdk() {
46 create_cmdline_wrapper ${D}/${bindir}/file \
47 --magic-file ${datadir}/misc/magic.mgc
48}
49
50BBCLASSEXTEND = "native nativesdk"
51PROVIDES_append_class-native = " file-replacement-native"
52# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
53# depends on file-replacement-native.
54bindir_append_class-native = "/file-native"