developer | 7043679 | 2023-05-19 09:31:20 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2021 OpenWrt.org |
| 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:=openssl-fips-ext |
| 11 | PKG_RELEASE:=1 |
| 12 | PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) |
| 13 | |
| 14 | include $(INCLUDE_DIR)/package.mk |
| 15 | |
| 16 | define Package/openssl-fips-ext |
| 17 | CATEGORY:=MTK Properties |
| 18 | SECTION:=MTK Properties |
| 19 | SUBMENU:=Applications |
| 20 | TITLE:=openssl-fips-ext -- simple tool for gcm and ccm based on openssl api |
| 21 | DEPENDS:= libopenssl |
| 22 | endef |
| 23 | |
| 24 | define Package/openssl-fips-ext/description |
| 25 | Simple tool for gcm and ccm |
| 26 | endef |
| 27 | |
| 28 | define Build/Prepare |
| 29 | mkdir -p $(PKG_BUILD_DIR) |
| 30 | mkdir -p $(PKG_BUILD_DIR)/src |
| 31 | $(CP) ./src/* $(PKG_BUILD_DIR)/src |
| 32 | endef |
| 33 | |
| 34 | define Build/Compile |
| 35 | make -C ./src \ |
| 36 | CC="$(TARGET_CC)" \ |
| 37 | OPENSSL_INCS_LOCATION=-I$(STAGING_DIR)/usr/include/openssl \ |
| 38 | OPENSSL_LIBS_LOCATION=-L$(STAGING_DIR)/usr/lib |
| 39 | endef |
| 40 | |
| 41 | define Package/openssl-fips-ext/install |
| 42 | $(INSTALL_DIR) $(1)/bin |
| 43 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/openssl-fips-ext $(1)/bin/ |
| 44 | endef |
| 45 | |
| 46 | $(eval $(call BuildPackage,openssl-fips-ext)) |
| 47 | |