Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 1 | SUMMARY = "fscrypt is a high-level tool for the management of Linux filesystem encryption" |
| 2 | DESCIPTION = "fscrypt manages metadata, key generation, key wrapping, PAM integration, \ |
| 3 | and provides a uniform interface for creating and modifying encrypted directories. For \ |
| 4 | a small, low-level tool that directly sets policies, see fscryptctl \ |
| 5 | (https://github.com/google/fscryptcl)." |
| 6 | HOMEPAGE = "https://github.com/google/fscrypt" |
| 7 | SECTION = "base" |
| 8 | LICENSE = "Apache-2.0" |
| 9 | LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" |
| 10 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 11 | # fscrypt depends on go and libpam |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame] | 12 | DEPENDS += "go-native libpam" |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 13 | |
Andrew Geissler | 2daf84b | 2023-03-31 09:57:23 -0500 | [diff] [blame] | 14 | SRCREV = "7c80c73c084ce9ea49a03b814dac7a82fd7b4c23" |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame] | 15 | SRC_URI = "git://github.com/google/fscrypt.git;branch=master;protocol=https" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 16 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 17 | GO_IMPORT = "import" |
| 18 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 19 | inherit go goarch features_check |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 20 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 21 | REQUIRED_DISTRO_FEATURES = "pam" |
| 22 | |
| 23 | S = "${WORKDIR}/git" |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 24 | |
| 25 | do_compile() { |
| 26 | export GOARCH=${TARGET_GOARCH} |
| 27 | export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" |
| 28 | export GOPATH="${WORKDIR}/git" |
| 29 | |
| 30 | # Pass the needed cflags/ldflags so that cgo |
| 31 | # can find the needed headers files and libraries |
| 32 | export CGO_ENABLED="1" |
| 33 | export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 34 | export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 35 | |
| 36 | cd ${S}/src/${GO_IMPORT} |
| 37 | oe_runmake |
| 38 | |
| 39 | # Golang forces permissions to 0500 on directories and 0400 on files in |
| 40 | # the module cache which prevents us from easily cleaning up the build |
| 41 | # directory. Let's just fix the permissions here so we don't have to |
| 42 | # hack the clean tasks. |
| 43 | chmod -R u+w ${S}/pkg/mod |
| 44 | } |
| 45 | |
| 46 | do_install() { |
| 47 | install -d ${D}/${bindir} |
| 48 | install ${S}/src/${GO_IMPORT}/bin/fscrypt ${D}/${bindir}/fscrypt |
| 49 | } |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 50 | |
| 51 | BBCLASSEXTEND = "native nativesdk" |