From 139382c930a972ee14c4a06f68ee90f3b5770af1 Mon Sep 17 00:00:00 2001 From: Dineshkumar Date: Thu, 17 Aug 2023 19:54:24 +0530 Subject: [PATCH] fscryptctl: Add support for fscryptctl command Signed-off-by: Dineshkumar --- fscryptctl/Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 fscryptctl/Makefile diff --git a/fscryptctl/Makefile b/fscryptctl/Makefile new file mode 100644 index 000000000..f99be8bf7 --- /dev/null +++ b/fscryptctl/Makefile @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: GPL-2.0-only + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fscryptctl +PKG_VERSION:=1.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/google/fscryptctl.git +PKG_SOURCE_VERSION:=v$(PKG_VERSION) + +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Encryption + TITLE:=Fscryptctl +endef + +define Package/$(PKG_NAME)/description + fscryptctl is a low-level tool written in C that handles raw keys and manages policies for Linux filesystem encryption, + specifically the "fscrypt" kernel interface which is supported by the ext4, f2fs, and UBIFS filesystems +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + fscryptctl +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/fscryptctl $(1)/usr/bin/fscryptctl +endef + +$(eval $(call BuildPackage,$(PKG_NAME)))