61129f22f6930eb4e3bde2eb4794777a06842680
[openwrt/openwrt.git] / package / system / ucert / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ucert
4 PKG_RELEASE:=1
5
6 PKG_SOURCE_PROTO:=git
7 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ucert.git
8 PKG_SOURCE_DATE:=2018-06-10
9 PKG_SOURCE_VERSION:=46eec66b190470254fc01973f208dc056bcb9780
10 PKG_MIRROR_HASH:=43868aa490fd7a8962586d15e9be9bfff437fe02765ac580c8f244616fa4dff4
11
12 CMAKE_INSTALL:=1
13 PKG_CHECK_FORMAT_SECURITY:=1
14
15 PKG_LICENSE:=GPL-3.0+
16 PKG_LICENSE_FILES:=COPYING
17
18 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
19
20 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/host-build.mk
24 include $(INCLUDE_DIR)/cmake.mk
25
26 CMAKE_HOST_OPTIONS += -DUCERT_FULL=1 -DUCERT_HOST_BUILD=1
27 HOST_BUILD_DEPENDS:=libubox/host libjson-c/host usign/host
28 PKG_BUILD_DEPENDS:=ucert/host
29
30 define Package/ucert-full
31 SECTION:=base
32 CATEGORY:=Base system
33 DEPENDS:=+usign +libubox +libjson-c +libblobmsg-json
34 TITLE:=OpenWrt certificate generation and verification utility
35 PROVIDES:=ucert
36 VARIANT:=full
37 endef
38
39 define Package/ucert
40 SECTION:=base
41 CATEGORY:=Base system
42 DEPENDS:=+usign +libubox
43 TITLE:=OpenWrt certificate verification utility
44 CONFLICTS:=ucert-full
45 VARIANT:=tiny
46 endef
47
48 ifeq ($(BUILD_VARIANT),full)
49 CMAKE_OPTIONS += -DUCERT_FULL=1
50 endif
51
52 define Build/Prepare
53 mkdir -p $(PKG_BUILD_DIR)
54 $(call Build/Prepare/Default)
55 endef
56
57 define Package/ucert/install
58 $(INSTALL_DIR) $(1)/usr/bin
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ucert $(1)/usr/bin
60 endef
61
62 Package/ucert-full/install = $(Package/ucert/install)
63
64 $(eval $(call BuildPackage,ucert))
65 $(eval $(call BuildPackage,ucert-full))
66 $(eval $(call HostBuild))