diff options
Diffstat (limited to 'meta/recipes-devtools/file/file_5.45.bb')
-rw-r--r-- | meta/recipes-devtools/file/file_5.45.bb | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-devtools/file/file_5.45.bb b/meta/recipes-devtools/file/file_5.45.bb new file mode 100644 index 0000000000..a7127023cb --- /dev/null +++ b/meta/recipes-devtools/file/file_5.45.bb | |||
@@ -0,0 +1,59 @@ | |||
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 | |||
11 | DEPENDS = "file-replacement-native" | ||
12 | DEPENDS:class-native = "bzip2-replacement-native" | ||
13 | |||
14 | SRC_URI = "git://github.com/file/file.git;branch=master;protocol=https" | ||
15 | |||
16 | SRCREV = "4cbd5c8f0851201d203755b76cb66ba991ffd8be" | ||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit autotools update-alternatives | ||
20 | |||
21 | PACKAGECONFIG ??= "bz2 lzma zlib" | ||
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 | PACKAGECONFIG[zstdlib] = "--enable-zstdlib, --disable-zstdlib, zstd" | ||
26 | PACKAGECONFIG[lzlib] = "--enable-lzlib, --disable-lzlib, lzip" | ||
27 | PACKAGECONFIG[seccomp] = "--enable-libseccomp, --disable-libseccomp, 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 | FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/file.sh" | ||
37 | |||
38 | do_compile:append:class-native() { | ||
39 | oe_runmake check | ||
40 | } | ||
41 | |||
42 | do_install:append:class-native() { | ||
43 | create_cmdline_wrapper ${D}/${bindir}/file \ | ||
44 | --magic-file ${datadir}/misc/magic.mgc | ||
45 | } | ||
46 | |||
47 | do_install:append:class-nativesdk() { | ||
48 | create_wrapper ${D}/${bindir}/file MAGIC=${datadir}/misc/magic.mgc | ||
49 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
50 | cat <<- EOF > ${D}${SDKPATHNATIVE}/environment-setup.d/file.sh | ||
51 | export MAGIC="${datadir}/misc/magic.mgc" | ||
52 | EOF | ||
53 | } | ||
54 | |||
55 | BBCLASSEXTEND = "native nativesdk" | ||
56 | PROVIDES:append:class-native = " file-replacement-native" | ||
57 | # Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who | ||
58 | # depends on file-replacement-native. | ||
59 | bindir:append:class-native = "/file-native" | ||