aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2018-06-14 19:39:25 +0200
committerDaniel Golle <daniel@makrotopia.org>2018-06-14 19:39:25 +0200
commit1b8f3d9c2ec3dd89dda524c37e4d69c3d213918e (patch)
treed66567e572a96d66d63985034e6ab2a52ad81752 /package
parent037ef13a161c6167b328aaf6ca0e259a5b7db037 (diff)
downloadupstream-1b8f3d9c2ec3dd89dda524c37e4d69c3d213918e.tar.gz
upstream-1b8f3d9c2ec3dd89dda524c37e4d69c3d213918e.tar.bz2
upstream-1b8f3d9c2ec3dd89dda524c37e4d69c3d213918e.zip
ucert: add package
ucert is a wrapper around usign to allow delegation and revocation of public keys for future use in sysupgrade. Signed-off-by: Daniel Golle <daniel@makrotopia.org> This work was sponsored by WIO (wiowireless.com)
Diffstat (limited to 'package')
-rw-r--r--package/system/ucert/Makefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/package/system/ucert/Makefile b/package/system/ucert/Makefile
new file mode 100644
index 0000000000..d02c8700f2
--- /dev/null
+++ b/package/system/ucert/Makefile
@@ -0,0 +1,60 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ucert
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=$(PROJECT_GIT)/project/ucert.git
+PKG_SOURCE_DATE:=2018-06-10
+PKG_SOURCE_VERSION:=46eec66b190470254fc01973f208dc056bcb9780
+PKG_MIRROR_HASH:=43868aa490fd7a8962586d15e9be9bfff437fe02765ac580c8f244616fa4dff4
+
+CMAKE_INSTALL:=1
+PKG_CHECK_FORMAT_SECURITY:=1
+
+PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE_FILES:=COPYING
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+CMAKE_HOST_OPTIONS += -DUCERT_FULL=1 -DUCERT_HOST_BUILD=1
+HOST_BUILD_DEPENDS:=libubox/host libjson-c/host usign/host
+PKG_BUILD_DEPENDS:=ucert/host
+PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+
+define Package/ucert-full
+ SECTION:=base
+ CATEGORY:=Base system
+ DEPENDS:=+usign +libubox +libjson-c +libblobmsg-json
+ TITLE:=OpenWrt certificate generation and verification utility
+ PROVIDES:=ucert
+ VARIANT:=full
+endef
+
+define Package/ucert
+ SECTION:=base
+ CATEGORY:=Base system
+ DEPENDS:=+usign +libubox
+ TITLE:=OpenWrt certificate verification utility
+ CONFLICTS:=ucert-full
+ VARIANT:=tiny
+endef
+
+ifeq ($(BUILD_VARIANT),full)
+ CMAKE_OPTIONS += -DUCERT_FULL=1
+endif
+
+define Package/ucert/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ucert $(1)/usr/bin
+endef
+
+Package/ucert-full/install = $(Package/ucert/install)
+
+$(eval $(call BuildPackage,ucert))
+$(eval $(call BuildPackage,ucert-full))
+$(eval $(call HostBuild))