blob: 874e919439980c3f6aee72fdca112a08ea87e00e [file] [log] [blame]
developerd042eba2023-11-14 14:23:39 +08001#
2# Copyright (C) 2023 Mediatek Ltd.
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=libkcapi
11PKG_RELEASE:=1.4.0
12PKG_VERSION:=1.4.0
13PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
14PKG_FIXUP:=autoreconf
15
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17PKG_SOURCE_URL:=https://codeload.github.com/smuellerDD/libkcapi/tar.gz/refs/tags/v$(PKG_VERSION)
18PKG_HASH:=10f96ccb2799f3ef810f3956c48a2d791a9221c9a545de51bd79e5a81030f38e
19
20include $(INCLUDE_DIR)/package.mk
21MAKE_FLAGS:=
22
23define Package/libkcapi
24 SECTION:=Utilities
25 CATEGORY:=Utilities
26 TITLE:=libkcapi
27 SUBMENU:=FIPS
28endef
29
30define Package/libkcapi/description
31 Libkcapi allow user-space to access the Linux kernel crypto API.
32endef
33
34define Build/Configure
35 cd $(PKG_BUILD_DIR) && $(STAGING_DIR_HOST)/bin/autoreconf -i
36 cd $(PKG_BUILD_DIR) && CC=aarch64-openwrt-linux-musl-gcc \
37 CFLAGS="-Wno-error" $(PKG_BUILD_DIR)/configure \
38 --enable-kcapi-test --enable-kcapi-speed \
39 --enable-kcapi-hasher --enable-kcapi-rngapp \
40 --enable-kcapi-encapp --enable-kcapi-dgstapp \
41 --host=x86
42endef
43
44define Package/libkcapi/install
45 $(INSTALL_DIR) $(1)/usr/bin
46 $(CP) $(PKG_BUILD_DIR)/bin/* $(1)/usr/bin
47endef
48
49$(eval $(call BuildPackage,libkcapi))