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" |
Andrew Geissler | 1e34c2d | 2020-05-29 16:02:59 -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 | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 14 | SRC_URI = "git://github.com/file/file.git \ |
| 15 | file://0001-src-compress.c-correct-header-define-for-xz-lzma.patch" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 16 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 17 | SRCREV = "87731415de945660b00f02207d8e9d986ef9b82e" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | S = "${WORKDIR}/git" |
| 19 | |
| 20 | inherit autotools update-alternatives |
| 21 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 22 | PACKAGECONFIG ??= "bz2 lzma zlib" |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 23 | PACKAGECONFIG[bz2] = "--enable-bzlib, --disable-bzlib, bzip2" |
| 24 | PACKAGECONFIG[lzma] = "--enable-xzlib, --disable-xzlib, xz" |
| 25 | PACKAGECONFIG[zlib] = "--enable-zlib, --disable-zlib, zlib" |
| 26 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | EXTRA_OECONF += "--disable-libseccomp" |
| 28 | |
| 29 | ALTERNATIVE_${PN} = "file" |
| 30 | ALTERNATIVE_LINK_NAME[file] = "${bindir}/file" |
| 31 | |
| 32 | EXTRA_OEMAKE_append_class-target = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" |
| 33 | EXTRA_OEMAKE_append_class-nativesdk = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" |
| 34 | |
| 35 | FILES_${PN} += "${datadir}/misc/*.mgc" |
| 36 | |
| 37 | do_compile_append_class-native() { |
| 38 | oe_runmake check |
| 39 | } |
| 40 | |
| 41 | do_install_append_class-native() { |
| 42 | create_cmdline_wrapper ${D}/${bindir}/file \ |
| 43 | --magic-file ${datadir}/misc/magic.mgc |
| 44 | } |
| 45 | |
| 46 | do_install_append_class-nativesdk() { |
| 47 | create_cmdline_wrapper ${D}/${bindir}/file \ |
| 48 | --magic-file ${datadir}/misc/magic.mgc |
| 49 | } |
| 50 | |
| 51 | BBCLASSEXTEND = "native nativesdk" |
| 52 | PROVIDES_append_class-native = " file-replacement-native" |
| 53 | # Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who |
| 54 | # depends on file-replacement-native. |
| 55 | bindir_append_class-native = "/file-native" |