Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "File classification tool" |
| 2 | DESCRIPTION = "File attempts to classify files depending \ |
| 3 | on their contents and prints a description if a match is found." |
| 4 | HOMEPAGE = "http://www.darwinsys.com/file/" |
| 5 | SECTION = "console/utils" |
| 6 | |
| 7 | # two clause BSD |
| 8 | LICENSE = "BSD-2-Clause" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdda1b" |
| 10 | |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 11 | DEPENDS = "file-replacement-native" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 12 | DEPENDS:class-native = "bzip2-replacement-native" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 14 | SRC_URI = "git://github.com/file/file.git" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 16 | SRCREV = "f49fda6f52a9477d817dbd9c06afab02daf025f8" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 17 | S = "${WORKDIR}/git" |
| 18 | |
| 19 | inherit autotools update-alternatives |
| 20 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 21 | PACKAGECONFIG ??= "bz2 lzma zlib" |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 22 | PACKAGECONFIG[bz2] = "--enable-bzlib, --disable-bzlib, bzip2" |
| 23 | PACKAGECONFIG[lzma] = "--enable-xzlib, --disable-xzlib, xz" |
| 24 | PACKAGECONFIG[zlib] = "--enable-zlib, --disable-zlib, zlib" |
| 25 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 26 | EXTRA_OECONF += "--disable-libseccomp" |
| 27 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 28 | ALTERNATIVE:${PN} = "file" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | ALTERNATIVE_LINK_NAME[file] = "${bindir}/file" |
| 30 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | EXTRA_OEMAKE:append:class-target = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" |
| 32 | EXTRA_OEMAKE:append:class-nativesdk = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 33 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | FILES:${PN} += "${datadir}/misc/*.mgc" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 35 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 36 | do_compile:append:class-native() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 37 | oe_runmake check |
| 38 | } |
| 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | do_install:append:class-native() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 41 | create_cmdline_wrapper ${D}/${bindir}/file \ |
| 42 | --magic-file ${datadir}/misc/magic.mgc |
| 43 | } |
| 44 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 45 | do_install:append:class-nativesdk() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 46 | create_cmdline_wrapper ${D}/${bindir}/file \ |
| 47 | --magic-file ${datadir}/misc/magic.mgc |
| 48 | } |
| 49 | |
| 50 | BBCLASSEXTEND = "native nativesdk" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | PROVIDES:append:class-native = " file-replacement-native" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 52 | # Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who |
| 53 | # depends on file-replacement-native. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 54 | bindir:append:class-native = "/file-native" |