developer | d042eba | 2023-11-14 14:23:39 +0800 | [diff] [blame] | 1 | # |
| 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 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | |
| 10 | PKG_NAME:=libkcapi |
| 11 | PKG_RELEASE:=1.4.0 |
| 12 | PKG_VERSION:=1.4.0 |
| 13 | PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) |
| 14 | PKG_FIXUP:=autoreconf |
| 15 | |
| 16 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 17 | PKG_SOURCE_URL:=https://codeload.github.com/smuellerDD/libkcapi/tar.gz/refs/tags/v$(PKG_VERSION) |
| 18 | PKG_HASH:=10f96ccb2799f3ef810f3956c48a2d791a9221c9a545de51bd79e5a81030f38e |
| 19 | |
| 20 | include $(INCLUDE_DIR)/package.mk |
| 21 | MAKE_FLAGS:= |
| 22 | |
| 23 | define Package/libkcapi |
| 24 | SECTION:=Utilities |
| 25 | CATEGORY:=Utilities |
| 26 | TITLE:=libkcapi |
| 27 | SUBMENU:=FIPS |
| 28 | endef |
| 29 | |
| 30 | define Package/libkcapi/description |
| 31 | Libkcapi allow user-space to access the Linux kernel crypto API. |
| 32 | endef |
| 33 | |
| 34 | define 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 |
| 42 | endef |
| 43 | |
| 44 | define Package/libkcapi/install |
| 45 | $(INSTALL_DIR) $(1)/usr/bin |
| 46 | $(CP) $(PKG_BUILD_DIR)/bin/* $(1)/usr/bin |
| 47 | endef |
| 48 | |
| 49 | $(eval $(call BuildPackage,libkcapi)) |