1
0

Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ucert
  3. PKG_RELEASE:=1
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=$(PROJECT_GIT)/ucert.git
  6. PKG_SOURCE_DATE:=2019-12-19
  7. PKG_SOURCE_VERSION:=14a279411cff06f9b1363711df4ec3b5db73f042
  8. PKG_MIRROR_HASH:=797f35138c6e1099a839e768d9e01db022223884d9e0a6d09965e625caf0ae79
  9. CMAKE_INSTALL:=1
  10. PKG_CHECK_FORMAT_SECURITY:=1
  11. PKG_LICENSE:=GPL-3.0+
  12. PKG_LICENSE_FILES:=COPYING
  13. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  14. include $(INCLUDE_DIR)/package.mk
  15. include $(INCLUDE_DIR)/host-build.mk
  16. include $(INCLUDE_DIR)/cmake.mk
  17. CMAKE_HOST_OPTIONS += \
  18. -DUCERT_FULL=1 \
  19. -DUCERT_HOST_BUILD=1 \
  20. -DCMAKE_SKIP_RPATH=FALSE \
  21. -DUSE_RPATH="${STAGING_DIR_HOST}/lib"
  22. HOST_BUILD_DEPENDS:=libubox/host libjson-c/host usign/host
  23. HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
  24. PKG_BUILD_DEPENDS:=ucert/host
  25. define Package/ucert-full
  26. SECTION:=base
  27. CATEGORY:=Base system
  28. DEPENDS:=+usign +libubox +libjson-c +libblobmsg-json
  29. TITLE:=libreCMC certificate generation and verification utility
  30. PROVIDES:=ucert
  31. VARIANT:=full
  32. endef
  33. define Package/ucert
  34. SECTION:=base
  35. CATEGORY:=Base system
  36. DEPENDS:=+usign +libubox
  37. TITLE:=libreCMC certificate verification utility
  38. PROVIDES:=ucert
  39. CONFLICTS:=ucert-full
  40. VARIANT:=tiny
  41. endef
  42. ifeq ($(BUILD_VARIANT),full)
  43. CMAKE_OPTIONS += -DUCERT_FULL=1
  44. endif
  45. define Build/Prepare
  46. mkdir -p $(PKG_BUILD_DIR)
  47. $(call Build/Prepare/Default)
  48. endef
  49. define Package/ucert/install
  50. $(INSTALL_DIR) $(1)/usr/bin
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ucert $(1)/usr/bin
  52. endef
  53. Package/ucert-full/install = $(Package/ucert/install)
  54. $(eval $(call BuildPackage,ucert))
  55. $(eval $(call BuildPackage,ucert-full))
  56. $(eval $(call HostBuild))