Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ucert
  3. PKG_RELEASE:=1
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=$(PROJECT_GIT)/project/ucert.git
  6. PKG_SOURCE_DATE:=2018-09-18
  7. PKG_SOURCE_VERSION:=e1c722b1b6cbf2527b3178342464e56b97825874
  8. PKG_MIRROR_HASH:=36dcca7c2d649a6c34a8daaaef4698fbeb808fd6580c6bfb1ca35f4f06825d17
  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. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  15. include $(INCLUDE_DIR)/package.mk
  16. include $(INCLUDE_DIR)/host-build.mk
  17. include $(INCLUDE_DIR)/cmake.mk
  18. CMAKE_HOST_OPTIONS += \
  19. -DUCERT_FULL=1 \
  20. -DUCERT_HOST_BUILD=1 \
  21. -DCMAKE_SKIP_RPATH=FALSE \
  22. -DUSE_RPATH="${STAGING_DIR_HOST}/lib"
  23. HOST_BUILD_DEPENDS:=libubox/host libjson-c/host usign/host
  24. HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
  25. PKG_BUILD_DEPENDS:=ucert/host
  26. define Package/ucert-full
  27. SECTION:=base
  28. CATEGORY:=Base system
  29. DEPENDS:=+usign +libubox +libjson-c +libblobmsg-json
  30. TITLE:=libreCMC certificate generation and verification utility
  31. PROVIDES:=ucert
  32. VARIANT:=full
  33. endef
  34. define Package/ucert
  35. SECTION:=base
  36. CATEGORY:=Base system
  37. DEPENDS:=+usign +libubox
  38. TITLE:=libreCMC certificate verification utility
  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))